Sha256: 6a3801f1b722ae4c4bb96b8bfedd89de4c557b0538edfb97334b75aaad34b9d5

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

module Tableficate
  module ActiveRecordExtension
    module Functions
      attr_accessor :tableficate_data
    end

    extend ActiveSupport::Concern

    included do
      extend Tableficate::Finder

      self.scope :tableficate_ext, ->{} do
        include Functions

        def to_a
          a = super.extend(Functions)

          a.tableficate_data = self.tableficate_data

          a
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tableficate-0.3.2 lib/tableficate/active_record_extension.rb
tableficate-0.3.1 lib/tableficate/active_record_extension.rb