Scroll Down Menu Problem

------------------------------------------------------------------- In app/controller/register_controller.rb i declare @find_city like this: ...   def new     @register =     @find_city = City.find(:all, :order=>"city")   end ...

And no changes for other scripts in controller that is from scaffold generator.


I run the script, in http://localhost:3000/register/new the city name list is shown. But I after I submit, the next page show me this error:

NoMethodError in /register#create

Sounds like your create action (which you haven't shown) is rendering the form partial again, and that you're not setting @find_city in that action. Normally you would only do this if the validation failed. You'll need to set @find_city again (or better, put that code in its own method you can call from both new & create_


We can't guess what's in your create action.


Your parameters are in params, not params[:register]. Either change the form so that they are in params[:register], or do