Class: HelpRequestsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/help_requests_controller.rb

Constant Summary collapse

SUCCESS_NOTICE =
"Thank you for your input!"

Instance Method Summary collapse

Methods inherited from ApplicationController

#show_action_bar?, #show_site_search?, #sufia, with_themed_layout

Instance Method Details

#createObject



19
20
21
22
23
24
25
26
# File 'app/controllers/help_requests_controller.rb', line 19

def create
  help_request.save!
  respond_with(help_request) do |wants|
    wants.html { redirect_to dashboard_index_path, notice: SUCCESS_NOTICE}
  end
rescue ActiveRecord::RecordInvalid
  respond_with(help_request)
end

#help_requestObject



10
11
12
# File 'app/controllers/help_requests_controller.rb', line 10

def help_request
  @help_request ||= build_help_request
end

#newObject



15
16
17
# File 'app/controllers/help_requests_controller.rb', line 15

def new
  respond_with(help_request)
end