Sha256: 8f3b0c2db37d8457277b132b551525b1cdb6e69b38768f02e5fc391a00207072

Contents?: true

Size: 492 Bytes

Versions: 16

Compression:

Stored size: 492 Bytes

Contents

module Workarea
  module Api
    module Storefront
      class ContactsController < Api::Storefront::ApplicationController
        def create
          inquiry = Inquiry.create!(inquiry_params)
          Workarea::Storefront::InquiryMailer.created(inquiry.id.to_s).deliver_later

          render(json: { inquiry: inquiry })
        end

        private

        def inquiry_params
          params.permit(:name, :email, :order_id, :subject, :message)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
workarea-api-4.5.6 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.5.6 app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-4.5.5 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.5.5 app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-4.5.4 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.5.4 app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-4.5.3 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.5.3 app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-4.5.2 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.5.2 app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-4.5.0 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.5.0 app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-4.4.7 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.4.7 app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-4.4.6 storefront/app/controllers/workarea/api/storefront/contacts_controller.rb
workarea-api-storefront-4.4.6 app/controllers/workarea/api/storefront/contacts_controller.rb