Sha256: 31cc4853ea27e2f42a92dbeeb3d32f4d46312b1b71b37ecd30b817272565b00c

Contents?: true

Size: 493 Bytes

Versions: 4

Compression:

Stored size: 493 Bytes

Contents

require "groupdate/version"
require "groupdate/scopes"

ActiveRecord::Base.send :include, Groupdate::Scopes

# hack for **unfixed** rails issue
# https://github.com/rails/rails/issues/7121
module ActiveRecord
  module Calculations

    private

    def column_alias_for_with_hack(*keys)
      if keys.first.is_a?(Groupdate::OrderHack)
        keys.first.field
      else
        column_alias_for_without_hack(*keys)
      end
    end
    alias_method_chain :column_alias_for, :hack

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
groupdate-1.0.2 lib/groupdate.rb
groupdate-1.0.1 lib/groupdate.rb
groupdate-1.0.0 lib/groupdate.rb
groupdate-0.1.6 lib/groupdate.rb