Сразу уточню что в рельсах новичок!
Выдается ошибка:
uninitialized constant BusinessCompany::BusinessCompanyAddres
Код модели:
class BusinessCompany < ActiveRecord::Base
has_and_belongs_to_many :business_category
has_many :business_company_address
def self.per_page
15
end
def self.find_for_list(page)
companies = paginate :all, :page => page, :order => 'name ASC'
for c in companies
c.address = c.business_company_address.find(:first);
end
end
end
Не пойму почему он ищет константу и куда подевалась вторая s в
business_company_address
Заранее благодарен всем за ответ!