I am fairly new to Ruby and Rails and am working on an app in order to
get more familiar. I feel I should be able to solve this problem on my
own but have thus far been stymied. Thanks for your help.
I used scaffold to generate the basic index/new/show/edit/destroy
methods for a given db entries and all works as it should. However, I
would like to add a new method – say “new_special” (for example) – in
the controller.
I would expect to do something like:
[foo_controller.rb]
…
def new_special
{some instructions}
end
…
I see that the engine is trying to invoke the show method and pass it
“new_special” as an id. am very confused! I even deleted the ‘show’
method but it still calls it!
I’ve tried cycling the server and looked everywhere… thanks.
Another alternative which is often appropriate is to use the standard
new action but to pass optional additional params in the url to tell
it what is ‘special’.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.