Sha256: 9e50740aa2c1dd1a8501a92d196c3f12917174ed2dd32b513662ca9452e910bc

Contents?: true

Size: 626 Bytes

Versions: 9

Compression:

Stored size: 626 Bytes

Contents

module ActiveData
  module Model
    module Conventions
      extend ActiveSupport::Concern

      included do
        attr_reader :embedder

        delegate :logger, to: ActiveData
        self.include_root_in_json = ActiveData.include_root_in_json
      end

      def persisted?
        false
      end

      def new_record?
        !persisted?
      end
      alias_method :new_object?, :new_record?

      module ClassMethods
        def i18n_scope
          ActiveData.i18n_scope
        end

        def to_ary
          nil
        end

        def primary_name
          nil
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
active_data-1.2.0 lib/active_data/model/conventions.rb
active_data-1.1.7 lib/active_data/model/conventions.rb
active_data-1.1.6 lib/active_data/model/conventions.rb
active_data-1.1.5 lib/active_data/model/conventions.rb
active_data-1.1.4 lib/active_data/model/conventions.rb
active_data-1.1.3 lib/active_data/model/conventions.rb
active_data-1.1.2 lib/active_data/model/conventions.rb
active_data-1.1.1 lib/active_data/model/conventions.rb
active_data-1.1.0 lib/active_data/model/conventions.rb