Guest User

Untitled

a guest
May 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # action: la
  2. # Displays contact form. If no js I want to render back to 'oc' with errors, if js then render inline/partial. Form goes to action: process.
  3.  
  4. # action: oc
  5. # Displays contact form. If no js I want to render back to 'oc' with errors, if js then render inline/partial. Form goes to action: process.
  6.  
  7. # Both of those don't even exist in the controller since there's no need for them, they just have view files.
  8.  
  9. # action: process
  10. if @person.save
  11. redirect_to :action => "thanks"
  12. else
  13. if request.xhr?
  14. render :partial => "form"
  15. else
  16. redirect_to :back # "My Last action"
  17. end
  18. end
Add Comment
Please, Sign In to add comment