query: tag:23

production環境などでログ自体を無効化するには
config/environments/production.rb あたりで

ruby>>
RAILS_DEFAULT_LOGGER = Logger.new("/dev/null")
<<--

すればok.

posted by genki genki on Sun 18 Dec 2011 at 08:43 with 0 comments

s21gブログをRails-2.2.2からRails-2.3.2に対応させました。
主に以下のようなところで作業が発生しました。

  • session :off が不要になったので削除
  • application.rb ⇒ application_controller.rb
  • Test::Unit::TestCase から ActiveSupport::TestCaseに
    • test_helper.rbの中の定義もActiveSupport::TestCaseにする
  • formatted_xxx_url(:foo)をxxx_url(:format => :foo)に
posted by genki genki on Sat 28 Mar 2009 at 23:44 with 0 comments

Rails-2.2.2で動いているRailsアプリをRails-2.3.2に移行する場合、

pre>>
% rake rails:update
<<--

を行うと便利ですが、これを実行すると、以下のようなファイルが影響を受けます。

pre>>

Changed but not updated:

(use "git add/rm ..." to update what will be committed)

deleted: app/controllers/application.rb

modified: config/boot.rb

modified: config/environment.rb

modified: public/javascripts/controls.js

modified: public/javascripts/dragdrop.js

modified: public/javascripts/effects.js

modified: public/javascripts/prototype.js

Untracked files:

(use "git add ..." to include in what will be committed)

app/controllers/application_controller.rb

no changes added to commit (use "git add" and/or "git commit -a")
<<--

ApplicationControllerのファイル名が、application_controller.rbに変更になっています。一貫性を持たせるためでしょうね。

posted by genki genki on Sat 28 Mar 2009 at 20:43 with 0 comments