Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Model callbacks. #20

Closed
antico5 opened this issue Aug 22, 2014 · 3 comments
Closed

Model callbacks. #20

antico5 opened this issue Aug 22, 2014 · 3 comments
Assignees

Comments

@antico5
Copy link
Contributor

antico5 commented Aug 22, 2014

I would like to have a class method to define some other methods to be called after or before the update, create or save actions.

class Account < ActiveForce::SObject
  before_save :set_default_values

  private

  def set_default_values
    self.some_field = 0
  end

end
@LyricL-Gitster
Copy link
Contributor

+1

@olvap olvap self-assigned this Aug 26, 2014
@olvap
Copy link
Contributor

olvap commented Aug 26, 2014

I'll be working in to add active model callbacks to the gem.

@DanOlson
Copy link
Contributor

👍

@olvap olvap closed this as completed Aug 28, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants