Class: Spotlight::ContactFormsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::ContactFormsController
- Defined in:
- app/controllers/spotlight/contact_forms_controller.rb
Overview
Controller for routing exhibit feedback from users
Instance Method Summary collapse
Methods included from Controller
#blacklight_config, #current_exhibit, #current_masthead, #current_masthead=, #default_masthead?, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #search_action_url, #search_facet_url
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/spotlight/contact_forms_controller.rb', line 12 def create if @contact_form.valid? if @contact_form.respond_to? :deliver_now @contact_form.deliver_now else @contact_form.deliver end redirect_to :back, notice: t(:'helpers.submit.contact_form.created') else render 'new' end end |
#new ⇒ Object
8 9 10 |
# File 'app/controllers/spotlight/contact_forms_controller.rb', line 8 def new @contact_form.current_url = request.referer end |