A
A
Anton2016-11-07 23:11:22
Ruby on Rails
Anton, 2016-11-07 23:11:22

How to implement a selection of rows from the first table based on the WHERE of the second table?

The title is muddled. I'll explain now.
There are three models - News, NewsAndUser and User.
You need to display news that has such and such a user_id. user_id is passed through the address bar.
How to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2016-11-07
@hummingbird

guides.rubyonrails.org/active_record_querying.html...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question