Sha256: 5c317f8e1c5e9d824290534cce5b200e166087449b88d6f4367144c2e2fbf7b2

Contents?: true

Size: 613 Bytes

Versions: 49

Compression:

Stored size: 613 Bytes

Contents

require 'subj_models/concerns/comprising_external_id'
require 'subj_models/concerns/shared_scopes'

module SubjModels

  module ManagerModule

    def self.included(including_class)

      including_class.class_eval do

        include SubjModels::SharedScopes
        include SubjModels::ComprisingExternalId

        belongs_to :document_file
        has_many :events

        validates :email, uniqueness: { case_sensitive: false }
        validates :first_name, :last_name, :email, :phone, :document_file, presence: true

      end

    end

    def to_s
      "#{first_name} #{last_name}"
    end

  end

end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
subj_sub_models-0.0.3.29 lib/subj_models/manager.rb
subj_sub_models-0.0.3.28 lib/subj_models/manager.rb
subj_sub_models-0.0.3.27 lib/subj_models/manager.rb
subj_sub_models-0.0.3.26 lib/subj_models/manager.rb
subj_sub_models-0.0.3.25 lib/subj_models/manager.rb
subj_sub_models-0.0.3.24 lib/subj_models/manager.rb
subj_sub_models-0.0.3.23 lib/subj_models/manager.rb
subj_sub_models-0.0.3.22 lib/subj_models/manager.rb
subj_sub_models-0.0.3.21 lib/subj_models/manager.rb
subj_sub_models-0.0.3.20 lib/subj_models/manager.rb
subj_sub_models-0.0.3.19 lib/subj_models/manager.rb
subj_sub_models-0.0.3.18 lib/subj_models/manager.rb
subj_sub_models-0.0.3.17 lib/subj_models/manager.rb
subj_sub_models-0.0.3.16 lib/subj_models/manager.rb
subj_sub_models-0.0.3.15 lib/subj_models/manager.rb
subj_sub_models-0.0.3.14 lib/subj_models/manager.rb
subj_sub_models-0.0.3.13 lib/subj_models/manager.rb
subj_sub_models-0.0.3.12 lib/subj_models/manager.rb
subj_sub_models-0.0.3.11 lib/subj_models/manager.rb
subj_sub_models-0.0.3.10 lib/subj_models/manager.rb