Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jun 3, 2014
  1. @laurocaetano
Commits on May 21, 2014
  1. @laurocaetano

    Fix polymorphic eager load with foreign_key as String.

    laurocaetano authored
    The foreign_key could be `String` and just doing `owners_map[owner_key]`
    could return `nil`.
    To prevent this bug, we should `to_s` both keys if their types are
    different.
    
    Fixes #14734.
Commits on Apr 11, 2014
  1. @laurocaetano

    The comparison between `Relation` and `CollectionProxy` should be con…

    laurocaetano authored
    …sistent.
    
    Example:
    
        author.posts == Post.where(author_id: author.id)
        # => true
          Post.where(author_id: author.id) == author.posts
        # => true
    
    Fixes #13506
Commits on Apr 3, 2014
  1. @laurocaetano

    Fix error when using `with_options` with lambda.

    laurocaetano authored
    It was causing error when using `with_options` passing a lambda as its
    last argument.
    
        class User < ActiveRecord::Base
          with_options dependent: :destroy do |assoc|
            assoc.has_many :profiles, -> { where(active: true) }
          end
        end
    
    It was happening because the `option_merger` was taking the last
    argument and checking if it was a Hash. This breaks the HasMany usage,
    because its last argument can be a Hash or a Proc.
    
    As the behavior described in this test:
    https://github.com/rails/rails/blob/master/activesupport/test/option_merger_test.rb#L69
    the method will only accept the lambda, this way it will keep the expected behavior. See 9eaa0a3
Commits on Jan 31, 2014
  1. @laurocaetano

    Associations now raise `ArgumentError` on name conflicts.

    laurocaetano authored
    Dangerous association names conflicts include instance or class
    methods already defined by `ActiveRecord::Base`.
Commits on Dec 17, 2013
  1. @laurocaetano

    Create a blacklist to disallow mutator methods to be delegated to `Ar…

    laurocaetano authored
    …ray`.
    
    This change was necessary because the whitelist wouldn't work.
    It would be painful for users trying to update their applications.
    
    This blacklist intent to prevent odd bugs and confusion in code that call mutator
    methods directely on the `Relation`.
Commits on Dec 12, 2013
  1. @laurocaetano

    Add changelog

    laurocaetano authored
Commits on Dec 3, 2013
  1. @laurocaetano

    Fix offset with last.

    laurocaetano authored
    Closes #7441
Commits on Oct 25, 2013
  1. @laurocaetano
Something went wrong with that request. Please try again.