Sự khác nhau giữa create, save, và update_attributes?
Sự khác nhau giữa create, save, và update_attributes?
create: Tạo một object mới và lưu ngay vào DB. Trả về true/false tùy theo validate.
User.create(name: "A")
user = User.new(name: "A")
user....
middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào