Diff
Modified: branches/rails2/app/controllers/friendships_controller.rb (2772 => 2773)
--- branches/rails2/app/controllers/friendships_controller.rb 2011-10-31 13:05:13 UTC (rev 2772)
+++ branches/rails2/app/controllers/friendships_controller.rb 2011-10-31 13:27:31 UTC (rev 2773)
@@ -41,7 +41,7 @@
respond_to do |format|
if @friendship.accept!
flash[:notice] = 'Friendship was successfully accepted.'
- format.html { redirect_to friendships_url(current_user.id) }
+ format.html { redirect_to user_friendships_url(current_user.id) }
else
error("Friendship already accepted", "already accepted")
end
@@ -128,7 +128,7 @@
respond_to do |format|
if @friendship.update_attributes(params[:friendship])
flash[:notice] = 'Friendship was successfully updated.'
- format.html { redirect_to friendship_url(@friendship.user_id, @friendship) }
+ format.html { redirect_to user_friendship_url(@friendship.user_id, @friendship) }
else
format.html { render :action ="" "edit" }
end
@@ -185,7 +185,7 @@
def check_user_present
if params[:user_id].blank?
flash.now[:error] = "Invalid URL"
- redirect_to friendships_url(current_user.id)
+ redirect_to user_friendships_url(current_user.id)
return false
end
end
@@ -269,7 +269,7 @@
(err = Friendship.new.errors).add(:id, message)
respond_to do |format|
- format.html { redirect_to friendships_url(current_user.id) }
+ format.html { redirect_to user_friendships_url(current_user.id) }
end
end
end
Modified: branches/rails2/app/helpers/application_helper.rb (2772 => 2773)
--- branches/rails2/app/helpers/application_helper.rb 2011-10-31 13:05:13 UTC (rev 2772)
+++ branches/rails2/app/helpers/application_helper.rb 2011-10-31 13:27:31 UTC (rev 2773)
@@ -227,7 +227,7 @@
rtn = fships
end
- return link_to(rtn, friendships_path(user))
+ return link_to(rtn, user_friendships_path(user))
end
def request_membership_link(user_id, network_id)
@@ -239,7 +239,7 @@
end
def request_friendship_link(user_id)
- link_to("Request Friendship", new_friendship_url(:user_id => user_id))
+ link_to("Request Friendship", new_user_friendship_url(:user_id => user_id))
end
def versioned_workflow_link(workflow_id, version_number, long_description=true)
Modified: branches/rails2/app/views/friendships/_table.rhtml (2772 => 2773)
--- branches/rails2/app/views/friendships/_table.rhtml 2011-10-31 13:05:13 UTC (rev 2772)
+++ branches/rails2/app/views/friendships/_table.rhtml 2011-10-31 13:27:31 UTC (rev 2773)
@@ -22,7 +22,7 @@
<td class="actions">
<% if mine? friendship %>
<%= icon "show", user_friendship_path(friendship.friend_id, friendship), nil, nil, "View" %>
- <% unless friendship.accepted? %> <%= icon "confirm", accept_friendship_path(friendship.friend_id, friendship), nil, :method => :post %><% end %>
+ <% unless friendship.accepted? %> <%= icon "confirm", accept_user_friendship_path(friendship.friend_id, friendship), nil, :method => :post %><% end %>
<%= icon (friendship.accepted? ? "destroy" : "reject"), user_friendship_path(friendship.friend_id, friendship), nil, :confirm => "Are you sure?", :method => :delete %>
<% end %>
</td>
Modified: branches/rails2/app/views/friendships/show.rhtml (2772 => 2773)
--- branches/rails2/app/views/friendships/show.rhtml 2011-10-31 13:05:13 UTC (rev 2772)
+++ branches/rails2/app/views/friendships/show.rhtml 2011-10-31 13:27:31 UTC (rev 2773)
@@ -76,7 +76,7 @@
<!-- These forms serve as 'data senders' for Accept/Reject buttons -->
- <% form_tag (accept_friendship_path(@friendship.friend_id, @friendship)) do %>
+ <% form_tag (accept_user_friendship_path(@friendship.friend_id, @friendship)) do %>
<%= hidden_field_tag "accept_msg", "" %>
<% end %>
Modified: branches/rails2/app/views/users/show.rhtml (2772 => 2773)
--- branches/rails2/app/views/users/show.rhtml 2011-10-31 13:05:13 UTC (rev 2772)
+++ branches/rails2/app/views/users/show.rhtml 2011-10-31 13:27:31 UTC (rev 2773)
@@ -40,7 +40,7 @@
<!-- check if the profile that we are viewing now is a friend of current user -> stored for better performance -->
<% this_user_is_friend_of_current_user = @user.friend? current_user.id %>
<% unless this_user_is_friend_of_current_user || current_user.friendship_pending?(@user.id) %>
- <li><%= icon('friendship', new_friendship_url(:user_id => @user.id), nil, nil, 'Request Friendship') %></li>
+ <li><%= icon('friendship', new_user_friendship_url(:user_id => @user.id), nil, nil, 'Request Friendship') %></li>
<% end %>
<% unless mine? @user %>
Modified: branches/rails2/config/routes.rb (2772 => 2773)
--- branches/rails2/config/routes.rb 2011-10-31 13:05:13 UTC (rev 2772)
+++ branches/rails2/config/routes.rb 2011-10-31 13:27:31 UTC (rev 2773)
@@ -190,7 +190,7 @@
map.resources :messages, :collection => { :sent => :get, :delete_all_selected => :delete }
# all ***ship's
- map.resources :memberships, :friendships
+ map.resources :memberships
# all oauth
map.oauth '/oauth',:controller=>'oauth',:action=""