Skip to content

Instantly share code, notes, and snippets.

@chrisun
Created February 6, 2010 17:53
Show Gist options
  • Save chrisun/296854 to your computer and use it in GitHub Desktop.
Save chrisun/296854 to your computer and use it in GitHub Desktop.
before_save :do_something
def do_something
self.attr_c = self.attr_a < self.attr_b
end
# this works, note that we add logging to the last line.
def do_something
self.attr_c = self.attr_a < self.attr_b
logger.debug 'some message'
end
def do_something
self.attr_c = self.attr_a < self.attr_b
true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment