S Ahmed
2014-May-08 13:13 UTC
why does my failed form submission not redirect to the originating form page?
Hi, I have the following: GET /account/create POST /account/oncreate My create action looks like: def create @user = User.new end def oncreate @user = User.new(params) if @user.valid? ... else render 'create' end end But when the form submission submits and fails, the browser url is on /account/oncreate Why is that? I want it to continue to display /account/create -- 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAG2rwuNVP_7hd8Pd8pP2Y%3D89JmFtnLF8ghuqVmRP%3D71bkZuuFg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.