Class: Peoplefinder::InformationRequestsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Peoplefinder::InformationRequestsController
- Defined in:
- app/controllers/peoplefinder/information_requests_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/peoplefinder/information_requests_controller.rb', line 14 def create @information_request = InformationRequest.new(information_request_params) @information_request.recipient = @person @information_request.sender_email = current_user.email if @information_request.save ReminderMailer.information_request(@information_request).deliver notice :message_sent, person: @person redirect_to person_path(@person) else render action: :new end end |
#new ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/peoplefinder/information_requests_controller.rb', line 5 def new @information_request = InformationRequest.new( recipient: @person, message: I18n.t('controllers.information_requests.default_message', recipient: @person, sender: current_user) ) end |