Answer the question
In order to leave comments, you need to log in
Ruby, what are you?
class Client < ApplicationRecord
has_one :address
has_many :orders
has_and_belongs_to_many :roles
end
Answer the question
In order to leave comments, you need to log in
In the above code, you are using 99% Rails, not Ruby.
apidock.com/rails/v4.2.1/ActiveRecord/Associations...
apidock.com/rails/v4.2.1/ActiveRecord/Associations...
apidock.com/rails/v4.2.1/ActiveRecord/Associations...
Question tagged as "the answer is easily found by a search engine"
This is the magic of rails.
Smoke rusrails.ru or guides.rubyonrails.org from the very beginning.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question