Rails: create objects with `has_one` relation and skip validation

I encountered with this situation today;

I have `spree_user` object which can have one `bill_address` but bill address has one filed called `zipcode` field which is required and needs to be valid but I might not always have valid data for that field.

So needed to skip the validation for create method. Found that its not possible to skip validation using `create` method.  Continue reading

Rails : how to handle : some field’s presence is mandory in some context but not always

You might stuble upon some situation like “how to handle : some field’s presence is mandory in some context but not always”. It is how I decided to handle such situation Continue reading