Class: HelpRequestsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- HelpRequestsController
- Defined in:
- app/controllers/help_requests_controller.rb
Constant Summary collapse
- SUCCESS_NOTICE =
"Thank you for your input!"
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/help_requests_controller.rb', line 19 def create if help_request.save respond_with(help_request) do |wants| wants.html { redirect_to catalog_index_path, notice: SUCCESS_NOTICE} end else respond_with(help_request) end end |
#help_request ⇒ Object
10 11 12 |
# File 'app/controllers/help_requests_controller.rb', line 10 def help_request @help_request ||= build_help_request end |
#new ⇒ Object
15 16 17 |
# File 'app/controllers/help_requests_controller.rb', line 15 def new respond_with(help_request) end |