Skip to content

Instantly share code, notes, and snippets.

@quirkey
Created February 5, 2009 14:32
Show Gist options
  • Select an option

  • Save quirkey/58732 to your computer and use it in GitHub Desktop.

Select an option

Save quirkey/58732 to your computer and use it in GitHub Desktop.
if Book.exists?(:title => title)
book = Book.find_by_title(title)
...
if book = Book.find_by_title(title)
...
eval("obj.#{methods[key]}")
obj.send(methods[key])
case note_type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment