Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Feb 1, 2015
  1. @tenderlove

    Merge branch 'master' into mdluo-master

    tenderlove authored
    * master:
      Move required error message and changelog to Active Record
      Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
      Use Module#include instead of send :include, since now is a public method [ci skip]
      :scissors: warning from controller renderer test
    
    Conflicts:
    	activerecord/CHANGELOG.md
Commits on Sep 22, 2014
  1. @tenderlove

    add a truncate method to the connection

    tenderlove authored
    it doesn't work on SQLite3 since it doesn't support truncate, but that's
    OK.  If you call truncate on the connection, you're now bound to that
    database (same as if you use hstore or any other db specific feature).
Commits on Mar 13, 2014
  1. @tenderlove

    passing an instance of an AR object to `find` is deprecated

    tenderlove authored
    please pass the id of the AR object by calling `.id` on the model first.
  2. @tenderlove

    passing an ActiveRecord object to `exists?` is deprecated.

    tenderlove authored
    Pass the id of the object to the method by calling `.id` on the AR
    object.
Commits on Feb 25, 2014
  1. @tenderlove

    let `insert_record` actuall save the object.

    tenderlove authored
    `before_add` callbacks are fired before the record is saved on
    `has_and_belongs_to_many` assocations *and* on `has_many :through`
    associations.  Before this change, `before_add` callbacks would be fired
    before the record was saved on `has_and_belongs_to_many` associations, but
    *not* on `has_many :through` associations.
    
    Fixes #14144
Commits on Oct 2, 2013
  1. @tenderlove
Commits on Sep 18, 2013
  1. @tenderlove

    ActiveRecord::Base#<=> has been removed. Primary keys may not be in o…

    tenderlove authored
    …rder,
    
    or even be numbers, so sorting by id doesn't make sense.  Please use `sort_by`
    and specify the attribute you wish to sort with.  For example, change:
    
      Post.all.to_a.sort
    
    to:
    
      Post.all.to_a.sort_by(&:id)
Commits on Jun 13, 2013
  1. @tenderlove

    Ambiguous reflections are on :through relationships are no longer sup…

    tenderlove authored
    …ported.
    
    For example, you need to change this:
    
      class Author < ActiveRecord::Base
        has_many :posts
        has_many :taggings, :through => :posts
      end
    
      class Post < ActiveRecord::Base
        has_one :tagging
        has_many :taggings
      end
    
      class Tagging < ActiveRecord::Base
      end
    
    To this:
    
      class Author < ActiveRecord::Base
        has_many :posts
        has_many :taggings, :through => :posts, :source => :tagging
      end
    
      class Post < ActiveRecord::Base
        has_one :tagging
        has_many :taggings
      end
    
      class Tagging < ActiveRecord::Base
      end
Commits on Dec 5, 2012
  1. @tenderlove

    Merge branch 'joshsusser-master' into merge

    tenderlove authored
    * joshsusser-master:
      style cleanup
      Add migration history to schema.rb dump
      Add metadata to schema_migrations
    
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/lib/active_record/schema.rb
Commits on Mar 8, 2012
  1. @tenderlove

    Merge pull request #5162 from kennyj/schema_cache_dump

    tenderlove authored
    [Proposal] Schema cache dump
Commits on Jan 25, 2012
  1. @tenderlove

    The primary key is always initialized in the @attributes hash to nil …

    tenderlove authored
    …(unless
    
    another value has been specified).
Commits on Jan 10, 2012
  1. @tenderlove
Commits on Dec 30, 2011
  1. @tenderlove
Commits on Dec 20, 2011
  1. @tenderlove
  2. @tenderlove
Commits on Nov 29, 2011
  1. @tenderlove

    Automatic closure of connections in threads is deprecated. For example

    tenderlove authored
    the following code is deprecated:
    
    Thread.new { Post.find(1) }.join
    
    It should be changed to close the database connection at the end of
    the thread:
    
    Thread.new {
      Post.find(1)
      Post.connection.close
    }.join
    
    Only people who spawn threads in their application code need to worry
    about this change.
Something went wrong with that request. Please try again.