1. 13 9月, 2012 7 次提交
  2. 12 9月, 2012 5 次提交
    • A
      warning removed. · 84a52c6c
      Arun Agrawal 提交于
      1. Unused variable
      2. possibly useless use of a variable in 
      void context
      84a52c6c
    • G
      fixed support for DATABASE_URL for rake db tasks · 148c50b4
      Grace Liu 提交于
      - added tests to confirm establish_connection uses DATABASE_URL and
        Rails.env correctly even when no arguments are passed in.
      - updated rake db tasks to support DATABASE_URL, and added tests to
        confirm correct behavior for these rake tasks.  (Removed
        establish_connection call from some tasks since in those cases
        the :environment task already made sure the function would be called)
      - updated Resolver so that when it resolves the database url, it
        removes hash values with empty strings from the config spec (e.g.
        to support connection to postgresql when no username is specified).
      148c50b4
    • B
      Accept belongs_to assoc. keys in ActiveRecord queries · 3da275c4
      beerlington 提交于
      Allows you to specify the model association key in a belongs_to
      relationship instead of the foreign key.
      
      The following queries are now equivalent:
      
      Post.where(:author_id => Author.first)
      Post.where(:author => Author.first)
      
      PriceEstimate.where(:estimate_of_type => 'Treasure', :estimate_of_id => treasure)
      PriceEstimate.where(:estimate_of => treasure)
      3da275c4
    • K
    • K
      Use native mysqldump command for 'rake db:structure:dump'. · ccc6910c
      kennyj 提交于
      ccc6910c
  3. 11 9月, 2012 1 次提交
    • J
      ConnectionPool, unify exceptions, ConnectionTimeoutError · 5b7cfc5e
      Jonathan Rochkind 提交于
      As a result of different commits, ConnectionPool had become
      of two minds about exceptions, sometimes using PoolFullError
      and sometimes using ConnectionTimeoutError. In fact, it was
      using ConnectionTimeoutError internally, but then recueing
      and re-raising as a PoolFullError.
      
      There's no reason for this bifurcation, standardize on
      ConnectionTimeoutError, which is the rails2 name and still
      accurately describes semantics at this point.
      
      History
      
      In Rails2, ConnectionPool raises a ConnectionTimeoutError if
      it can't get a connection within timeout.
      
      Originally in master/rails3, @tenderlove had planned on removing
      wait/blocking in connectionpool entirely, at that point he changed
      exception to PoolFullError.
      
      But then later wait/blocking came back, but exception remained
      PoolFullError.
      
      Then in 02b23355 pmahoney introduced fair waiting logic, and
      brought back ConnectionTimeoutError, introducing the weird bifurcation.
      
      ConnectionTimeoutError accurately describes semantics as of this
      point, and is backwards compat with rails2, there's no reason
      for PoolFullError to be introduced, and no reason for two
      different exception types to be used internally, no reason
      to rescue one and re-raise as another.  Unify!
      5b7cfc5e
  4. 10 9月, 2012 2 次提交
  5. 09 9月, 2012 4 次提交
  6. 08 9月, 2012 4 次提交
  7. 07 9月, 2012 2 次提交
  8. 06 9月, 2012 4 次提交
  9. 05 9月, 2012 3 次提交
  10. 03 9月, 2012 2 次提交
    • Y
      set the configured #inheritance_column on #become (#7503) · 20574956
      Yves Senn 提交于
      I had to create a new table because I needed an STI table,
      which does not have both a "type" and a "custom_type"
      
      the test fails with:
        1) Error:
      test_alt_becomes_works_with_sti(InheritanceTest):
      NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber">
          /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing'
          /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing'
          /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes'
          test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti'
          test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti'
      20574956
    • A
  11. 01 9月, 2012 1 次提交
  12. 31 8月, 2012 5 次提交