diff --git a/app/controllers/contributors_controller.rb b/app/controllers/contributors_controller.rb index 2571ff306..75b9e0717 100644 --- a/app/controllers/contributors_controller.rb +++ b/app/controllers/contributors_controller.rb @@ -15,6 +15,11 @@ def create end end + def no_contributor_info + flash[:notice] = "Thank you" + redirect_to root_url + end + private def contributor_params diff --git a/app/views/contributors/new.html.haml b/app/views/contributors/new.html.haml index ac538bf17..eb495bd9f 100644 --- a/app/views/contributors/new.html.haml +++ b/app/views/contributors/new.html.haml @@ -17,4 +17,4 @@ = f.text_field :email %p.button = f.submit "Submit" - = link_to "I prefer not to", root_url + = link_to "I prefer not to", contributors_no_info_path diff --git a/config/routes.rb b/config/routes.rb index 8dbc70b0c..146ce7130 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -111,6 +111,7 @@ def matches?(request) post "/authorities/:authority_id/councillor_contributions/new", to: "councillor_contributions#new" resources :contributors, only:[:new, :create] + get "/contributors/no_info", to: "contributors#no_contributor_info" namespace :atdis do get :test