Rails 3.1.8 によって開発されたツールがあり、製品情報を ms word にエクスポートします。製品ラインからの更新がある場合、製品所有者は word でリンクをクリックしてアプリケーションの製品詳細を編集できます。
ここに問題があります。単語でリンクをクリックすると、編集ページではなくホームページに移動します。
そのため、ルートでdeviseを使用して認証を実行します。
devise_for :users do
get "login" => "devise/sessions#new"
get "logout" => "devise/sessions#destroy"
end
ロギングの開発:
Started GET "/products/24/edit" for 10.237.133.26 at 2012-12-17 15:24:49 +0800
Processing by ProductsController#edit as */*
Parameters: {"id"=>"24"}
Completed in 4ms
Session: {"as:products"=>{:list=>{}}, "input_device_type"=>"MOUSE", "hover_supported"=>true, "user_return_to"=>"/products/24/edit", "flash"=>#<ActionDispatch::Flash::FlashHash:0x00000006c80540 @used=#<Set: {}>, @closed=false, @flashes={:alert=>"You need to sign in or sign up before continuing."}, @now=nil>, "_csrf_token"=>"xvfpiA69SZas+iHoCy5NQRMOifXtomG3RoLaYvPQsSw="}
Started GET "/users/sign_in" for 10.237.133.26 at 2012-12-17 15:24:49 +0800
Processing by Devise::SessionsController#new as */*
Rendered devise/shared/_links.erb (0.1ms)
Rendered devise/sessions/new.html.erb within layouts/activescaffold (3.3ms)
Rendered layouts/_header.html.erb (50.0ms)
Rendered layouts/_menu.html.erb (3.4ms)
Rendered layouts/_footer.html.erb (0.0ms)
Completed 200 OK in 91ms (Views: 62.7ms | ActiveRecord: 3.3ms)
Started GET "/users/sign_in" for 10.237.133.26 at 2012-12-17 15:24:50 +0800
Processing by Devise::SessionsController#new as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 15 LIMIT 1
Redirected to http:// localhost:30033/
Completed 302 Found in 33ms
Session: {"input_device_type"=>"MOUSE", "hover_supported"=>true, "_csrf_token"=>"Pa8zGbsbms4EwRUO4G7MyJFv7ztKe33WICeY7qpYgeQ=", "warden.user.user.key"=>["User", [15], nil], "flash"=>#<ActionDispatch::Flash::FlashHash:0x00000006fec508 @used=#<Set: {}>, @closed=false, @flashes={:alert=>"You are already signed in."}, @now=nil>}
Started GET "/" for 10.237.133.26 at 2012-12-17 15:24:51 +0800
Processing by WelcomeController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 15 LIMIT 1
Rendered welcome/index.html.erb within layouts/application (0.0ms)
Rendered layouts/_header.html.erb (3.8ms)
Rendered layouts/_menu.html.erb (3.6ms)
Rendered layouts/_footer.html.erb (0.1ms)
Completed 200 OK in 45ms (Views: 14.0ms | ActiveRecord: 4.3ms)
誰かがより良い解決策を持っていますか?