KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got the following Model: class GuestCatering < ActiveRecord::Base # Validation validates :name, :presence => true validates :order_number, :presence => true validates :orderable, :presence => true end But when I'll try to update an existing GuestCatering with the following code: guest_catering.update_attributes(:orderable => false) The guest catering variable is a valid GuestCatering object. The guest_catering object has errors after the update, like that: <{[:orderable, ["can't be blank"]]=>nil}> But when i pass a orderable => true , everything is fine and no errors. What's wrong here, why can't i set orderable to false?
Tags (comma-separated)
Save Edits
Cancel