basic function
This commit is contained in:
1 parent
9eed9ec7b6
commit
19db9d0037
26 files changed
+420
-185
No files matched your search
@@ -4,7 +4,7 @@ class AttributeField
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :key
|
||||
field :markup
|
||||
field :markup #[select,text_field,email,date,addr]
|
||||
field :locale, :type => Boolean, :default => true
|
||||
field :list_options, :type => Array
|
||||
field :built_in, :type => Boolean, :default => false
|
||||
@@ -15,10 +15,14 @@ class AttributeField
|
||||
field :neutral_title
|
||||
|
||||
belongs_to :attribute
|
||||
belongs_to :role
|
||||
# belongs_to :role
|
||||
has_many :attribute_values
|
||||
|
||||
# validates_uniqueness_of :key
|
||||
def role
|
||||
self.attribute.role
|
||||
end
|
||||
|
||||
def title_translations
|
||||
if locale
|
||||
return locale_title_translations
|
||||
@@ -29,7 +33,7 @@ class AttributeField
|
||||
|
||||
def title_translations=(var)
|
||||
if locale
|
||||
self.locale_title = var
|
||||
self.locale_title_translations = var
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user