1. 13
  1.  

  2. 1

    I really hope they can manage to get all the postgresql range type support merged in for this release.

    1. 1

      Is there anything specific that we haven’t merged yet?

      1. 1

        I would love to have some input on https://github.com/rails/rails/pull/7324

        I’m just not well-versed enough in PG/AR to know what the right approach is here, but I really want pg’s geotypes in Rails.

        1. 1

          Yeah I don’t know either. :/

    2. 1

      By calling first in previous versions of Rails, a simple LIMIT 1 would be added to the generated SQL query. This does not guarantee the record with the lowest primary key is returned.

      Calling first in Rails 4 will add an implicit order to the SQL query. This ensures the record with the lowest primary key is returned first.

      Is there anything that’s equivalent to the previous behavior? I always used first when I knew my query will only return one row, so I don’t want to ORDER BY id

      1. 1

        Found it. It’s called take, a very apt name IMO.

        https://github.com/mhfs/rails/commit/1379375f93c53d4c49fa8592b6117c3ade263f2e