1. 03 3月, 2015 33 次提交
  2. 02 3月, 2015 7 次提交
    • R
      Test against the mail gem's edge · 5140c07c
      Robin Dupret 提交于
      The edge version ships with a patch that uses composition over
      inheritance for the Mail::PartsList object (see mikel/mail#782).
      Let's test Action Mailer against it to prevent eventual regressions
      and experience it.
      
      Moreover, this branch makes the Action Mailer suite green against
      Rubinius.
      5140c07c
    • C
      Merge pull request #19170 from... · f9ed46bf
      Carlos Antonio da Silva 提交于
      Merge pull request #19170 from JuanitoFatas/doc/active_record/connection_adapters/abstract/schema_definitions.rb
      
      Clarify that t.references and t.belongs_to are interchangeable. [ci skip]
      f9ed46bf
    • A
      call `sync_with_transaction_state` inside `persisted?` then check ivars · 57d35b2b
      Aaron Patterson 提交于
      directly
      
      calling `sync_with_transaction_state` is not fast, so if we call it
      once, we can improve the performance of the `persisted?` method.  This
      is important because every call to `url_for(model)` will call
      `persisted?`, so we want that to be fast.
      
      Here is the benchmark:
      
      ```ruby
      require 'active_record'
      
      ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
      
      ActiveRecord::Base.connection.instance_eval do
        create_table(:articles)
      end
      
      class Article < ActiveRecord::Base; end
      article = Article.new.tap(&:save!)
      
      Benchmark.ips do |x|
        x.report("persisted?") do
          article.persisted?
        end
      end
      ```
      
      Before this patch:
      
      ```
      $ bundle exec ruby -rbenchmark/ips persisted.rb
      Calculating -------------------------------------
                persisted?     3.333k i/100ms
      -------------------------------------------------
                persisted?     51.037k (± 8.2%) i/s -    253.308k
      ```
      
      After:
      
      ```
      $ bundle exec ruby -rbenchmark/ips persisted.rb
      Calculating -------------------------------------
                persisted?     7.172k i/100ms
      -------------------------------------------------
                persisted?    120.730k (± 5.1%) i/s -    602.448k
      ```
      57d35b2b
    • A
      remove useless instance variable · 10058ea2
      Aaron Patterson 提交于
      depth is always 0, so the index will always be false.  No reason to
      create the instance variable if it isn't used
      10058ea2
    • E
      Merge pull request #19169 from hjoo/rake_restart · 230393a5
      Eileen M. Uchitelle 提交于
      Rake restart task no longer loads entire Rails environment when run
      230393a5
    • J
    • H
      Rake restart task no longer loads entire Rails environment when run. · beaf8cba
      Hyonjee Joo 提交于
      The restart task does not need access to models or other classes and
      helpers from the application environment.
      beaf8cba