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-1.98.0 mod/follow/set/all/follow/follow_link_views.rb
card-1.97.0.1 mod/follow/set/all/follow/follow_link_views.rb
card-1.97.0 mod/follow/set/all/follow/follow_link_views.rb