備忘メモ

Rubyで現在のスクリプトのファイル名は「__FILE__」で得られる。ただし,コンテキストは認識してくれない。親クラスで定義されたものを子クラスで実行しても親クラスのファイル名になる。

コントローラでのエラー処理はActionController::Rescueを使うとよい。これで権限チェックのところのコードがきれいになるはず。


27 Dec, 2008 | Foodyn ( つぶやき ) , Rails | | Andy
« Prev item - Next Item »
---------------------------------------------

Comments


No comments yet. You can be the first!


Leave comment

© 2007 yoursite.com | Designed by DesignsByDarren
Ported to Nucleus CMS: Suvoroff