Module: ContactsHelper

Defined in:
app/helpers/contacts_helper.rb

Instance Method Summary collapse

Instance Method Details

#contact_brief(subject) ⇒ Object



2
3
4
# File 'app/helpers/contacts_helper.rb', line 2

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


6
7
8
9
10
11
12
13
# File 'app/helpers/contacts_helper.rb', line 6

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

end

#contact_to(a) ⇒ Object

Show current ties from current user to actor, if they exist, or provide a link to create new ties to actor



17
18
19
20
21
22
23
# File 'app/helpers/contacts_helper.rb', line 17

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