Cần trợ giúp để hiểu mã này, như những gì tôi biết "< <" nối thêm vào bộ sưu tập nhưng ở đây nó lưu bản ghi một cách chính xác. .save phương pháp?đường ray - di chuyển sang trái "<<" nhà điều hành lưu bản ghi tự động
#user.rb
has_many :saved_properties, through: :property_saves, source: :property
#users_controller.rb
def update
if @user.saved_properties << Property.find(params[:saved_property_id])
render plain: "Property saved"
end