So when I enter a valid key I get redirected to create a user, but this
isn't working. the submit isnt doing anything, the :action => validation
is not working
config/routes.rb
resources :invitations do
collection do
get :validate
get :validation
end
end
So when I enter a valid key I get redirected to create a user, but this
isn't working. the submit isnt doing anything, the :action => validation
is not working
It's not supposed to. A form's action is specified on the form element
itself, not on submit tags. You've written form_tag
invitations_validate_path, so the form gets sent to
invitations_validate_path (ie your valdiate action)
You only fixed part of the issue. Fred pointed out two things. The first was that you specified params[:key] incorrectly. The second, and more important, is that you put your :action in the wrong place. Remove the :action from your submit tag and change your form_tag to go to invitations_validation_path.