Fix mongoid deeply nested polimorphic
Got the commit from github. The roles and sub_roles save.
This commit is contained in:
1 parent
d27d7a623c
commit
4108ebf06d
11 files changed
+45
-41
No files matched your search
@@ -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?
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user