#ruby
Read more stories on Hashnode
Articles with this tag
It’s interesting to discover that Ruby has an instance method itself for the object. It returns the receiver itself—whatever the kind of receiver...
When you happen to check if the attribute's value is unique before it is saved, you can use active record validation helper uniqueness. class User <...
In my use case, I have to validate age from a date of birth in the model. The date of birth can be either a string or a date object. As I think the...