なるようになるブログ

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

rails commit log流し読み(2014/05/29)

2014/05/29分のコミットです。

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

revertの都合上、減ることもあるんですよねえ、CHANGELOG。それも書こうかなあ。


Clear inflections after test.

actionpack/test/controller/params_wrapper_test.rbの修正です。

with_dupメソッドを追加して、共通処理を切り出しています。


Revert "Merge pull request #12778 from etehtsea/rake-default-fix"

このPRをrevertしています。

-if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^test(?::|$)/).any?
+if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?

test suite実行時に、defaultタスクを実行する必要がある為、との事です。


Formatting of content from b1db615 [ci skip]

activerecord/lib/active_record/errors.rbの修正です。

昨日追加されたTransactionIsolationErrorクラスのdocのフォーマットを整えています。


Upgrading Ruby on Rails guide is no longer WIP [ci skip]

guides/source/documents.yamlの修正です。

work_in_progress: trueを削除しています。


Ensure custom properties work correctly with inheritance

activerecord/lib/active_record/properties.rbの修正です。

継承先のクラスでpropertyを使用した際に、正常に動作しなかったバグを修正しています。


Maintain column order when overriding existing columns

ActiveRecord::Properties::add_user_provided_columnsメソッドの修正です。

既存のカラムをオーバーライドした際に、カラムの順番を変えないよう対応しています。


Keep closer to other methods that touch @transaction

ActiveRecord::ConnectionAdapters::AbstractAdapter#open_transactionsメソッドActiveRecord::ConnectionAdapters::DatabaseStatements#open_transactionsに移動しています。

transaction関係のメソッドDatabaseStatementsクラスにあったので、似た処理をまとめた形ですね。


Fix documentation

actionview/lib/action_view/helpers/sanitize_helper.rbのdocの修正です。

-      #     config.action_view.sanitized_allowed_attributes = 'id', 'class', 'style'
+      #     config.action_view.sanitized_allowed_attributes = ['id', 'class', 'style']

Arrayを設定する必要があったんですね。


add tests for argument error cases

actionpack/test/dispatch/routing_test.rbの修正です。

ArgumentErrorについてのテストケースを追加しています。


[ci skip] Improve form_helpers.md guide.

rails guideのForm Helpersの修正です。

生成されるHTMLが誤っているのの修正、シングルクォートの追加等を行っています。


Fix indentation from 1b4b26f [ci skip]

rails guideのForm Helpersの修正です。

インデントを修正しています。


Ensure we always use instances of the adapter specific column class

ConnectionAdaptersの修正です。

Columnクラス生成用にnew_columnメソッドを追加しています。


Remove TODO.

actionpack/test/journey/router_test.rbの修正です。

既に対応済みなので、TODOの説明を削除しています。


Use github url for homepage of log4r [ci skip]

activerecord/README.rdocの修正です。

Log4rのHPをgithubのurlに修正しています。


Merge branch 'master' of github.com:zackperdue/rails into zackperdue-master

rails guideのRails Routing from the Outside Inの修正です。

Overriding Named Route Parametersの項を追加しています。

resources :videos, param: :identifier
     videos GET  /videos(.:format)                  videos#index
            POST /videos(.:format)                  videos#create
 new_videos GET  /videos/new(.:format)              videos#new
edit_videos GET  /videos/:identifier/edit(.:format) videos#edit
Video.find_by(identifier: params[:identifier])

こんな書き方出来るんですね。知らなかった。


Add @senny's changed from #14741, including code font for resources

rails guideのRails Routing from the Outside Inの修正です。

上記で追加されたdocの説明修正しています。


Add missing :param option from the docs for Mapper#match [ci skip]

ActionDispatch::Routing::Mapper::Endpoint::Constraints#rootメソッドのdocの修正です。

:paramオプションについて説明を追加しています。


[ci skip] Make last note show up in postgresql guide.

rails guideのActive Record and PostgreSQLの修正です。

Note -> NOTEに修正しています。


Merge pull request #15061 from tgxworld/remove_unnecessary_include

actionpack/lib/action_dispatch/testing/integration.rbの修正です。

不要なActionController::Testingのinclude処理を削除しています。


Result sets never override a model's column type

ActiveRecord::Querying#find_by_sqlメソッドの修正です。

result setがmodelのcolumn typeをオーバーライドしないよう修正しています。

MySQL / PostgreSQLでcolumn typeをオーバーライドしてしまうケースがあったようです。