jeudi 2 juillet 2015

Ruby on rails tutorial chapter 10...account activation not matching route

Trying to go through the ruby on rails tutorial on chapter 10. Have a pretty decent understanding of routing so far. Here is the issue: basically with account activations you send a token to an email which it then performs a hash on and tries to verify everything (after the link is clicked). I have a route set up for /account_activations/:id/edit

and this is the url I am sending: account_activations/$2a$10$GTxhcOsTRWNvmDMwaWLJk.WM1xgnICwXUpkymIN5oRqvWRIb%2FtnXy/edit?email=me%40gmail.com

I have verified that the hash is correct in several different testing scenarios. It then tells me it cannot find a route for it. Quoting the closest thing (in terms of priority) as:

edit_account_activation_path    GET /account_activations/:id/edit(.:format) account_activations#edit

The path in routes.rb looks like: resources :account_activations, only: [:edit]

Looks to me like those should match though as :id should just act as a wildcard for the string. If anyone needs more info let me know. Would really like to understand why this isn't working. Thanks.

Aucun commentaire:

Enregistrer un commentaire