About Code

Helping ruby developers to use the best tools for each job so they can solve hard problems, with less bugs and have more free time.

Menu
  • Home
  • My last presentations
  • About
  • Privacy Policy
Menu

Tag: validation

Do not trust ActiveRecord data consistency validations, delegate that to the database

Posted on October 15, 2018 by urubatan

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…

Read more

Rails Quick Tip: URL Validation for ActiveRecord

Posted on August 29, 2018August 29, 2018 by urubatan

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…

Read more

service_status_dashboard – a simple way to monitor your services, without using any external services

Posted on August 1, 2018August 2, 2018 by urubatan

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…

Read more

Receive the latest posts by email!

Last posts

  • Do not trust ActiveRecord data consistency validations, delegate that to the database
  • What do you need to know to put your app in production in Ruby, Python, .NET, Java, …
  • Have you ever needed to provide an “advanced search” to your users?
  • The easiest way to use sidekiq without Rails
  • Rails Quick Tip: URL Validation for ActiveRecord

Search

© 2019 About Code | WordPress Theme by Superb WordPress Themes