Module: Card::Set::Right::Follow::HtmlFormat

Extended by:
AbstractFormat
Defined in:
tmpsets/set/mod017-follow/right/follow.rb

Instance Method Summary collapse

Instance Method Details

#follow_item(condition, button = true) ⇒ Object



68
69
70
71
72
73
74
75
76
77
78
79
# File 'tmpsets/set/mod017-follow/right/follow.rb', line 68

def follow_item condition, button=true
  condition ||= "*always"
  wrap do
    card_form action: :update, success: { view: :follow_item } do
      [
        follow_item_hidden_tags(condition),
        (follow_item_button(condition) if button),
        follow_item_link(condition)
      ].compact
    end
  end
end

#rule_form_argsObject



81
82
83
# File 'tmpsets/set/mod017-follow/right/follow.rb', line 81

def rule_form_args
  super.merge "data-update-foreign-slot": ".card-slot.follow_section-view"
end