Class: Remarkable::ActiveRecord::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/remarkable_activerecord/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 ActiveRecord 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_activerecord/base.rb', line 14

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