Let\'s say I want to support both GET and POST methods on the same URL. How would I go about handling that in a rails controller action?
You can check if it was a post using request.post?
if request.post? #handle posts else #handle gets end
To get your routes to work:
resources :photos do member do get 'preview' post 'preview' end end