Question: Model's attributes are being failed validation when they are not passed

Question

Model's attributes are being failed validation when they are not passed

Answers 0
Added at 2016-12-29 15:12
Tags
Question

Is it logical that when I don't pass attributes' values, they failed the validation of the custom validation method, even though I am not trying to update them, however, the value is valid, and it was created successfully at the first place.

   Parameters: {"utf8"=>"✓", "id"=>"2", "shop"=>{"allowed_users"=>"5"}, "commit"=>"עדכן"}

The validation fails only for the custom validation method, for :shop_customer_id.

Answers
Source Show
◀ Wstecz