Module: LetterPress::ProxyMethods
- Defined in:
- lib/letter_press.rb
Instance Method Summary collapse
Instance Method Details
#new ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/letter_press.rb', line 19 def new if @object.valid? @object else fail ActiveRecord::RecordInvalid.new(@object) end end |
#new! ⇒ Object
27 28 29 |
# File 'lib/letter_press.rb', line 27 def new! @object end |
#save ⇒ Object
31 32 33 |
# File 'lib/letter_press.rb', line 31 def save @object.tap { |record| record.save! } end |