Skip to content

Instantly share code, notes, and snippets.

@nicolaracco
Created November 12, 2010 14:13
Show Gist options
  • Save nicolaracco/674134 to your computer and use it in GitHub Desktop.
Save nicolaracco/674134 to your computer and use it in GitHub Desktop.
class Model
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Localizable
localized_field :name
validates_default_locale :name
end
#
# def validates_default_locale attributes
# validates_with LocalizedValidator, :options => { :attributes => attributes, :mode => :only_default }
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment