Sha256: 9e93ffe003de486bda0bcc4506668907811b87fae9123325c17e6a9eef50dde1
Contents?: true
Size: 921 Bytes
Versions: 7
Compression:
Stored size: 921 Bytes
Contents
module TiesHelper def tie_brief(tie) "N contacts in common" end # Show current ties from current user to actor, if they exist, or provide a link # to create a new tie to actor def ties_to(a) if user_signed_in? if current_subject.ties_to(a).present? current_subject.ties_to(a).first.relation_name else new_tie_link(current_subject.sent_ties.build :receiver_id => Actor.normalize_id(a)) end else link_to t("contact.new.link"), new_user_session_path end end def new_tie_link(tie) link_to t("contact.new.link"), new_tie_path("tie[sender_id]" => tie.sender.id, "tie[receiver_id]" => tie.receiver.id), :title => t("contact.new.title", :name => tie.receiver_subject.name), :remote => true end def link_follow_state link_to("Unfollow", home_path) end end
Version data entries
7 entries across 7 versions & 1 rubygems