Module: TiesHelper
- Defined in:
- app/helpers/ties_helper.rb
Instance Method Summary collapse
Instance Method Details
#link_follow_state ⇒ Object
26 27 28 |
# File 'app/helpers/ties_helper.rb', line 26 def link_follow_state link_to("unfollow", home_path) end |
#tie_brief(tie) ⇒ Object
2 3 4 |
# File 'app/helpers/ties_helper.rb', line 2 def tie_brief(tie) "18 contacts in common" end |
#tie_link(tie) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/ties_helper.rb', line 6 def tie_link(tie) # FIXME: tie name if tie.relation.granted # There is granted relation, so another user must confirmate it # We need to render ties#new with a message link_to t("#{ tie.relation.name }.new"), new_tie_path("tie[sender_id]" => tie.sender.id, "tie[receiver_id]" => tie.receiver.id, "tie[relation_name]" => tie.relation.name), :title => t("#{ tie.relation.name }.confirm_new", :name => tie.receiver_subject.name), :remote => true else # Tie can be established at once. render :partial => 'ties/form', :locals => { :tie => tie } end end |