Link to home
Start Free TrialLog in
Avatar of Jonesey007
Jonesey007

asked on

RoR Find using Conditions, or find_by_sql?

Hi, im trying to query my database and am passing a type variable with value "Hardware", a manufacturer variable with value of "Dell and an invoice variable with value of "SI11244"

Here is the url im putting into my browser:
http://localhost:3000/assets/findbyparams?manufacturer=Dell&type=Hardware&invoice=SI11244

i have a findbyparams method in my controller but have no idea how to put these values into a find statement to return the aassets where the TYPE column equals "Hardware, the MANUFACTURER column equals "Dell" and INVOICE column equals "SI11244"

thanks
ASKER CERTIFIED SOLUTION
Avatar of wesgarrison
wesgarrison
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial