Reputation: 5647
How do I do SQL queries in rails. For example if I want to take params from the users table in my database and match them against another table? Just need a starting ground. Really new to rails...
EDIT/
I'm not looking for a way to do raw SQL, I just want a way to use rails to harness my data (like how would a product selector work with categories, etc)
EDIT/
Basically, users are creating listings of items of things for sale and users (in their preferences pane) select the things that they want. I want to create a 'dashboard' that shows a list of items that other users have posted for sale that matches what they selected in their preferences.
Upvotes: 1
Views: 104
Reputation: 1458
Are you asking about how you perform joins with other tables? Rails makes this very easy through associations. Take a look at Rails Guides: ActiveRecord Associations
Upvotes: 2