Class: Remarkable::MongoMapper::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/remarkable/mongo_mapper/base.rb

Constant Summary collapse

I18N_COLLECTION =
[ :attributes, :associations ]

Instance Method Summary collapse

Instance Method Details

#with_options(opts = {}) ⇒ Object

Provides a way to send options to all MongoMapper matchers.

validates_presence_of(:name).with_options(:allow_nil => false)

Is equivalent to:

validates_presence_of(:name, :allow_nil => false)


14
15
16
17
# File 'lib/remarkable/mongo_mapper/base.rb', line 14

def with_options(opts={})
  @options.merge!(opts)
  self
end