Sha256: ebe943e69e71e711bedc80c65677541ec960a13353a84be2fc192c7f717be2aa

Contents?: true

Size: 605 Bytes

Versions: 122

Compression:

Stored size: 605 Bytes

Contents

module ContactsHelper
  def contact_brief(subject)
    t 'contact.in_common', :count => current_subject.common_contacts_count(subject)
  end

  def contact_link(c)
    if c.reflexive?
      t('subject.this_is_you')
    else
      render :partial => 'contacts/link', :locals => { :contact => c }
    end

  end

  # Show current ties from current user to actor, if they exist, or provide a link
  # to create new ties to actor
  def contact_to(a)
    if user_signed_in?
      contact_link current_subject.contact_to!(a)
    else
      link_to t("contact.new.link"), new_user_session_path
    end
  end
end

Version data entries

122 entries across 122 versions & 4 rubygems

Version Path
social_stream-0.23.4 base/app/helpers/contacts_helper.rb
social_stream-base-0.17.3 app/helpers/contacts_helper.rb
social_stream-0.23.3 base/app/helpers/contacts_helper.rb
social_stream-base-0.17.2 app/helpers/contacts_helper.rb
social_stream-0.23.2 base/app/helpers/contacts_helper.rb
social_stream-base-0.17.1 app/helpers/contacts_helper.rb
social_stream-0.23.1 base/app/helpers/contacts_helper.rb
social_stream-base-0.17.0 app/helpers/contacts_helper.rb
social_stream-0.22.1 base/app/helpers/contacts_helper.rb
social_stream-base-0.16.4 app/helpers/contacts_helper.rb
social_stream-0.22.0 base/app/helpers/contacts_helper.rb
social_stream-base-0.16.3 app/helpers/contacts_helper.rb
social_stream-0.21.4 base/app/helpers/contacts_helper.rb
social_stream-base-0.16.2 app/helpers/contacts_helper.rb
social_stream-0.21.3 base/app/helpers/contacts_helper.rb
social_stream-0.21.2 base/app/helpers/contacts_helper.rb
social_stream-0.21.1 base/app/helpers/contacts_helper.rb
social_stream-base-0.16.1 app/helpers/contacts_helper.rb
social_stream-0.21.0 base/app/helpers/contacts_helper.rb
social_stream-base-0.16.0 app/helpers/contacts_helper.rb