What Things We Can Define In The Model?
What Things We Can Define In The Model?
Here are some of the key things you can define in a Ruby on Rails model:
null: false
.validates :name, presence: true, length: { minimum: 3 }
has_many
, belongs_to
, has_one
, and has_and_belongs_to_many
associations. This allows you to easily access related data.scope :active, -...
middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào