<% if @active_friend_request_pending.present? %>
<%= " #{(t 'a_friend_request_you_sent_to')} #{@user.first_name} is
pending" %>
<% elsif @passive_friend_request_pending.present? %>
<%= form_tag friend_request_accept_friendable_path(user_id: @user.id),
method: :put, remote: true do %>
<%= button_tag class: 'btn btn-primary btn-sm' do %>
<%= " #{ (t 'accept_friend_request_from') #{@user.first_name} " %>
<% end %>
<% end %>
<%= form_tag friend_request_reject_friendable_path(user_id: @user.id),
method: :delete, remote: true do %>
<%= button_tag class: 'btn btn-primary' do %>
<%= " #{ (t 'decline_friend_request_from') } #{ @user.first_name } " %>
<% end %>
<% end %>
<% elsif @friended.present? %>
<%= "#{(t 'you_are_friends_with')} #{@user.first_name} " %>
<% else %>
<%= form_tag friend_request_friendable_path(user_id: @user.id), method:
:post, remote: true do %>
<%= button_tag class: 'btn btn-primary btn-sm' do %>
<%= (t 'send_a_friend_request') %>
<% end %>
<% end %>
<% end %>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/cb73b2f1-e306-4953-939c-8f2fded926e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.