Sha256: efd6022436a1f0103f5031bc09d8a648a4912ef498efdb01ab7e9129c28c6e06

Contents?: true

Size: 1.27 KB

Versions: 20

Compression:

Stored size: 1.27 KB

Contents

require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/attribute_accessors'

module Cmor
  module Contact
    module Configuration
      def configure
        yield self
      end

      mattr_accessor :input_name_css_classes do
        'form-control'
      end

      mattr_accessor :input_email_css_classes do
        'form-control'
      end

      mattr_accessor :input_phone_css_classes do
        'form-control'
      end

      mattr_accessor :input_message_css_classes do
        'form-control'
      end

      mattr_accessor :input_terms_of_service_css_classes do
        ''
      end

      mattr_accessor :form_actions_wrapper_css_classes do
        'controls form-actions well'
      end

      mattr_accessor :recipients do
        {}
      end

      mattr_accessor :sender do
        ->(mail_form) { %("#{mail_form.name}" <#{mail_form.email}>) }
      end

      mattr_accessor :base_controller do
        'ApplicationController'
      end

      mattr_accessor :additional_contact_information do
        nil
      end

      mattr_accessor :after_create_url do
        ->(controller) { controller.root_path }
      end

      def recipients=(recipients)
        @@recipients = HashWithIndifferentAccess.new(recipients)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
cmor_contact-0.0.21.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.20.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.19.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.18.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.17.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.15.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.14.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.13.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.12.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.11.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.10.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.9.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.8.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.7.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.6.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.5.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.4.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.3.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.2.pre lib/cmor/contact/configuration.rb
cmor_contact-0.0.1.pre lib/cmor/contact/configuration.rb