Sha256: 345f1e57172af5c1014455344733a212bc688fbbab917f8b57de2c658755b175

Contents?: true

Size: 492 Bytes

Versions: 43

Compression:

Stored size: 492 Bytes

Contents

format do
  def follow_link_class
    card.followed? ? StopFollowLink : StartFollowLink
  end

  def show_follow?
    Auth.signed_in? && !card.new_card? && card.followable?
  end
end

format :json do
  view :follow_status do
    follow_link_class.link_opts
  end
end

format :html do
  def follow_button
    follow_link_class.new(self).button
  end

  def follow_modal_link
    follow_link_class.new(self).modal_link
  end

  view :follow_button, cache: :never do
    follow_button
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
card-mod-follow-0.11.7 set/all/follow/follow_link_views.rb
card-mod-follow-0.12.0 set/all/follow/follow_link_views.rb
card-mod-follow-0.11.6 set/all/follow/follow_link_views.rb
card-mod-follow-0.11.5 set/all/follow/follow_link_views.rb
card-mod-follow-0.11.4 set/all/follow/follow_link_views.rb
card-mod-follow-0.11.3 set/all/follow/follow_link_views.rb
card-mod-follow-0.11.2 set/all/follow/follow_link_views.rb
card-mod-follow-0.11.1 set/all/follow/follow_link_views.rb
card-mod-follow-0.11.0 set/all/follow/follow_link_views.rb
card-1.100.0 mod/follow/set/all/follow/follow_link_views.rb
card-1.99.6 mod/follow/set/all/follow/follow_link_views.rb
card-1.99.5 mod/follow/set/all/follow/follow_link_views.rb
card-1.99.4 mod/follow/set/all/follow/follow_link_views.rb
card-1.99.3 mod/follow/set/all/follow/follow_link_views.rb
card-1.99.2 mod/follow/set/all/follow/follow_link_views.rb
card-1.99.1 mod/follow/set/all/follow/follow_link_views.rb
card-1.99.0 mod/follow/set/all/follow/follow_link_views.rb
card-1.98.3 mod/follow/set/all/follow/follow_link_views.rb
card-1.98.2 mod/follow/set/all/follow/follow_link_views.rb
card-1.98.1 mod/follow/set/all/follow/follow_link_views.rb