Skip to content

Instantly share code, notes, and snippets.

@softwaregravy
Created August 15, 2011 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softwaregravy/1147958 to your computer and use it in GitHub Desktop.
Save softwaregravy/1147958 to your computer and use it in GitHub Desktop.
class MyModel < ActiveRecord::Base
before_create :action_1
before_create :action_2 # might depend on action_1
def action_1
self.mydata = "default"
end
def action_2
self.mycomplexdata = default + "more data"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment