Re: [Rails] Re: Query controller using two resources
On Aug 1, 2011, at 4:11 PM, Leonel *.* wrote:
> Walter Davis wrote in post #1014258:
>> try get ':activate/:activation_code'
>>
>> Along those same lines, try
>> User.find_by_id_and_activation_code(params)
>
> Thanks, but I tried it and I get this error when trying to start the
> server...
>
> Exiting
> /var/lib/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/routing/
> mapper.rb:171:in
> `default_controller_and_action': missing :action (ArgumentError)
> from
> /var/lib/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/routing/
> mapper.rb:72:in
> `normalize_options!'
>
Try 'activate/:activation_code' instead -- There wouldn't be any map
to :activate (the symbol) since it doesn't exist in your application.
Have a read through the routing guide, too, I may have something
wrong. Try using a match statement rather than get directly. I'm not
sure if this syntax is supported by get.
Walter
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-
> talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
> .
>
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home