Sha256: 5426217e9097af43d30a43a6606dabf060f0b3f23096e14d854450d2244021b8
Contents?: true
Size: 638 Bytes
Versions: 33
Compression:
Stored size: 638 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_#{ SocialStream.relation_model }", :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
33 entries across 33 versions & 2 rubygems