In Rails, when I want to find by a user given value and avoid SQL injection (escape apostrophes and the like) I can do something like this:
Post.all(:conditi
Yes, it does. Only the second one is dangerous.
+1 @fphilipe and @yuval Check this 5 min video from railscast and this one from rails guide
One good reference from the RoR Guides.