- 22 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 21 6月, 2014 3 次提交
-
-
由 Zachary Scott 提交于
-
由 Zachary Scott 提交于
[ci skip] Add Tip for change_column_null and change_column_default in guides
-
由 Aditya Kapoor 提交于
-
- 20 6月, 2014 35 次提交
-
-
由 Matthew Draper 提交于
Make dependencies.rb add a name to NameError
-
由 Arthur Neves 提交于
-
由 Arthur Neves 提交于
-
由 Yves Senn 提交于
The :singleton-method: directive is printed in the docs. This directive is not necessary as the method is documentable just fine.
-
由 Yves Senn 提交于
Add to guides app and helper objects on command line
-
由 Matthew Draper 提交于
Fix state leak.
-
由 Sean Griffin 提交于
Remove extra list item element in engine guide
-
由 Ben Hicks 提交于
Cleaning up the list items that detail what an engines `--full` option generates. Joining a multiline multi list item into a multiline single list item. [ci skip]
-
由 Aaron Patterson 提交于
-
由 Rafael Mendonça França 提交于
Don't save through records twice Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/associations/has_many_through_associations_test.rb
-
由 Rafael Mendonça França 提交于
ErrorsController shouldn't inherit ApplicationController, but ActionController
-
由 Rafael Mendonça França 提交于
Always update counter caches in memory when adding records
-
由 Yuki Nishijima 提交于
Inheriting `ApplicationController` often causes an issue as it always has before/after actions. It should encourage to use `ActionController::Base` instead. [ci skip]
-
由 Rafael Mendonça França 提交于
Don't use `Column` for type casting in Relation calculations
-
由 Rafael Mendonça França 提交于
Don't use column object when calculating type cast defaults
-
由 Rafael Mendonça França 提交于
Don't use column object for type casting in `quoting`
-
由 Rafael Mendonça França 提交于
Don't rely on the column for type casting reflections
-
由 Rafael Mendonça França 提交于
Further simplify `changed?` conditional for numeric types
-
由 Rafael Mendonça França 提交于
remove unnecessary gsub for space in ActionView::Helpers#debug
-
由 Rafael Mendonça França 提交于
Introduce an object to aid in creation and management of `@attributes`
-
由 Sean Griffin 提交于
Mostly delegation to start, but we can start moving a lot of behavior in bulk to this object.
-
由 Mauro George 提交于
[ci skip]
-
由 Eileen M. Uchitelle 提交于
Create custom errors page on ActionController guides
-
由 Rafael Mendonça França 提交于
highlight/except support for regular expressions and blocks.
-
由 Lucas Mazza 提交于
The helper will yield each matched word, and you can use this instead of the ':highlighter' option for more complex replacing logic: highlight('My email is me@work.com', EMAIL_REGEXP) { |m| mail_to(m) } # => 'My email is <a href="mailto:me@work.com">me@work.com</a>'
-
由 Rafael Mendonça França 提交于
Don't include inheritance column in the through_scope_attributes
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Now the following case will work fine class Tag < ActiveRecord::Base end class Publisher::Article < ActiveRecord::Base has_and_belongs_to_many :tags end Fixes #15761
-
由 Jan Szumiec 提交于
-
由 Jan Szumiec 提交于
-
由 Rafael Mendonça França 提交于
Fix typo in 4.1 upgrade/flash structure
-
由 Dan Rice 提交于
-
由 Rafael Mendonça França 提交于
Relpace `=~ Regexp.new str` with `.include? str` in `_valid_action_name?`
-
由 Rafael Mendonça França 提交于
Remove unused block parameter from #gsub call in AM::MailHelper#block_format
-
由 Rafael Mendonça França 提交于
Add `logger.debug?` guard to `ActionMailer::LogSubscriber#process`
-
- 19 6月, 2014 1 次提交
-
-
由 Viktar Basharymau 提交于
*TLDR*: The method is 4 times faster when log level is higher than DEBUG. Also, the other two methods, `#deliver` and `#receive` have similar guard statements, so this commit adds some symmetry to the code. This is probably not the most critical part of ActionMailer in terms of performance, but here are some benchmarks: ``` require 'benchmark/ips' require 'action_mailer' event = ActiveSupport::Notifications::Event.new( 'process.action_mailer', Time.now, Time.now, 'bf4e2b36ce085fd35b24', { mailer: "UserMailer", action: :welcome } ) ActionMailer::Base.logger = ActiveSupport::Logger.new '/dev/null' subscriber = ActionMailer::LogSubscriber.new def subscriber.process_with_guard(event) return unless logger.debug? mailer = event.payload[:mailer] action = event.payload[:action] debug("\n#{mailer}##{action}: processed outbound mail in #{event.duration.round(1)}ms") end Benchmark.ips do |r| ActionMailer::Base.logger.level = ::Logger::Severity::INFO r.report('no guard') { subscriber.process(event) } r.report(' guard') { subscriber.process_with_guard(event) } end __END__ Calculating ------------------------------------- no guard 9640 i/100ms guard 38381 i/100ms ------------------------------------------------- no guard 169166.9 (±10.2%) i/s - 838680 in 5.007262s guard 728184.9 (±9.6%) i/s - 3607814 in 4.999218s ``` When log level is DEBUG, the _guarded_ method is a bit slower. This is a good tradeoff for 4x improvement in production mode. ``` Benchmark.ips do |r| ActionMailer::Base.logger.level = ::Logger::Severity::DEBUG r.report('no guard') { subscriber.process(event) } r.report(' guard') { subscriber.process_with_guard(event) } end __END__ Calculating ------------------------------------- no guard 4970 i/100ms guard 4564 i/100ms ------------------------------------------------- no guard 55617.4 (±3.5%) i/s - 278320 in 5.010523s guard 49452.1 (±5.6%) i/s - 251020 in 5.093358s ```
-