Module: Card::Set::TypePlusRight::User::Follow
- Extended by:
- Card::Set
- Defined in:
- platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb,
platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow/follow_editor_helper.rb
Overview
Set: All “+Follow” cards on “User” cards
Defined Under Namespace
Modules: FollowEditorHelper, HtmlFormat
Constant Summary collapse
- FOLLOW_TABS =
{ "Follow" => { view: "follow_tab" }, "Ignore" => { view: "ignore_tab" } }.freeze
Constants included from Helpers
Helpers::SET_PATTERN_TEST_REGEXP
Constants included from Event::Api
Class Method Summary collapse
Instance Method Summary collapse
-
#current_user? ⇒ Boolean
-
#item_names(_args = {}) ⇒ Object
overrides pointer default.
-
#suggestions ⇒ Object
-
#virtual? ⇒ Boolean
Methods included from Card::Set
Methods included from I18nScope
Methods included from Registrar
#extended, #finalize_load, #process_base_modules, #register_set
Methods included from Helpers
#format_module, #format_modules, #method_missing, #modules, #pattern_code, #respond_to_missing?, #set_name_parts, #shortname, #underscored_name
Methods included from AdvancedApi
#assign_type, #attachment, #define_set_from_error, #ensure_set, #setting_opts, #stage_method
Methods included from Format
#before, #format, layout_method_name, #view, view_method_name, view_setting_method_name, wrapper_method_name
Methods included from Inheritance
#include_set, #include_set_formats
Methods included from Card::Set::Trait
#card_accessor, #card_reader, #card_writer, #require_field
Methods included from Event::Api
Class Method Details
.source_location ⇒ Object
7 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 7 def self.source_location; "/Users/ethan/dev/decko/gem/mod/follow/set/type_plus_right/user/follow.rb"; end |
Instance Method Details
#current_user? ⇒ Boolean
32 33 34 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 32 def current_user? Auth.signed_in? && Auth.current_id == left.id end |
#item_names(_args = {}) ⇒ Object
overrides pointer default
20 21 22 23 24 25 26 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 20 def item_names _args={} if (user = left) Card::Rule.preference_names user.name, "follow" else [] end end |
#suggestions ⇒ Object
28 29 30 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 28 def suggestions Card[:follow_suggestions]&.item_names || [] end |
#virtual? ⇒ Boolean
15 16 17 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 15 def virtual? new? end |