Sha256: b9b74766d72c8fadb6b01998f5006291472a48103fa5da846447972bacdf7304

Contents?: true

Size: 510 Bytes

Versions: 12

Compression:

Stored size: 510 Bytes

Contents

module RocketCMS
  module Models
    module Mongoid
      module ContactMessage
        extend ActiveSupport::Concern
        included do
          field :name, type: String
          field :email, type: String
          field :phone, type: String
          field :content, type: String
          RocketCMS.config.contacts_fields.each_pair do |fn, ft|
            next if ft.nil?
            field fn, type: ft
          end

          after_create :send_notification!
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rocket_cms-0.37.1 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.37.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.36.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.35.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.34.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.33.1 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.33.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.32.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.31.1 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.31.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.30.0 lib/rocket_cms/models/mongoid/contact_message.rb
rocket_cms-0.29.0 lib/rocket_cms/models/mongoid/contact_message.rb