Of course you can still use AR validations, that is not my point. But data consistency related validations should not trust AR for that, for example, if you have a “unique” constraint, and you are just trusting the database, it is really easy to break the DB consistency if for some reason you have a…
Tag: validation
Rails Quick Tip: URL Validation for ActiveRecord
I did a quick search, and didn’t find an easy way to validate URL fields. I tried writing my own regular expressions but they kept getting more complex every time, and I do not really like to write complex regexps (If I liked it I would be programming in PERL 😛 ) So I decided…
service_status_dashboard – a simple way to monitor your services, without using any external services
There are a lot of server monitoring services around, but sometimes you need to keep the things simple, for a number of reasons, for example: your infrastructure is too simple to pay for a more complicated service You just need a “ping” to know when your http server is responding you already have an “elastic…