Sha256: accd7175395280876a4cabbeaafc7ed34ceb03aa5e61c2315378830ab249591e
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
class InquiriesController < ApplicationController def new @inquiry = Inquiry.new(inquiry_params) end def create @inquiry = Inquiry.new(inquiry_params) @inquiry.save! InquiryMailer.thanks_for_your_inquiry(@inquiry).deliver_now mylist.clear redirect_to :root, notice: 'You inquiry is submitted.' end private def inquiry_params params.require(:inquiry).permit( :name, :email, :product_ids => [] ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
daimon-exhibition-0.1.0 | spec/dummy/app/controllers/inquiries_controller.rb |