Skip to content

Commit

Permalink
Refactor adapters (#1348)
Browse files Browse the repository at this point in the history
* Refactor constants

* Remove Ransack::Adapters

* Refactor Context

* Refactor Translate

* Refactor Visitor

* Refactor Condition

* Move active_record.rb

* Remove lib/ransack/nodes.rb
  • Loading branch information
scarroll32 authored Nov 22, 2022
1 parent 4352d1a commit 0070757
Show file tree
Hide file tree
Showing 15 changed files with 281 additions and 377 deletions.
7 changes: 2 additions & 5 deletions lib/ransack.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
require 'active_support/core_ext'
require 'ransack/configuration'
require 'ransack/adapters'
require 'polyamorous/polyamorous'

Ransack::Adapters.object_mapper.require_constants

module Ransack
extend Configuration
class UntraversableAssociationError < StandardError; end
Expand All @@ -22,8 +19,8 @@ class UntraversableAssociationError < StandardError; end
require 'ransack/search'
require 'ransack/ransacker'
require 'ransack/translate'

Ransack::Adapters.object_mapper.require_adapter
require 'ransack/active_record'
require 'ransack/context'

ActiveSupport.on_load(:action_controller) do
require 'ransack/helpers'
Expand Down
File renamed without changes.
31 changes: 0 additions & 31 deletions lib/ransack/adapters.rb

This file was deleted.

128 changes: 0 additions & 128 deletions lib/ransack/adapters/active_record/ransack/constants.rb

This file was deleted.

56 changes: 0 additions & 56 deletions lib/ransack/adapters/active_record/ransack/context.rb

This file was deleted.

83 changes: 0 additions & 83 deletions lib/ransack/adapters/active_record/ransack/nodes/condition.rb

This file was deleted.

8 changes: 0 additions & 8 deletions lib/ransack/adapters/active_record/ransack/translate.rb

This file was deleted.

47 changes: 0 additions & 47 deletions lib/ransack/adapters/active_record/ransack/visitor.rb

This file was deleted.

Loading

0 comments on commit 0070757

Please sign in to comment.