Am a security enthusiast and a total noob to RoR. Now there is this blog i came across regarding SQL Injections in RoR with Active Records in place.
However the blog itself dates back to Jan 2013. Nevertheless, I tried to replicate the SQLi in a test environment with Rails 4.2 and ActiveRecord 4.2.
I tried using:
User.find_by_name("kotori", :select => "id, name")
from the blog above but I received the following error:
ArgumentError: wrong number of arguments (2 for 1)
Thought process: Since the blog is pretty old, may be it's a deprecated feature as per my test setup. Now the blog was from Jan 13, so I took the active record build from Dec 2012 from here thinking that the code snippet above will definitely work at least in this release, but the error was the same. Moreover, I also tried going through the documentation of the same here but this also does not give any insight into the code snippet in question.
Now what am I missing here? Is it that the blog mentioned above itself is non-trustworthy or is it that am really dumb :)