Skip to content

Instantly share code, notes, and snippets.

@wuputah
Created February 10, 2009 03:27
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 wuputah/61211 to your computer and use it in GitHub Desktop.
Save wuputah/61211 to your computer and use it in GitHub Desktop.
def attributes=(attributes = {})
attributes.each_pair do |k, v|
self.send("#{k}=", attributes.delete(k)) unless self.has_attribute?(k)
end
super(attributes)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment