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.18.1 set/all/follow/follow_link_views.rb
card-mod-follow-0.18.0 set/all/follow/follow_link_views.rb
card-mod-follow-0.17.0 set/all/follow/follow_link_views.rb
card-mod-follow-0.16.0 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.6 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.5 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.4 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.3 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.2.pre1 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.1.1 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.1 set/all/follow/follow_link_views.rb
card-mod-follow-0.15.0 set/all/follow/follow_link_views.rb
card-mod-follow-0.14.2 set/all/follow/follow_link_views.rb
card-mod-follow-0.14.1 set/all/follow/follow_link_views.rb
card-mod-follow-0.14.0 set/all/follow/follow_link_views.rb
card-mod-follow-0.13.4 set/all/follow/follow_link_views.rb
card-mod-follow-0.13.3 set/all/follow/follow_link_views.rb
card-mod-follow-0.13.2 set/all/follow/follow_link_views.rb
card-mod-follow-0.13.1 set/all/follow/follow_link_views.rb
card-mod-follow-0.13.0 set/all/follow/follow_link_views.rb