Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 1, 2012
  1. @fxn

    removes the deprecation of update_attribute

    fxn authored
    Applying the new policy here to not deprecate stuff in point releases.
  2. @fxn

    revises the deprecation warning of update_attribute

    fxn authored
    We have decided not to drop this important method in 4.0 and give
    it a longer deprecation cycle. On the other hand we do not expect
    to have update_column around for a long time, it is going to be
    replaced in favor of update_columns.
  3. @rafaelfranca

    Revert "Deprecating composed_of in ActiveRecord"

    rafaelfranca authored
    This reverts commit 44b313b.
  4. @jonleighton

    Revert "Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql."

    jonleighton authored
    This reverts commit a79bfa9.
    
    Conflicts:
    	activerecord/CHANGELOG.md
    
    We shouldn't introducing deprecations in point releases.
    It will be deprecated in 4.0 instead.
Commits on Jul 30, 2012
  1. @rafaelfranca

    Revert "Add update_columns and the suggestion of using update_columns

    rafaelfranca authored
    instead of update_column"
    
    This reverts commit 9fa06c3.
    
    This reverts commit 17a64de.
    
    This reverts commit def9c85, reversing
    changes made to 6b7d26c.
    
    Reason: This was supposed to be released with 3.2.7 before the
    suggestion to use update_column. Since it was not release now is not
    good to suggest to use another method because it will confusing the
    people.
Commits on Jul 28, 2012
  1. @fxn

    missing require: the AR session store depends on the AP abstract store

    fxn authored
    This require makes the dependency even more clear.
    In particular we are eager loading the session
    store but that does not work if AR is used
    outside Rails, this patch is preliminary work
    in fixing #7160.
Commits on Jul 27, 2012
  1. @rafaelfranca

    Only require the `:rails_env` task where is needed.

    rafaelfranca authored
    `:rails_env` tasks is not needed in all the tasks that depends of
    `load_config`, only in the tasks that uses `Rails.env`.
    
    Since `:rails_env` task set the `Rails.env` to be "development" if it is
    not set we don't need the `||` statements too
    
    Fix #7175.
Commits on Jul 26, 2012
  1. @tenderlove

    Merge branch '3-2-rel' into 3-2-stable

    tenderlove authored
    * 3-2-rel:
      updating release date
      bumping to 3.2.7
      updating the changelog
      * Do not convert digest auth strings to symbols. CVE-2012-3424
      updating the version
      updating changelogs
  2. @tenderlove

    bumping to 3.2.7

    tenderlove authored
Commits on Jul 25, 2012
  1. @parndt

    Suggest using update_columns instead of update_column.

    parndt authored
    update_column is deprecated in Rails 4.0 so it makes no sense to
    recommend adopting it only to require changing to update_columns
    in the very next release.
  2. @smartinez87 @parndt

    New #update_columns method.

    smartinez87 authored parndt committed
Commits on Jul 23, 2012
  1. @tenderlove

    updating the version

    tenderlove authored
Commits on Jul 20, 2012
  1. @jonleighton
Commits on Jul 17, 2012
  1. @jfirebaugh

    AR::Integration must be included after AM::Conversion

    jfirebaugh authored
    Integration's definition of #to_param must override
    Conversion's. Otherwise, there is a regression from
    3.1 in the behavior of a non-persisted AR::Base instance
    which nevertheless has an id.
  2. @rafaelfranca

    Merge pull request #4396 from kennyj/fix_4259

    rafaelfranca authored
    Fix GH #4259. When we execute schema dumper, we must remove table_name_prefix and table_name_suffix.
Commits on Jul 13, 2012
  1. @jeremycole
  2. @jeremycole

    Only use prepared statements when bind variables are present

    jeremycole authored
    Prepared statements (prepare/execute/close) were being used unnecessarily
    when no bind variables were present, and disabling prepared statement using
    prepared_statements:false was principally broken. While bind variables were
    correctly substituted with prepared_statements:false, the prepared statement
    interface was still used, costing an extra two round trips per query.
    
    In addition to making this behavioral change, I also cleaned up the internals
    of exec_stmt and exec_without_stmt so that they behave the same (calling log
    and constructing the ActiveRecord::Result in the same way).
    
    Moving the check for binds.empty? to exec_query also will mean that several
    code paths explicitly calling exec_without_stmt could be cleaned up to once
    again call exec_query instead. I have also left the check for binds.empty? in
    exec_stmt, since it is not a private method and could be called directly with
    an empty binds array. For the sake of clarity in this patch, I have not made
    those changes.
    
    = The previous behavior =
    
    When issuing a Foo.find(1) with prepared_statements:true, the bind variable
    is present in the prepared query, and execute shows a value passed:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = ? LIMIT 1
        Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Close stmt
        Quit
    
    When issuing a Foo.find(1) with prepared_statements:false, the bind variable
    has already been removed and substituted with the value, but the prepared
    statement interface is used anyway:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Close stmt
        Quit
    
    = With this patch applied =
    
    When issuing a Foo.find(1) with prepared_statements:true, the bind variable
    is present in the prepared query, and execute shows a value passed:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = ? LIMIT 1
        Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Close stmt
        Quit
    
    When issuing a Foo.find(1) with prepared_statements:false, the bind variable
    has been removed and substituted with the value, and the query interface is
    used instead of the prepared statement interface:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Query	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Quit
Commits on Jul 11, 2012
  1. @robbkidd
Commits on Jul 6, 2012
  1. @rafaelfranca

    Merge pull request #6985 from sidonath/disable-query-cache-for-locks

    rafaelfranca authored
    Disable query cache for lock queries
    Conflicts:
    	activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
Commits on Jul 2, 2012
  1. Backport #3329 to 3-2-stable

    Francesco Rodriguez authored
    Fix bug with autosave collection association on new record with a marked
    for destroy record in autosave collection.
    
    Fixes #6918.
Commits on Jun 28, 2012
  1. @rafaelfranca

    Merge pull request #6878 from masarakki/master

    rafaelfranca authored
    fix bug in limit of enum columns of mysql
    
    Closes #6432
  2. @carlosantoniodasilva

    Merge pull request #6900 from cbandy/issue-6898

    carlosantoniodasilva authored
    Require URI in ConnectionSpecification
    Conflicts:
    	activerecord/lib/active_record/connection_adapters/connection_specification.rb
Commits on Jun 25, 2012
  1. @carlosantoniodasilva

    Ensure Arel columns are typecasted properly when grouping with calcul…

    carlosantoniodasilva authored
    …ation
    
    Fix build issue with postgresql.
    
    Conflicts:
    	activerecord/lib/active_record/relation/calculations.rb
    	activerecord/test/cases/calculations_test.rb
Commits on Jun 24, 2012
  1. @rafaelfranca

    Merge pull request #6842 from ernie/handle-non-strings-in-grouped-cal…

    rafaelfranca authored
    …culations
    
    Stop assuming strings for grouped calculations
    Conflicts:
    	activerecord/lib/active_record/relation/calculations.rb
Commits on Jun 21, 2012
  1. @rafaelfranca

    Merge branch 'acapilleri-update_nested_attributes'

    rafaelfranca authored
    Closes #6675
    
    Conflicts:
    	activerecord/lib/active_record/attribute_methods/dirty.rb
Commits on Jun 19, 2012
  1. @josevalim @rafaelfranca

    Merge pull request #6758 from caironoleto/master

    josevalim authored rafaelfranca committed
    Fixing load config in some tasks
    Conflicts:
    	activerecord/lib/active_record/railties/databases.rake
Commits on Jun 18, 2012
  1. @steveklabnik

    Deprecating composed_of in ActiveRecord

    steveklabnik authored
    This feature adds a lot of complication to ActiveRecord for dubious
    value. Let's talk about what it does currently:
    
    class Customer < ActiveRecord::Base
      composed_of :balance, :class_name => "Money", :mapping => %w(balance
    amount)
    end
    
    Instead, you can do something like this:
    
        def balance
          @balance ||= Money.new(value, currency)
        end
    
        def balance=(balance)
          self[:value] = balance.value
          self[:currency] = balance.currency
          @balance = balance
        end
    
    Since that's fairly easy code to write, and doesn't need anything
    extra from the framework, if you use composed_of today, you'll
    have to add accessors/mutators like that.
    
    This feature will be removed in Rails 4.
Commits on Jun 14, 2012
  1. @steveklabnik

    Deprecate update_attribute.

    steveklabnik authored
    Historically, update_attribute and update_attributes are similar, but
    with one big difference: update_attribute does not run validations.
    These two methods are really easy to confuse given their similar
    names. Therefore, update_attribute is being deprecated in favor of
    update_column, and will be removed in Rails 4.
    
    See the discussion on rails-core here:
    https://groups.google.com/d/topic/rubyonrails-core/BWPUTK7WvYA/discussion
Commits on Jun 12, 2012
  1. @tenderlove

    Merge branch '3-2-stable-rel' into 3-2-stable

    tenderlove authored
    * 3-2-stable-rel:
      updating changelogs
      bumping version numbers
      updating changelogs with security fixes
      updating changelogs
      Array parameters should not contain nil values.
      Additional fix for CVE-2012-2661
  2. @rafaelfranca

    Merge pull request #6676 from aurelian/master

    rafaelfranca authored
    Don't assign the attributes if the list is empty
Commits on Jun 11, 2012
  1. @tenderlove

    bumping version numbers

    tenderlove authored
  2. @ernie @tenderlove

    Additional fix for CVE-2012-2661

    ernie authored tenderlove committed
    While the patched PredicateBuilder in 3.1.5 prevents a user
    from specifying a table name using the `table.column` format,
    it doesn't protect against the nesting of hashes changing the
    table context in the next call to build_from_hash. This fix
    covers this case as well.
  3. @kennyj @tenderlove

    Fix GH #3163. Should quote database on mysql/mysql2.

    kennyj authored tenderlove committed
    Conflicts:
    
    	activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
  4. @rafaelfranca

    Merge pull request #6698 from yahonda/address_ora_911_master

    rafaelfranca authored
    Address ORA-00911 errors because of the heading underscore.
  5. @rafaelfranca

    Merge pull request #6521 from Empact/throw-result

    rafaelfranca authored
    Fix that #exists? can blow up with ThrowResult exception
    Conflicts:
    	activerecord/lib/active_record/relation/finder_methods.rb
Something went wrong with that request. Please try again.