Skip to content
Commits on Feb 5, 2015
  1. @bigxiang

    Bump to 1.2.3

    bigxiang committed Feb 5, 2015
  2. @bigxiang

    Merge pull request #360 from activerecord-hackery/new_rails_dependenc…

    …y_and_ci_env
    
    Support the latest 4-2-stable and 4.1.9+
    bigxiang committed Feb 5, 2015
  3. @bigxiang

    [ci skip] Edit change log.

    bigxiang committed Feb 5, 2015
  4. @bigxiang

    Support 4.1.9+ and the latest 4-2-stable.

    - build_select uses 1 argument now.
    bigxiang committed Feb 5, 2015
  5. @bigxiang

    Revert the change for 4.1.

    bigxiang committed Feb 5, 2015
  6. @bigxiang

    Change Ruby versions for CI.

    bigxiang committed Jan 15, 2015
  7. @bigxiang

    Fix Rails 4.2 spec error.

    bigxiang committed Jan 15, 2015
  8. @bigxiang
Commits on Jan 8, 2015
  1. @danielrhodes @danielrhodes

    Backwards compatibility fix for Active Record 4.1

    Checks the size of the changed method to determine which arguments to
    provide.
    danielrhodes committed with danielrhodes Jan 8, 2015
Commits on Dec 20, 2014
  1. @danielrhodes

    Update active_record.rb

    danielrhodes committed Dec 20, 2014
  2. @danielrhodes

    Update active_record.rb

    danielrhodes committed Dec 20, 2014
  3. @danielrhodes
  4. @danielrhodes

    Update relation_extensions.rb

    Change for API update on ActiveRecord 4.2 (commit 08579e4078454c6058f1289b58bf5bfa26661376)
    danielrhodes committed Dec 20, 2014
Commits on Nov 25, 2014
  1. @bigxiang

    Bump to 1.2.2

    bigxiang committed Nov 25, 2014
  2. @bigxiang

    Prepare to release 1.2.2

    bigxiang committed Nov 25, 2014
Commits on Oct 26, 2014
  1. @bigxiang
  2. @bigxiang

    Improve readme.

    bigxiang committed Oct 27, 2014
  3. @bigxiang

    Fix specs to fit Rails updates.

    bigxiang committed Oct 26, 2014
Commits on Aug 4, 2014
  1. @bigxiang

    Merge pull request #328 from activerecord-hackery/order_sequence_in_r…

    …ails40
    
    Ordering sequence is now correct when chaining multiple order methods in Rails 4.0 stable branch
    bigxiang committed Aug 4, 2014
  2. @bigxiang

    Ordering sequence is now correct when chaining multiple order methods…

    … in Rails 4.0
    
    stable branch.
    
    Fixes #276.
    
    Example:
    
        Article.order {id.asc}.order {title.desc}.to_sql
        # => SELECT "articles".* FROM "articles" ORDER BY "articles".id ASC,
        #    "articles".title DESC
    bigxiang committed Aug 4, 2014
Commits on Jul 29, 2014
  1. @bigxiang

    Merge pull request #327 from activerecord-hackery/preload_error

    Fix error when when including HABTM or HMT associations without eager lo...
    bigxiang committed Jul 29, 2014
  2. @bigxiang

    Fix error when when including HABTM or HMT associations without eager…

    … loading.
    
    Fixes #326.
    
    Examples:
    
        Article.includes{tags}.to_a
        Person.includes{authored_article_comments}.to_a
    bigxiang committed Jul 29, 2014
  3. @bigxiang
  4. @estum @bigxiang

    Fix NoMethodError when calling unscope method above Rails 4

    Example:
    
        class User < ActiveRecord::Base
          scope :with_activity, ->{ where{(active == true) & (posts_count +
          comments_count >= 1)} }
        end
    
        User.with_activity.unscope(where: :active)
        # => NoMethodError: undefined method `symbol' for
        #<Squeel::Nodes::Operation:0x00000018bbf798>
    estum committed with bigxiang Jul 28, 2014
Commits on Jul 25, 2014
  1. @bigxiang

    Merge pull request #323 from activerecord-hackery/default-scope-issue…

    …-rails4
    
    Properly add 'AND' to generated SQL when joining through a polymorphic model with the source type configuration and default scopes above Rails 4.
    bigxiang committed Jul 25, 2014
Commits on Jul 24, 2014
  1. @bigxiang
  2. @bigxiang

    Properly add 'AND' to generated SQL when joining through a polymorphi…

    …c model
    
    with the source type configuration and default scopes above Rails 4.
    
    Fixes #270.
    
    Examples:
    
        class User < ActiveRecord::Base
          has_many :memberships, as: :member
          has_many :groups, through: :memberships
          has_many :packages, through: :groups
        end
    
        class Package < ActiveRecord::Base
          has_many :memberships, as: :member
        end
    
        class Membership < ActiveRecord::Base
          belongs_to :group
          belongs_to :member, polymorphic: true
    
          default_scope -> { where(active: true) }
    
          before_create :set_active
    
          def set_active
            self.active = true
          end
        end
    
        class Group < ActiveRecord::Base
          has_many :memberships
          has_many :users, through: :memberships, source: :member, source_type: 'User'
          has_many :packages, through: :memberships, source: :member, source_type: 'Package'
        end
    
        Group.joins{users}.to_sql
        # => SELECT "groups".* FROM groups
        #    INNER JOIN "memberships" ON "groups".id = "memberships"."group_id"
        #    AND "memberships"."active" = 't'
        #    AND "memberships"."member_type" = 'User'
        #    AND "memberships"."active" = 't'
        #    INNER JOIN "users" ON "users"."id" = "memberships"."member_id"
    bigxiang committed Jul 24, 2014
Commits on Jul 22, 2014
  1. @ernie

    Add Xiang Li to authors

    ernie committed Jul 22, 2014
Commits on Jul 20, 2014
  1. @bigxiang

    Size method can return the result correctly when grouping by the colu…

    …mn of a joined table.
    
    Fixes #286.
    
    Examples:
    
        before:
    
        Article.joins{person}.group{person.id}.size # => Error
    
        after:
    
        Article.joins{person}.group{person.id}.size
        # => {1=>3, 2=>3, 3=>3, ...}
    bigxiang committed Jul 20, 2014
Commits on Jul 18, 2014
  1. @bigxiang

    Bump to 1.2.1

    bigxiang committed Jul 18, 2014
  2. @bigxiang

    Properly append binds from subqueries and associations with PostgreSQL.

    The issue happens if there are more than 1 bind in the SQL. Fixes #272.
    
    Generate table names correctly when joining throught an association.
    Fixes #302.
    
    add mysql, mysql2, postgresql adapter to specs. It should make sure
    that Squeel would run against all these databases consistently.
    
    Extend travis scripts to support multiple adapters.
    bigxiang committed Jul 18, 2014
Commits on Jul 16, 2014
  1. @bigxiang
  2. @bigxiang

    Enable using Arel nodes in Squeel with "|" operator.

    Fixes #314
    
    Examples:
    
        User.where {
          (id.in([1,2,3]) | User.arel_table[:id].eq(1)) &
          ((id == 1) | User.arel_table[:id].not_eq(nil)) }
    bigxiang committed Jul 16, 2014
  3. @bigxiang

    Add a spec to prove that ActiveRecord::Relation should be returned after

    chaining with complex associations, joins and wheres. #315
    
    Examples:
    
      Note.first.notable.articles.
        joins(:comments).where{comments.article_id != nil}.first
      # => <Article>
    bigxiang committed Jul 16, 2014
  4. @bigxiang

    Bump to 1.2.0

    bigxiang committed Jul 16, 2014
Something went wrong with that request. Please try again.