DG MS friending now tests out
This commit is contained in:
parent
e1834cc887
commit
583d3d0c82
6 changed files with 6 additions and 6 deletions
|
|
@ -24,11 +24,9 @@ class RequestsController < ApplicationController
|
|||
|
||||
if @request
|
||||
flash[:notice] = "Successfully created person request."
|
||||
redirect_to person_requests_url
|
||||
redirect_to requests_url
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class User < Person
|
|||
p = Request.instantiate(:to => friend_url, :from => self)
|
||||
if p.save
|
||||
p.push_to_url friend_url
|
||||
p
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
%td= link_to 'Show', person
|
||||
%td= link_to 'Destroy', person, :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
%p= link_to "Add a friend", new_person_request_path
|
||||
%p= link_to "Add a friend", new_request_path
|
||||
|
||||
#pagination
|
||||
= will_paginate @people
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
%p
|
||||
= f.label :destination_url
|
||||
= f.text_field :destiation_url
|
||||
= f.text_field :destination_url
|
||||
|
||||
|
||||
%p
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
%li.message{:id => request.id, :class => "mine"}
|
||||
= "to : #{request.destination_url}"
|
||||
= request.person.class
|
||||
|
||||
.destroy_link
|
||||
= link_to 'Ignore', request_path(request), :confirm => 'Are you sure?', :method => :delete, :remote => true
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace :db do
|
|||
Person.delete_all
|
||||
User.delete_all
|
||||
Profile.delete_all
|
||||
PersonRequest.delete_all
|
||||
Request.delete_all
|
||||
end
|
||||
|
||||
desc 'Purge and seed the current RAILS_ENV database using information from db/seeds.rb'
|
||||
|
|
|
|||
Loading…
Reference in a new issue