Sha256: ce23e691c89a7fee361a5f2d728da8f45d5517b20203d1fdc14c0edde6c5d3f4

Contents?: true

Size: 1.42 KB

Versions: 6

Compression:

Stored size: 1.42 KB

Contents

module BetterRecord
  class Base < ActiveRecord::Base
    self.abstract_class = true
    include ModelConcerns::HasValidatedAvatar
    include ModelConcerns::HasProtectedPassword

    # == Constants ============================================================

    # == Attributes ===========================================================

    # == Extensions ===========================================================

    # == Relationships ========================================================
    if (ha = BetterRecord.has_auditing_relation_by_default)
      has_many self.audit_relation_name,
        class_name: 'BetterRecord::LoggedAction',
        primary_type: :table_name,
        foreign_key: :row_id,
        foreign_type: :table_name,
        as: self.audit_relation_name
    end
    # == Validations ==========================================================

    # == Scopes ===============================================================

    # == Callbacks ============================================================

    # == Boolean Class Methods ================================================

    # == Class Methods ========================================================

    # == Boolean Methods ======================================================

    # == Instance Methods =====================================================
    def indifferent_attributes
      attributes.with_indifferent_access
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
better_record-0.9.1 app/models/better_record/base.rb
better_record-0.9.0 app/models/better_record/base.rb
better_record-0.8.6 app/models/better_record/base.rb
better_record-0.8.5 app/models/better_record/base.rb
better_record-0.8.4 app/models/better_record/base.rb
better_record-0.8.3 app/models/better_record/base.rb