なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2016/06/26)

2016/06/26分のコミットです。

CHANGELOGへの追加はありませんでした。


client test have not using Pathname and hashwithindifferent access

actioncable/test/client_test.rbの修正です。

使用していないactive_support/core_ext/hash/indifferent_accesspathnameのrequireを削除しています。


Merge pull request #25524 from kamipo/remove_unnecessary_assert_valid_default

activerecord/lib/active_record/connection_adapters/mysql/column.rbの修正です。

ActiveRecord::ConnectionAdapters::MySQL::Column#initializeで行っていた、型がtext or blobだった場合に、デフォルトが設定されているかどうかのチェック処理を削除しています。 text or blob型の場合、デフォルト値を設定する事は出来ないので、ここでチェックする理由は無い為とのことです。


remove unecessary comments [ci skip]

rails guideのGetting Started with Railsの修正です。

config/routes.rbのexampleに、実際のファイルには記載されていないAction Cableに関するコメントがあったのを削除しています。


Merge pull request #25526 from tricknotes/pathname-as-json

activesupport/lib/active_support/core_ext/object/json.rbの修正です。

Pathnameクラスにas_jsonメソッドを追加しています。

+class Pathname #:nodoc:
+  def as_json(options = nil)
+    to_s
+  end
+end
# before
Pathname.new('lib/index.rb').as_json
# => {"path"=>"lib/index.rb"}


# after
Pathname.new('lib/index.rb').as_json
# => "lib/index.rb"

Fix typo in exception class name

actionview/lib/action_view/helpers/tags/datetime_field.rbの修正です。

NotImplementedErrorNoImplementedErrorにタイポしている箇所があったのを修正しています。