Rails>Rails 2.3.6
Ruby on Rails 2.3.6リリース
Jeremy Kemperにより2010/05/23に投稿されたものです。
私たちはRuby on Rails 2.3.6をリリースしましたよ。その内容は、6ヶ月に及ぶバグフィックス、いくつかの新しい特徴、Rails 3への大きな架け橋となります。
Rails 2.3.6に含まれる古くて使われない特徴をdeprecated(将来消される機能)にしました。なので、Rails 3では、それらが完全に消される可能性があります。もし、Rails 2.3.6上でのアプリケーションがdeprecation warning無しで動くのであれば、上手く移行できるでしょう。
このじっくりと作られた料理が有志による87人によりもたらされてます。
では、ごちそうをいただきましょう。
Action Pack
Rackを1.0.1から1.1.0へアップデート
XSS(クロスサイトスクリプティング)対策: Rails 3に合わせ(?) http://github.com/rails/rails_xss のものを公式プラグインとした
クッキー: convenient cookie jar add-ons to set permanent or signed cookies, or both at once: cookies.permanent.signed[:remember_me] = current_user.id. さらに読む
Flash: もっとも一般的なキーであるalertとかnoticeとかをもっと使えるようにした。
XSS(クロスサイトスクリプティング)対策: Rails 3に合わせ(?) http://github.com/rails/rails_xss のものを公式プラグインとした
クッキー: convenient cookie jar add-ons to set permanent or signed cookies, or both at once: cookies.permanent.signed[:remember_me] = current_user.id. さらに読む
Flash: もっとも一般的なキーであるalertとかnoticeとかをもっと使えるようにした。
self.alert = '...' self.notice = '...'
とかが使える。
redirect_to url, :alert => '...' redirect_to url, :notice => '...'
も加えた。さらに読む
i18n(国際化): labelヘルパをローカルに(?)
i18n(国際化): labelヘルパをローカルに(?)
Active Record
名前空間(Namespacing): support optional table name prefixes on modules by defining self.table_name_prefix. さらに読む
Destroy uses optimistic locking.
Counter cache: use Post.reset_counters(1234, :comments) to count the number of comments for post 1234 and reset its comments_count cache.
PostgreSQL: サポートしていれば、常にstandard-conforming stringsを使う。
MySQL: add indexにlengthのオプションをつけることができるようになった。。さらに読む
MySQL: add_columnとchange_columnに:first => trueと:after => :other_columnの引数をつけることで、コラムの位置を変更できる。
Destroy uses optimistic locking.
Counter cache: use Post.reset_counters(1234, :comments) to count the number of comments for post 1234 and reset its comments_count cache.
PostgreSQL: サポートしていれば、常にstandard-conforming stringsを使う。
MySQL: add indexにlengthのオプションをつけることができるようになった。。さらに読む
MySQL: add_columnとchange_columnに:first => trueと:after => :other_columnの引数をつけることで、コラムの位置を変更できる。
Active Support
i18nを1.3.3から1.3.7にアップグレード。
TZInfoを0.3.12から0.3.16へアップグレード。
マルチバイト: speed up string verification and cleaning.
JSON: 可能であれば、JSONデコードのためにYAJLを使おう。 gem install yajl-ruby
Testing: add assert_blank and assert_present. Read more
Core: backport Object#singleton_class from Ruby 1.8.8, deprecating our Object#metaclass.
Core: add Object#presence that returns the object if it’s #present? otherwise returns nil. Example: region = params[:state].presence || params[:country].presence || 'US'
Core: add Enumerable#exclude? to match include?.
Core: rename Array#rand to Array#random_element to avoid collision with Kernel#rand.
Core: rename Date# and Time#last_(month|year) to #prev_(month|year) for Ruby 1.9 forward compatibility.
TZInfoを0.3.12から0.3.16へアップグレード。
マルチバイト: speed up string verification and cleaning.
JSON: 可能であれば、JSONデコードのためにYAJLを使おう。 gem install yajl-ruby
Testing: add assert_blank and assert_present. Read more
Core: backport Object#singleton_class from Ruby 1.8.8, deprecating our Object#metaclass.
Core: add Object#presence that returns the object if it’s #present? otherwise returns nil. Example: region = params[:state].presence || params[:country].presence || 'US'
Core: add Enumerable#exclude? to match include?.
Core: rename Array#rand to Array#random_element to avoid collision with Kernel#rand.
Core: rename Date# and Time#last_(month|year) to #prev_(month|year) for Ruby 1.9 forward compatibility.
Active Resource
JSON:
ActiveResource::Base.include_root_in_json = true
とすると、to serialize as a hash of model name -> attributes instead of a bare attributes hash。デフォルトはfalseです。
Action Mailer
TMailを1.2.3から1.2.7にアップグレード。
Railties
RubyGems 1.3.6 deprecation warningを出さない。
詳しくは、コミットログを読んでください。