Skip to content

Instantly share code, notes, and snippets.

@adelevie
Created May 3, 2010 00:05
Show Gist options
  • Select an option

  • Save adelevie/387570 to your computer and use it in GitHub Desktop.

Select an option

Save adelevie/387570 to your computer and use it in GitHub Desktop.
user = User.find(:all, :conditions => "users.name = 'Alan'")[0]
User.attribute_names.each {|attribute| user.method(attribute).call}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment