Sha256: eaa456bed9ef526256b4d0b994b6c5c06e4cdac651762d9f0ad7b084e6fc6c17
Contents?: true
Size: 888 Bytes
Versions: 22
Compression:
Stored size: 888 Bytes
Contents
module Ransack module Adapters module Mongoid class Table attr_accessor :name alias :table_name :name def initialize(object, engine = nil) @object = object @name = object.collection.name @engine = engine @columns = nil @aliases = [] @table_alias = nil @primary_key = nil if Hash === engine # @engine = engine[:engine] || Table.engine # Sometime AR sends an :as parameter to table, to let the table know # that it is an Alias. We may want to override new, and return a # TableAlias node? # @table_alias = engine[:as] unless engine[:as].to_s == @name end end def [](name) Ransack::Adapters::Mongoid::Attribute.new self, name end end end end end
Version data entries
22 entries across 22 versions & 3 rubygems