Skip to content

Rodrigo Urubatan – 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: activerecord

Beware of rails default_scope – it might come back to bite you

Posted on 2019-05-23 by Rodrigo Urubatan

Beware of default scope, most of the times it appears to be helpful, it will just be causing you hidden bugs to deal with later

Read more

Simple and easy way to use ActiveRecord without Rails

Posted on 2019-05-21 by Rodrigo Urubatan

After a question in my other post about how to use sidekiq without rails, I decided to also post here how to use ActiveRecord without Rails, the basic idea is the same, we’ll start with an empty directory and create the files as we need.

Read more

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

Posted on 2018-10-15 by Rodrigo 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

Have you ever needed to provide an “advanced search” to your users?

Posted on 2018-09-05 by Rodrigo Urubatan

Working on a project some time ago, and my boss wanted to have an advanced search, where the users could write the search, adding fields, values, like you can do with google, but tailored for our application. In google you can do things like searching for all posts from sobrecodigo.com that have Ruby in the…

Read more

Rails Quick Tip: URL Validation for ActiveRecord

Posted on 2018-08-29 by Rodrigo 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

Recent posts

  • Why Embrace Nesting in Ruby Modules?
  • An easy way to have a local “Github Copilot” for free
  • SPA without touching Javascript – The magic of Ruby on rails and Hotwire
  • I see Dead Jobs everywhere (sidekiq DeadSet)
  • Quick tips that help: rails notes

Arquives

  • May 2024
  • April 2024
  • February 2023
  • January 2023
  • December 2022
  • June 2021
  • March 2020
  • January 2020
  • July 2019
  • June 2019
  • May 2019
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • February 2018
  • January 2018
  • November 2017
  • August 2015
  • August 2014
  • July 2014
  • August 2007

Categories

  • AI
  • articles
  • cfp
  • firebase
  • gems
  • git
  • opinion
  • presentations
  • projects
  • rails6
  • ruby
  • Sem categoria
  • server-api
  • tutorials
  • Uncategorized
© 2025 Rodrigo Urubatan – About Code | Powered by Minimalist Blog WordPress Theme