Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jul 2, 2014
  1. Rafael Mendonça França
Commits on May 6, 2014
  1. Rafael Mendonça França
Commits on Oct 16, 2013
  1. Aaron Patterson

    updating changelogs

    tenderlove authored
Commits on Oct 10, 2013
  1. Rafael Mendonça França

    Revert "Merge pull request #12413 from arthurnn/inverse_of_on_build"

    rafaelfranca authored
    This reverts commit ccd11d5, reversing
    changes made to 54c05ac.
    
    Reason: This caused a regression when the associated record is created
    in a before_create callback. See
    #12413 (comment)
Commits on Sep 30, 2013
  1. Arthur Nogueira Neves
Commits on Sep 26, 2013
  1. Arthur Nogueira Neves

    fix inverse_of when find_or_initialize_by_*

    arthurnn authored
    inverse_of relation was not being set when calling find_or_initialize_by_ and the entry was
    found on the db.
Commits on Sep 25, 2013
  1. Rafael Mendonça França

    Merge pull request #12359 from arthurnn/inverse_on_callbacks

    rafaelfranca authored
    Make sure inverse_of is visible on the has_many callbacks
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/test/models/company.rb
Commits on Sep 12, 2013
  1. Rafael Mendonça França

    Fix FinderMethods#last unscoped primary key

    Eugene Kalenkovich authored rafaelfranca committed
    Fixes table.joins(:relation).last(N) breaking on sqlite
    
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/test/cases/finder_test.rb
Commits on Aug 5, 2013
  1. Kassio Borges
Commits on Jul 24, 2013
  1. Ben Woosley Rafael Mendonça França

    Tidy up the "Specified column type for quote_value" changes

    Empact authored rafaelfranca committed
    This includes fixing typos in changelog, removing a deprecated
    mocha/setup test require, and preferring the `column_for_attribute`
    accessor over direct access to the columns_hash in the new code.
    
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/lib/active_record/locking/optimistic.rb
  2. Alfred Wong Rafael Mendonça França

    Specified column type for quote_value

    alfredw authored rafaelfranca committed
    When calling quote_value the underlying connection sometimes requires
    more information about the column to properly return the correct quoted
    value.
    
    I ran into this issue when using optimistic locking in JRuby and the
    activerecord-jdbcmssql-adapter. In SQLSever 2000, we aren't allowed to
    insert a integer into a NVARCHAR column type so we need to format it as
    N'3' if we want to insert into the NVARCHAR type. Unfortuantely, without
    the column type being passed the connection adapter cannot properly return
    the correct quote value because it doesn't know to return N'3' or '3'.
    
    This patch is fairly straight forward where it just passes in the column
    type into the quote_value, as it already has the ability to take in the column,
    so it can properly handle at the connection level.
    
    I've added the tests required to make sure that the quote_value method
    is being passed the column type so that the underlying connection can
    determine how to quote the value.
    
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/lib/active_record/locking/optimistic.rb
Commits on Jul 23, 2013
  1. Alexander Karmes

    Fix merge error when Equality LHS is non-attribute.

    90yukke authored
    This is reworking of rails/rails#7380 made for rails 3.
Commits on Jul 22, 2013
  1. Rafael Mendonça França

    Update CHANGELOG entry

    rafaelfranca authored
Commits on Jul 16, 2013
  1. Rafael Mendonça França
Commits on Jul 15, 2013
  1. Yves Senn Rafael Mendonça França

    Merge pull request #11451 from jetthoughts/11450_do_not_resave_destro…

    senny authored rafaelfranca committed
    …yed_association
    
    Do not re-save destroyed association on saving parent object
    Conflicts:
    	activerecord/lib/active_record/autosave_association.rb
Commits on Jul 13, 2013
  1. Rafael Mendonça França
Commits on Jul 9, 2013
  1. Rafael Mendonça França

    Do not shallow the original exception in exec_cache

    rafaelfranca authored
    when result_error_field is not defined on result raise the original
    exception.
    
    Fixes #11260
Commits on Jun 26, 2013
  1. chapmajs Takehiro Adachi

    Allow global override of default STI inheritance column

    chapmajs authored take committed
    This change fixes a bug by which 3.2-STABLE users can't globally override the default STI inheritance column with `ActiveRecord::Base.inheritance_column = 'some_column'`. 3.2-STABLE users are forced to use a deprecated method or monkey patch it otherwise.
    
    Test case written by tkhr <takehiro0740@gmail.com>.
  2. Carlos Antonio da Silva
  3. Carlos Antonio da Silva

    Merge pull request #10373 from janko-m/fix-store-accessor

    carlosantoniodasilva authored
    Fix a bug in ActiveRecord::Store accessors
Commits on Jun 25, 2013
  1. Yves Senn

    Revert "Revert "Merge pull request #10901 from armstrjare/fix_query_n…

    senny authored
    …ull_foreign_key_on_new_record_collection_ids_reader""
    
    This reverts commit 5009b07.
    
    Also updated the CHANGELOG and adjusted the test-case to match the one on master.
Commits on Jun 22, 2013
  1. Yves Senn

    Revert "Merge pull request #10901 from armstrjare/fix_query_null_fore…

    senny authored
    …ign_key_on_new_record_collection_ids_reader"
    
    This reverts commit 6675d71, reversing
    changes made to 919d1a1.
    
    I missed to check the target branch and wrongly merged it into 3-2-stable directly.
  2. Yves Senn

    Merge pull request #10901 from armstrjare/fix_query_null_foreign_key_…

    senny authored
    …on_new_record_collection_ids_reader
    
    Fixes CollectionAssociation#ids_reader returning incorrect ids for new records
Commits on Jun 21, 2013
  1. Jared Armstrong
Commits on Jun 15, 2013
  1. Yves Senn

    Merge pull request #10925 from senny/10917_test_to_prevent_regression

    senny authored
    regression test + mysql2 adapter raises correct error if conn is closed.
    Conflicts:
    
    	activerecord/CHANGELOG.md
Commits on May 23, 2013
  1. Rafael Mendonça França

    Merge pull request #10713 from senny/10693_fix_primary_key_option_on_…

    rafaelfranca authored
    …has_many
    
    Fix the `:primary_key` option for `has_many` associations.
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/lib/active_record/associations/has_many_association.rb
Commits on May 18, 2013
  1. Johnny Holton

    destroys association records before saving/inserting new association …

    jholton authored
    …records
    
    This is a backport of #10417
    
    fixes bug introduced by  #3329
    These are the conditions necessary to reproduce the bug:
    - For an association, autosave => true.
    - An association record is being destroyed
    - A new association record is being created.
    - There is a unique index one of the association's fields.
    - The record being created has the same value as the record being
    destroyed on the indexed field.
    
    Before, the deletion of records was postponed until after all
    insertions/saves.  Therefore the new record with the identical value in
    the indexed field caused a non-unique value error to be thrown at the
    database
    level.
    
    With this fix, the deletions happen first, before the insertions/saves.
    Therefore the record with the duplicate value is gone from the database
    before the new record is created, thereby avoiding the non-uniuqe value
    error.
Commits on May 14, 2013
  1. Ben Woosley

    Backport a super-simplified version of #6792, fixing

    Empact authored
    that #exists? and others can produce invalid SQL: "SELECT DISTINCT DISTINCT"
    
    The combination of a :uniq => true association and the #distinct call
    in #construct_limited_ids_condition combine to create invalid SQL, because
    we're explicitly selecting DISTINCT, and also sending #distinct on to AREL,
    via the relation#distinct_value.
    
    Where #6792 was the forever fix, this is the minimal fix. Instead of
    properly indicating the distinctness of the query through #uniq_value alone,
    we use a literal select statement and set #uniq_value to always be falsey
Commits on May 12, 2013
  1. Rafael Mendonça França

    Improve CHANGELOG entries

    rafaelfranca authored
    [ci skip]
  2. Rafael Mendonça França

    Merge pull request #7695 from benolee/backport_cc7dd66_and_c0ba0f0

    rafaelfranca authored
    backport runner fixes to 3-2-stable
    
    Conflicts:
    	railties/CHANGELOG.md
  3. Andrew Horner

    Preserve context for joins while merging relations

    ahorner authored
    This is a backport of #10164, already merged into
    master. The issue is described in lengthy detail
    in issues #3002 and #5494.
Commits on May 11, 2013
  1. Daniel Schierbeck

    Don't try to EXPLAIN select_db calls

    dasch authored
    Now with a non-broken test.
Commits on May 9, 2013
  1. Rafael Mendonça França

    Revert "Merge pull request #8209 from senny/backport_8176"

    rafaelfranca authored
    This reverts commit 7240202, reversing
    changes made to e4e2bcc.
    
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/lib/active_record/relation/calculations.rb
    	activerecord/test/cases/calculations_test.rb
    
    Reason: This caused a regression since it changed the behavior in a
    stable release.
    
    Fixes #9777
Commits on May 7, 2013
  1. Rafael Mendonça França

    Merge pull request #10489 from greenriver/ar_counter_cache_multiple_d…

    rafaelfranca authored
    …estroy
    
    Confirm a record has not already been destroyed before decrementing counter cache
    
    Conflicts:
    	activerecord/CHANGELOG.md
    
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/lib/active_record/associations/builder/belongs_to.rb
Commits on Apr 29, 2013
  1. Janko Marohnić
Something went wrong with that request. Please try again.