On Mon, Jan 19, 2009 at 11:19 AM, Raimon Fs
<[email protected]> wrote:
>
> Hello,
>
> I'm stucked in a completely newbie question ...
>
> I have one controller scann
>
> all the default methods work: index, new, save, ...
>
> I added a new one called query, and when I try to call it
>
> http://127.0.0.1:3000/scann/query
>
> I'm getting an error, and the method who is trapping is 'show'
You'll need to add a new route for your custom action. Assuming you
have map.resources :scanns in your routes.rb
If the action you need will work on a collection:
map.resources :scanns, :collection => { :query => :get }
or if just on a member:
map.resources scanns, :member => { :query => :get }
You'll need to change :get to whatever method you need.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---