2014/08/22分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Add the Duration#instance_of?
method that was previously delegated to the internal value
attribute.
Make text consistent in help text of rails server and console commands.
railties/lib/rails/commands/console.rb
、railties/lib/rails/commands/server.rb
の修正です。
エラー時に出力するhelpのグラマー修正。
guides/source/upgrading_ruby_on_rails.md
の修正です。
こちらもグラマーの修正です。
adding the exception RecordNotFound to UUID find
activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb
の 修正です
Primar KeyにUUIDを指定した場合に、データが見つからなかった場合にfind
メソッドがRecordNotFound
をraiseするよう修正しています。
[ci skip] Added documentation for has_one scope parameter
activerecord/lib/active_record/associations.rb
のdocの修正です。
has_one scopeにパラメータを渡すサンプルを追加しています。
has_one :auther, -> { where(comment_id: 1) } has_one :employer, -> { joins(:company) } has_one :dob, ->(dob) { where("Date.new(2000, 01, 01) > ?", dob) }
Add change to ActionView Notable changes [ci skip]
guides/source/4_2_release_notes.md
の修正です。
label
メソッドにi18n対応が行われた件を追加しています。
Don't fight against ourselves for the default log level
railties/lib/rails/application/configuration.rb
の修正です。
デフォルトのログ出力レベルが、productionの場合でも:debugになるよう変更されました。
def log_level - @log_level ||= Rails.env.production? ? :info : :debug + @log_level ||= :debug end
以前DHHがコミットした件のフォローアップですね。productionでのログレベルをinfoにしたい場合は、configに明示的に指定してあげる必要があります。
applies API guidelines to new AM docs
ActionMailerのdocの修正です。
現行のAPIに合わせる形にdocを修正しています。
ActiveJob -> Active Job [ci skip]
ActivenJobのdocの修正です。"ActiveJob" -> "Active Job"に修正しています。
Refactor ActionDispatch::RemoteIp
actionpack/lib/action_dispatch/middleware/remote_ip.rb
の修正です。
ActionDispatch::RemoteIp
のIPアドレスチェック処理のリファクタリング、及びproxyに指定するIPをconfigに指定出来るよう修正しています。
configの設定方法は以下の通り
# config/environments/production.rb config.action_dispatch.trusted_proxies = IPAddr.new('4.8.15.0/16')
activemodel/lib/active_model/errors.rb
の修正です。
to_hash
メソッドのリファクタリングです。each
メソッドの呼び出し回数を減らしています。
railties/lib/rails/commands/server.rb
の修正です。
Mongrel
-> mongrel
、Thin
-> thin
に修正しています。helpのエラーメッセージなのに、実際に指定する文字に戻しています。
railties/lib/rails/commands/console.rb
の修正です。
Rollbacks
-> Rollback
に修正。
Revert "Add I18n support for :placeholder
HTML option is passed to form fields"
:placeholder
にi18nサポートを追加したコミットをrevertしています。
リグレッションが発生してしまっていたので、一旦revertしたようです。
リグレッションに対応したPRが再度作られているようなので、後でまたコミットされますかねえ。
[ci skip] Added documentation for has_and_belongs_to_many scope parameter
activerecord/lib/active_record/associations.rb
のdocの修正です。
has_and_belongs_to_many scopeにパラメータ指定した場合のサンプル追加しています。
has_and_belongs_to_many :projects, -> { includes :milestones, :manager } has_and_belongs_to_many :categories, ->(category) { where("default_category = ?", category.name) }
[ci skip] Running AR tests guide [Fixes GH-15891]
activerecord/RUNNING_UNIT_TESTS.rdoc
の修正です。
グラマーの修正です。
guides/source/generators.md
の修正です。
generatorで生成されるサンプルについての説明を修正しています。
add nested_model_forms to guides/documents.yaml [wip] [ci skip]
guides/source/nested_model_forms.md
の修正です。
associationsについての注記を追加しています。
Pass logging message through block.
activejob/lib/active_job/logging.rb
の修正です。
ロギング処理をブロックでおおうよう修正しています。
guides/source/debugging_rails_applications.md
の修正です。
スペースを追加しています。
Using each_with_object
instead of reduce
activemodel/lib/active_model/errors.rb
の修正です。
繰り返し処理にreduce
メソッドを使用していたのをeach_with_object
を使用するよう修正しています。
- self.messages.reduce({}) do |messages, (attribute, array)| - messages.merge!(attribute => array.map { |message| full_message(attribute, message) }) + self.messages.each_with_object({}) do |(attribute, array), messages| + messages[attribute] = array.map { |message| full_message(attribute, message) }
Merge pull request #16560 from robin850/rbx-duration-eql
activesupport/lib/active_support/duration.rb
の修正です。
Duration#instance_of?
メソッドを追加しています。
Duration#is_a?
メソッド内部で行っていた処理をメソッドに切り出した形です。nodocになっているので、一応内部API用の扱いのようです。
Implemented enqueue_at for ActiveJob's Backburner adapter
activejob/lib/active_job/queue_adapters/backburner_adapter.rb
の修正です。
Backburner adapterにenqueue_at
メソッドを実装しています。
Active Job guide: Add info about queue_name prefix and clarity supporter features
guides/source/active_job_basics.md
の修正です。
queue_nam prefixについての説明を追加しています。