Class: ActiveRecord::Base::VeneerInterface::InstanceWrapper

Inherits:
Veneer::Base::InstanceWrapper show all
Defined in:
lib/veneer/adapters/activerecord/instance_wrapper.rb,
lib/veneer/adapters/activerecord/pre_3.0_instance_wrapper.rb

Instance Attribute Summary

Attributes inherited from Veneer::Base::InstanceWrapper

#instance, #options

Instance Method Summary collapse

Methods inherited from Veneer::Base::InstanceWrapper

#==, #class, #initialize, #method_missing, #update!

Constructor Details

This class inherits a constructor from Veneer::Base::InstanceWrapper

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Veneer::Base::InstanceWrapper

Instance Method Details

#save!Object



9
10
11
12
13
14
15
# File 'lib/veneer/adapters/activerecord/instance_wrapper.rb', line 9

def save!
  if instance.save
    true
  else
    raise ::Veneer::Errors::NotSaved
  end
end

#update(attributes = {}) ⇒ Object



5
6
7
# File 'lib/veneer/adapters/activerecord/instance_wrapper.rb', line 5

def update(attributes = {})
  instance.update_attributes(attributes)
end