RubyFlow The Ruby and Rails community linklog

Returning unique records from an ActiveRecord query

Introduced in Rails 4.1, #distinct is a nice addition which moves you one more step away from writing custom SQL statements in your Rails project. https://christoph.luppri.ch/articles/2016/07/20/returning-unique-records-from-an-activerecord-query/

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