1. 21 10月, 2012 1 次提交
  2. 20 10月, 2012 1 次提交
    • J
      Get rid of the ActiveRecord::Model::DeprecationProxy thing. · 83846838
      Jon Leighton 提交于
      I think it's going to be too much pain to try to transition the
      :active_record load hook from executing against Base to executing
      against Model.
      
      For example, after Model is included in Base, and modules included in
      Model will no longer get added to the ancestors of Base.
      
      So plugins which wish to be compatible with both Model and Base should
      use the :active_record_model load hook which executes *before* Base gets
      loaded.
      
      In general, ActiveRecord::Model is an advanced feature at the moment and
      probably most people will continue to inherit from ActiveRecord::Base
      for the time being.
      83846838
  3. 19 10月, 2012 3 次提交
  4. 17 10月, 2012 1 次提交
  5. 16 10月, 2012 3 次提交
  6. 14 10月, 2012 1 次提交
  7. 12 10月, 2012 1 次提交
  8. 08 10月, 2012 1 次提交
  9. 05 10月, 2012 1 次提交
  10. 04 10月, 2012 2 次提交
    • R
      Fix CHANGELOG entry [ci skip] · d7d22840
      Rafael Mendonça França 提交于
      d7d22840
    • F
      Count returns 0 without querying if parent is not saved · aa202adf
      Francesco Rodriguez 提交于
      Patches `CollectionAssociation#count` to return 0 without querying
      if the parent record is new. Consider the following code:
      
          class Account
            has_many :dossiers
          end
      
          class Dossier
            belongs_to :account
          end
      
          a = Account.new
          a.dossiers.build
      
          # before patch
          a.dossiers.count
          # SELECT COUNT(*) FROM "dossiers" WHERE "dossiers"."account_id" IS NULL
          # => 0
      
          # after
          a.dosiers.count # fires without sql query
          # => 0
      
      Fixes #1856.
      aa202adf
  11. 02 10月, 2012 1 次提交
  12. 29 9月, 2012 3 次提交
  13. 24 9月, 2012 1 次提交
  14. 22 9月, 2012 1 次提交
  15. 21 9月, 2012 3 次提交
  16. 20 9月, 2012 1 次提交
  17. 19 9月, 2012 2 次提交
  18. 18 9月, 2012 1 次提交
  19. 17 9月, 2012 3 次提交
  20. 16 9月, 2012 2 次提交
  21. 14 9月, 2012 1 次提交
    • D
      Moves column dump specific code to a module included in AbstractAdapter · 4544d2bc
      Dan McClain 提交于
      Having column related schema dumper code in the AbstractAdapter. The
      code remains the same, but by placing it in the AbstractAdapter, we can
      then overwrite it with Adapter specific methods that will help with
      Adapter specific data types.
      
      The goal of moving this code here is to create a new migration key for
      PostgreSQL's array type. Since any datatype can be an array, the goal is
      to have ':array => true' as a migration option, turning the datatype
      into an array. I've implemented this in postgres_ext, the syntax is
      shown here: https://github.com/dockyard/postgres_ext#arrays
      
      Adds array migration support
      
      Adds array_test.rb outlining the test cases for array data type
      Adds pg_array_parser to Gemfile for testing
      Adds pg_array_parser to postgresql_adapter (unused in this commit)
      
      Adds schema dump support for arrays
      
      Adds postgres array type casting support
      
      Updates changelog, adds note for inet and cidr support, which I forgot to add before
      
      Removing debugger, Adds pg_array_parser to JRuby platform
      
      Removes pg_array_parser requirement, creates ArrayParser module used by
      PostgreSQLAdapter
      4544d2bc
  22. 13 9月, 2012 1 次提交
  23. 12 9月, 2012 2 次提交
  24. 09 9月, 2012 2 次提交
    • E
      Raise MissingAttributeError on query methods · 4f107da4
      Ernie Miller 提交于
      When calling a query method on an attribute that was not selected by
      an ActiveRecord query, an ActiveModel::MissingAttributeError is not
      raised. Instead, a nil value is returned, which will return false once
      cast to boolean.
      
      This is undesirable, as we should not give the impression that we know
      the attribute's boolean value when we haven't loaded the attribute's
      (possibly) non-boolean value from the database.
      
      This issue is present on versions going back as far as 2.3, at least.
      4f107da4
    • F
      improve AR CHANGELOG [ci skip] · 65ce6fb0
      Francesco Rodriguez 提交于
      65ce6fb0
  25. 08 9月, 2012 1 次提交