Please put the above term into one of the following categories:
-
- <% @categories.all.each do |cat| %>
-
-
<%= cat.name %>
-
<%= cat.description %>
-
- <% end %>
-
-
Flag
-
Does this searchterm need to be removed from TACOS?
-
-
-
Submit button here
diff --git a/app/views/term/confirm_index.html.erb b/app/views/term/unconfirmed.html.erb
similarity index 83%
rename from app/views/term/confirm_index.html.erb
rename to app/views/term/unconfirmed.html.erb
index 9d6edc6..056444e 100644
--- a/app/views/term/confirm_index.html.erb
+++ b/app/views/term/unconfirmed.html.erb
@@ -7,7 +7,7 @@ take you to the form for submitting this information.
diff --git a/config/routes.rb b/config/routes.rb
index 8e10e91..664b6a7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -39,8 +39,10 @@
get '/report/algorithm_metrics', to: 'report#algorithm_metrics'
# Confirmation interface
- get '/confirm', to: 'term#confirm_index', as: 'confirm_index'
- get '/confirm/:id', to: 'term#confirm_term', as: 'confirm_term'
+ get '/terms/unconfirmed', to: 'term#unconfirmed', as: 'terms_unconfirmed'
+ resources :terms do
+ resources :confirmation
+ end
# Defines the root path route ("/")
root to: 'static#index'
diff --git a/test/controllers/term_controller_test.rb b/test/controllers/term_controller_test.rb
index 412f748..a02b758 100644
--- a/test/controllers/term_controller_test.rb
+++ b/test/controllers/term_controller_test.rb
@@ -4,7 +4,7 @@
class TermControllerTest < ActionDispatch::IntegrationTest
test 'confirmation index is not accessible without authentication' do
- get confirm_index_path
+ get terms_unconfirmed_path
assert_redirected_to '/'
follow_redirect!
@@ -14,20 +14,20 @@ class TermControllerTest < ActionDispatch::IntegrationTest
test 'confirmation index is accessible to basic users when authenticated' do
sign_in users(:basic)
- get confirm_index_path
+ get terms_unconfirmed_path
assert_response :success
end
test 'confirmation index is accessible to admin users when authenticated' do
sign_in users(:admin)
- get confirm_index_path
+ get terms_unconfirmed_path
assert_response :success
end
test 'confirmation form is not accessible without authentication' do
- get confirm_term_path(terms(:doi))
+ get new_term_confirmation_path(terms(:doi))
assert_redirected_to '/'
follow_redirect!
@@ -37,14 +37,14 @@ class TermControllerTest < ActionDispatch::IntegrationTest
test 'confirmation form is accessible to basic users when authenticated' do
sign_in users(:basic)
- get confirm_term_path(terms(:doi))
+ get new_term_confirmation_path(terms(:doi))
assert_response :success
end
test 'confirmation form is accessible to admin users when authenticated' do
sign_in users(:admin)
- get confirm_term_path(terms(:doi))
+ get new_term_confirmation_path(terms(:doi))
assert_response :success
end