なるようになるブログ

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

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

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

table_name_suffixの追加、rails guideにActive Record and PostgreSQLのページ追加が行われました。

Active Record and PostgreSQLは各データタイプについての説明が記載されており、大分便利です。


Improve CHANGELOG entry [ci skip]

CHANGELOGの修正です。

AR::Relation#joinActiveRecord::Relation#join`に修正、シングルコーテーションの追加など。


Add support for module-level table_suffix in models

ActiveRecord::ModelSchematable_name_suffixを追加しています。table_name_prefixのsuffix版ですね。

table_name_prefix同様に、namespaceとして使えそう。


Guides: output valid HTML5

rails guideの修正です。

W3CのValidationチェックでエラーになっていた箇所の修正を行っています。dtタグの追加や、不要なdivタグの削除等。


Refactor AssociationScope#get_bind_values

ActiveRecord::Reflection::ThroughReflection#join_id_forメソッドを追加して、get_bind_valuesメソッドの処理をそちらに移動しています。

ActiveRecord::Reflection::ThroughReflection#source_macroメソッドにアクセスするのを避けるため、との事。


Fix rails dbconsole for jdbcmysql adapter.

Rails::DBConsoleの修正です。ドライバがjdbcmysqlの場合の対応を追加しています。

-      when /^mysql/
+      when /^(jdbc)?mysql/

jrubyの為の対応ですかねえ。


refactor and clean up delete_all method

ActiveRecord::AssociationsCollectionAssociation/delete_allリファクタリングです。

dependentの値により処理の分岐があったのですが、destroydelete_allどちらを指定しても処理が変わらないので、分岐処理を削除しています。


pg guide, datatypes and examples. [ci skip]

rails guideにActive Record and PostgreSQLのページを追加しています。

各Datatypeの例が記載されています。とても便利。


pg guide, advanced features [ci skip]

上記コミットと同じく、rails guideのpostgresのページについての修正です。

UUID及びFull Text Searchについての説明を追加しています。


pg guides, some stylistic changes [ci skip]

上記コミットと同じく、rails guideのpostgresのページについての修正です。

不要なスペースの削除等。


Fixed grammar

ActiveRecord::Associations::HasManyAssociation::HasManyThroughAssociationのdocの修正です。

build -> builtに修正しています。


Moved 'params[request_forgery_protection_token]' into its own method and improved tests.

ActionController::RequestForgeryProtection::verified_request?メソッドの修正です。

tokenチェック処理で、直接params[request_forgery_protection_token]を参照していたのを、 form_authenticity_paramメソッドを使用するよう修正しています。

request_forgery_protection_token以外のparamを使用したい場合、form_authenticity_paramメソッドをオーバーライドすれば済むようになる訳ですね。