2013-08-07 3 views
0

Кажется, что сделал какую-то ошибку в моделиПолучение Uninitialized Constant

class LineItemAddons < ActiveRecord::Base 
    belongs_to :line_item 
    has_one :addon_type_value 
    attr_accessible :quantity, :received, :snapshot_price, :status, :line_item_id, :addon_type_value_id 

class LineItem < ActiveRecord::Base 
    belongs_to :design 
    belongs_to :cart 
    belongs_to :designer_order 
    belongs_to :return 
    belongs_to :return_designer_order 
    has_many :line_item_addons 

class AddonTypeValue < ActiveRecord::Base 
    belongs_to :design 
    belongs_to :addon_type 
    belongs_to :line_item_addon 
    attr_accessible :description, :name, :position, :price, :addon_type_id, :design_id, :quantity 

Получение unintialized константы для line_item_addons

ответ

0

Я сделал ошибку при создании модели

имя класса должно LineItemAddon не LineItemAddons

К сожалению Guys

0

Я думаю, что это должно быть

class AddonTypeValue < ActiveRecord::Base 
    belongs_to :design 
    belongs_to :addon_type 
    belongs_to :line_item_addons 
    ... 
Смежные вопросы