Sha256: b6b3295e7f24efda10352c726702a1e6b1b9dd3457c885b300d98cb90d289536

Contents?: true

Size: 862 Bytes

Versions: 3

Compression:

Stored size: 862 Bytes

Contents

require 'active_support/core_ext'
require 'ransack/configuration'
require 'ransack/adapters'

Ransack::Adapters.object_mapper.require_constants

module Ransack
  extend Configuration
  class UntraversableAssociationError < StandardError; end;

  SUPPORTS_ATTRIBUTE_ALIAS =
  begin
    ActiveRecord::Base.respond_to?(:attribute_aliases)
  rescue NameError
    false
  end
end

Ransack.configure do |config|
  Ransack::Constants::AREL_PREDICATES.each do |name|
    config.add_predicate name, :arel_predicate => name
  end
  Ransack::Constants::DERIVED_PREDICATES.each do |args|
    config.add_predicate *args
  end
end

require 'ransack/search'
require 'ransack/ransacker'
require 'ransack/helpers'
require 'action_controller'
require 'ransack/translate'

Ransack::Adapters.object_mapper.require_adapter

ActionController::Base.helper Ransack::Helpers::FormHelper

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ransack-1.8.2 lib/ransack.rb
ransack-1.8.1 lib/ransack.rb
ransack-1.8.0 lib/ransack.rb