Fix bug: users can now be saved

This commit is contained in:
chris2tof committed 2011-11-12 17:54:45 +08:00
1 parent 0a6efeb0a2
commit d9d7099da6
7 files changed
+26 -18

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ class AttributeModel
field :built_in, :type => Boolean, :default => false
field :disabled, :type => Boolean, :default => false
embedded_in :user_attribute_model, :inverse_of => :attribute_models
embedded_in :user_attribute_model
validates_uniqueness_of :key
# Destroy the i18n_variable
+1 -1
View File
@@ -7,7 +7,7 @@ class UserAttribute
has_many :attribute_values
# Update or create the attribute_value records
def attributes=(*args)
def attribute_values=(*args)
args[0].each do |value|
if value[:id].blank?
attribute_values.build(value)