RubyFlow The Ruby and Rails community linklog

ActiveRecord count vs length vs size and what will happen if you use it the way you shouldn’t

One of the most common and most cumbersome errors you can make: using length instead of count. You can repeat this multiple times, but you will always find someone who’ll use it the way it shouldn’t be used. Here as a reminder: ActiveRecord count vs length vs size and what will happen if you use it the way you shouldn’t

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in