OSDN Git Service

use relative path instead of absolute path
authorokimoto <okimoto@good-day.co.jp>
Fri, 7 May 2010 15:48:26 +0000 (00:48 +0900)
committerokimoto <okimoto@good-day.co.jp>
Fri, 7 May 2010 15:48:26 +0000 (00:48 +0900)
app/views/problems/quiz.html.erb
config/routes.rb

index 96e76bd..00d7cb5 100644 (file)
@@ -7,7 +7,7 @@
   <%=h @group.description %>
 </p>
 
-<%- form_tag "/problems/answer", :method => "post" do -%>
+<%- form_tag answer_path, :method => "post" do -%>
 <%= hidden_field_tag "problem_group_id", @group.id %>
 <%= hidden_field_tag "submit_token", @submit_token %>
 <dl>
index 1fc86f8..cb4bc5c 100644 (file)
@@ -21,6 +21,7 @@ ActionController::Routing::Routes.draw do |map|
 
   map.help 'help', :controller => 'helps', :action => 'index'
   map.settings 'settings', :controller => 'settings', :action => 'index'
+  map.answer 'problems/answer', :controller => 'problems', :action => 'answer'
 
   # Sample resource route (maps HTTP verbs to controller actions automatically):
   #   map.resources :products