I have a rails project and keep getting the following error when trying to load my new.html.erb page:
Expected /usr/local/www/apache22/data/update_pi_names/app/models/account_number.rb to define Account_number
Heres my def new in the controller:
def new
@pi_name = PiName.new
@account_numbers = Account_number.find_all
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @pi_name }
end
end
And my model/account_number.rb:
class AccountNumber < ActiveRecord::Base
has_and_belongs_to_many :pi_names
end
Let me know if you need any more info!
Reference your model via
AccountNumbernotAccount_number, hence:@account_numbers = AccountNumber.allAlso, you can use
allinstead offind_all