On 1 February 2012 17:18, Duane Morin <li...@ruby-forum.com> wrote: > Colin Law wrote in post #1043418: >> On 1 February 2012 03:45, Duane Morin <li...@ruby-forum.com> wrote: >>> need to do something like "redirect_to(...) and return". >>> `realtime' >>> app/controllers/application_controller.rb:9:in `status' >> What comes next in the trace? That should tell you where status is >> being called from. >> One thought, I wonder whether this status is overriding another one, >> possibly in devise? >> >> Also check in development.log (if you have not already done so) to >> check what is happening before it fails. >> >> Colin > > Ok, well now I'm really confused. It appears to have more to do with a > "create and redirect" than with Devise, because it just happened to me > on one of my own controllers. Here's the interesting bit in the middle: > > app/controllers/application_controller.rb:9:in `status' > vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.0/lib/action_controller/metal/instrumentation.rb:64:in > `block in redirect_to' > vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/notifications.rb:53:in > `block in instrument' > vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/notifications/instrumenter.rb:21:in > `instrument' > vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/notifications.rb:53:in > `instrument' > vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.0/lib/action_controller/metal/instrumentation.rb:60:in > `redirect_to' > app/controllers/ui/campaigns_controller.rb:48:in `block (2 levels) in > create' > > My code (campaigns_controller line 48) is just typical auto-generate > scaffold code: > > format.html { redirect_to @ui_campaign, notice: 'Campaign was > successfully created.' } > > I have no idea what's going on in the middle with all that metal stuff, > or how it ends up on status.
I wonder whether it could be that status is now a reserved word. I would rename that action and if you want to keep it the same externally then map it to the new action in routes.rb. Colin -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.