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

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod025-card-mod-follow/right/follow.rb,
card/tmpsets/set/mod026-card-mod-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 'card/tmpsets/set/mod025-card-mod-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 'card/tmpsets/set/mod025-card-mod-follow/right/follow.rb', line 81

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

#view: follow_itemObject

interface to view/alter a specific rule option



64
65
66
# File 'card/tmpsets/set/mod025-card-mod-follow/right/follow.rb', line 64

view :follow_item, cache: :never do
  follow_item Env.params[:condition]
end

#view: follow_statusObject

shows a follow item link for each of the current follow options



59
60
61
# File 'card/tmpsets/set/mod025-card-mod-follow/right/follow.rb', line 59

view :follow_status, cache: :never do
  wrap { haml :follow_status }
end