stewart715
stewart715

Reputation: 5647

standard sql queries in rails

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

Answers (1)

gregspurrier
gregspurrier

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

Related Questions