Fix mongoid deeply nested polimorphic

Got the commit from github. The roles and sub_roles save.
This commit is contained in:
chris2tof committed 2011-12-19 21:22:26 +08:00
1 parent d27d7a623c
commit 4108ebf06d
11 files changed
+45 -41

No files matched your search

-1
View File
@@ -9,7 +9,6 @@ class Attribute
has_many :attribute_fields, :autosave => true, :dependent => :destroy
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :i18n_variable, :allow_destroy => true
accepts_nested_attributes_for :attribute_fields, :allow_destroy => true
def is_built_in?
+1 -1
View File
@@ -13,8 +13,8 @@ class AttributeField
belongs_to :attribute
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
has_many :attribute_values
validates_uniqueness_of :key
accepts_nested_attributes_for :i18n_variable, :allow_destroy => true
# Convert the string list_options into an array
def select_list_options=(var)