Controllergetメソッドなどを使い、
アクションのメソッドを指定します。
1 get :index
しかし、config/rouの中でmap.root :formulae
のようにルートのPathをindexアクションにマッピングしている場合でも、
get :indexを呼び出した結果、Controllerrequest.re
の値は正しいルートのPathになっていません。
そのような場合には、以下のようにすると正しい結果が得られます。
1 request.set_REQUEST_URI '/' 2 get :index
posted by
genki
on Sat 26 Jul 2008
at 00:41


