module Mongoid::Verbalize::ClassMethods
Public Instance Methods
validates_all_locales(names, options = {})
click to toggle source
# File lib/mongoid/verbalize.rb, line 31 def validates_all_locales(names, options = {}) validates_with VerbalizedValidator, options.merge(:mode => :all_locales, :attributes => names) end
validates_default_locale(names, options = {})
click to toggle source
# File lib/mongoid/verbalize.rb, line 23 def validates_default_locale(names, options = {}) validates_with VerbalizedValidator, options.merge(:mode => :only_default, :attributes => names) end
validates_one_locale(names, options = {})
click to toggle source
# File lib/mongoid/verbalize.rb, line 27 def validates_one_locale(names, options = {}) validates_with VerbalizedValidator, options.merge(:mode => :one_locale, :attributes => names) end
verbalized_field(name, options = {})
click to toggle source
# File lib/mongoid/verbalize.rb, line 19 def verbalized_field(name, options = {}) field(name, options.merge(:type => TranslatedString, :default => {})) end