Sha256: 892d2a95e2fde7a3d1367bc61cbac2780c2ab1bb0358b65aff944191d29b28e5
Contents?: true
Size: 808 Bytes
Versions: 31
Compression:
Stored size: 808 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 if SocialStream.relation_model == :follow form_tag new_user_session_path do |f| submit_tag t('contact.follow') end else link_to t("contact.new.link"), new_user_session_path end end end end
Version data entries
31 entries across 31 versions & 2 rubygems