Answer the question
In order to leave comments, you need to log in
How to correctly form a request for rails?
Two models. User(has_many :orders) and Order(belongs_to :user). How to beautifully and briefly form an sql query to get the Order model with its attributes, adding user.name to them. For a request, we have a value for order.id.
Answer the question
In order to leave comments, you need to log in
Under to form sql request crude SQL or the ActiveRecord-construction mean?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question