Class: Refinery::Inquiries::InquiriesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/refinery/inquiries/inquiries_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



17
18
19
20
21
22
23
24
25
# File 'app/controllers/refinery/inquiries/inquiries_controller.rb', line 17

def create
  @inquiry = Inquiry.new(inquiry_params)

  if inquiry_saved_and_validated?
    redirect_to refinery.thank_you_inquiries_inquiries_path
  else
    render action: 'new'
  end
end

#newObject



13
14
15
# File 'app/controllers/refinery/inquiries/inquiries_controller.rb', line 13

def new
  @inquiry = Inquiry.new
end

#thank_youObject



10
11
# File 'app/controllers/refinery/inquiries/inquiries_controller.rb', line 10

def thank_you
end