ruby - Rails: Expected.. To Define Account_number -
i have rails project , keep getting following error when trying load new.html.erb page:
expected /usr/local/www/apache22/data/update_pi_names/app/models/account_number.rb define account_number
heres def new in controller:
def new @pi_name = piname.new @account_numbers = account_number.find_all respond_to |format| format.html # new.html.erb format.xml { render :xml => @pi_name } end end
and model/account_number.rb:
class accountnumber < activerecord::base has_and_belongs_to_many :pi_names end
let me know if need more info!
reference model via accountnumber
not account_number
, hence:
@account_numbers = accountnumber.all
also, can use all
instead of find_all
Comments
Post a Comment