Skip to content

Instantly share code, notes, and snippets.

@clarkware
Created April 11, 2012 17:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clarkware/2360627 to your computer and use it in GitHub Desktop.
Save clarkware/2360627 to your computer and use it in GitHub Desktop.
class Course < ActiveRecord::Base
def self.prototype(overrides={})
attributes = {
:code => 'ruby',
:title => 'Ruby Programming',
:active => true,
:released_on => 15.days.ago
}
new(attributes.merge(overrides))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment