VIEW:
<%= link_to "Remove", :controller => "referrals",
:action => "remove",
:id => referral %>
CONTROLLER:
def remove
referral = Referral(params[:id])
referral.update_attribute(body, "Removed by user request on
#{Date.today}")
redirect_to(:controller => "people", :action =>
"show", :id =>
@person.id)
end
ERROR:
Application error
Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html
Recognition failed for "/referral/remove/3"
action_controller/routing.rb:522:in `recognition_failed''
action_controller/routing.rb:512:in `recognize!''
I guess the egg nog is making my brain slow but I haven''t the slightest
idea why Rails is crapping out on this. Do I need to use a form instead
of a link_to?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Taylor Strait wrote:> > VIEW: > <%= link_to "Remove", :controller => "referrals", > :action => "remove", > :id => referral %> > > CONTROLLER: > def remove > referral = Referral(params[:id]) > referral.update_attribute(body, "Removed by user request on > #{Date.today}") > redirect_to(:controller => "people", :action => "show", :id => > @person.id) > end >Usually the stack trace also say which line number throws the error. I wonder >body< is defined anywhere? Or perhaps ''body''? Long --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Strangely the error is just a blank white page with the ''Application Error'' text, not the normal Rails trace. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---