Module: JayZ::ActiveRecord
- Defined in:
- lib/jay_z.rb
Constant Summary collapse
- Base =
ActiveRecord::Base
- IdentityMap =
ActiveRecord::IdentityMap
Instance Method Summary collapse
Instance Method Details
#new ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/jay_z.rb', line 17 def new if @object.valid? @object else fail ::ActiveRecord::RecordInvalid.new(@object) end end |
#new! ⇒ Object
25 26 27 |
# File 'lib/jay_z.rb', line 25 def new! @object end |
#save ⇒ Object
29 30 31 |
# File 'lib/jay_z.rb', line 29 def save @object.tap { |record| record.save! } end |