Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Feb 5, 2015
  1. @bigxiang

    Bump to 1.2.3

    bigxiang authored
  2. @bigxiang

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

    bigxiang authored
    …y_and_ci_env
    
    Support the latest 4-2-stable and 4.1.9+
  3. @bigxiang

    [ci skip] Edit change log.

    bigxiang authored
  4. @bigxiang

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

    bigxiang authored
    - build_select uses 1 argument now.
  5. @bigxiang

    Revert the change for 4.1.

    bigxiang authored
  6. @bigxiang

    Change Ruby versions for CI.

    bigxiang authored
  7. @bigxiang

    Fix Rails 4.2 spec error.

    bigxiang authored
  8. @bigxiang
Commits on Jan 8, 2015
  1. @danielrhodes

    Backwards compatibility fix for Active Record 4.1

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

    Update active_record.rb

    danielrhodes authored
  2. @danielrhodes

    Update active_record.rb

    danielrhodes authored
  3. @danielrhodes
  4. @danielrhodes

    Update relation_extensions.rb

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

    Bump to 1.2.2

    bigxiang authored
  2. @bigxiang

    Prepare to release 1.2.2

    bigxiang authored
Commits on Oct 26, 2014
  1. @bigxiang
  2. @bigxiang

    Improve readme.

    bigxiang authored
  3. @bigxiang
Commits on Aug 4, 2014
  1. @bigxiang

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

    bigxiang authored
    …ails40
    
    Ordering sequence is now correct when chaining multiple order methods in Rails 4.0 stable branch
  2. @bigxiang

    Ordering sequence is now correct when chaining multiple order methods…

    bigxiang authored
    … 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
Commits on Jul 29, 2014
  1. @bigxiang

    Merge pull request #327 from activerecord-hackery/preload_error

    bigxiang authored
    Fix error when when including HABTM or HMT associations without eager lo...
  2. @bigxiang

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

    bigxiang authored
    … loading.
    
    Fixes #326.
    
    Examples:
    
        Article.includes{tags}.to_a
        Person.includes{authored_article_comments}.to_a
  3. @bigxiang
  4. @estum @bigxiang

    Fix NoMethodError when calling unscope method above Rails 4

    estum authored bigxiang committed
    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>
Commits on Jul 25, 2014
  1. @bigxiang

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

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

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

    bigxiang authored
    …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"
Commits on Jul 22, 2014
  1. @ernie

    Add Xiang Li to authors

    ernie authored
Commits on Jul 20, 2014
  1. @bigxiang

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

    bigxiang authored
    …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, ...}
Commits on Jul 18, 2014
  1. @bigxiang

    Bump to 1.2.1

    bigxiang authored
  2. @bigxiang

    Properly append binds from subqueries and associations with PostgreSQL.

    bigxiang authored
    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.
Commits on Jul 16, 2014
  1. @bigxiang
  2. @bigxiang

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

    bigxiang authored
    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)) }
  3. @bigxiang

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

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

    Bump to 1.2.0

    bigxiang authored
Something went wrong with that request. Please try again.