module
Ktistec::ViewHelper::ClassMethods
Defined in:
views/view_helper.crConstant Summary
-
PUBLIC =
"https://www.w3.org/ns/activitystreams#Public"
Instance Method Summary
- #activity(activity)
-
#addressing(params, actor, to = Set(String).new, cc = Set(String).new)
Derives visibility and to/cc addressing from the "visibility" param.
- #depth(object)
- #mention_page_mention_banner(env, mention, follow, count)
- #object_partial(env, object, actor = object.attributed_to(include_deleted: true), author = actor, *, activity = nil, with_detail = false, for_thread = nil)
- #paginate(env, collection)
- #pagination_params(env)
- #tag_page_tag_controls(env, hashtag, task, follow, count)
- #thread_page_thread_controls(env, thread, task, follow)
-
#visibility(actor, to, cc)
Derives visibility from to/cc addressing.
- #wrap_filter_term(str)
-
#wrap_link(str, include_scheme = false, length = 30, tag = :a)
Wraps a string in a link if it is a URL.
Instance Method Detail
Derives visibility and to/cc addressing from the "visibility" param.
def object_partial(env, object, actor = object.attributed_to(include_deleted: true), author = actor, *, activity = nil, with_detail = false, for_thread = nil)
#
Wraps a string in a link if it is a URL.
By default, matches the weird format used by Mastodon: https://github.com/mastodon/mastodon/blob/main/app/lib/text_formatter.rb