diff --git a/lib/polyamorous.rb b/lib/polyamorous.rb deleted file mode 100644 index 83416101..00000000 --- a/lib/polyamorous.rb +++ /dev/null @@ -1 +0,0 @@ -require 'polyamorous/polyamorous' diff --git a/lib/ransack/nodes/condition.rb b/lib/ransack/nodes/condition.rb index d2217216..26314078 100644 --- a/lib/ransack/nodes/condition.rb +++ b/lib/ransack/nodes/condition.rb @@ -2,8 +2,8 @@ module Ransack module Nodes class Condition < Node i18n_word :attribute, :predicate, :combinator, :value - i18n_alias :a => :attribute, :p => :predicate, - :m => :combinator, :v => :value + i18n_alias a: :attribute, p: :predicate, + m: :combinator, v: :value attr_accessor :predicate diff --git a/lib/ransack/nodes/grouping.rb b/lib/ransack/nodes/grouping.rb index 38d794df..c2fb853a 100644 --- a/lib/ransack/nodes/grouping.rb +++ b/lib/ransack/nodes/grouping.rb @@ -7,7 +7,7 @@ class Grouping < Node alias :m= :combinator= i18n_word :condition, :and, :or - i18n_alias :c => :condition, :n => :and, :o => :or + i18n_alias c: :condition, n: :and, o: :or delegate :each, :to => :values diff --git a/lib/ransack/nodes/node.rb b/lib/ransack/nodes/node.rb index 3af1e8bc..e614e9ce 100644 --- a/lib/ransack/nodes/node.rb +++ b/lib/ransack/nodes/node.rb @@ -2,7 +2,7 @@ module Ransack module Nodes class Node attr_reader :context - delegate :contextualize, :to => :context + delegate :contextualize, to: :context class_attribute :i18n_words class_attribute :i18n_aliases self.i18n_words = [] diff --git a/lib/ransack/nodes/value.rb b/lib/ransack/nodes/value.rb index 76b5c938..6b75925f 100644 --- a/lib/ransack/nodes/value.rb +++ b/lib/ransack/nodes/value.rb @@ -2,7 +2,7 @@ module Ransack module Nodes class Value < Node attr_accessor :value - delegate :present?, :blank?, :to => :value + delegate :present?, :blank?, to: :value def initialize(context, value = nil) super(context) diff --git a/lib/ransack/ransacker.rb b/lib/ransack/ransacker.rb index 3ae0c20d..a677880e 100644 --- a/lib/ransack/ransacker.rb +++ b/lib/ransack/ransacker.rb @@ -3,7 +3,7 @@ class Ransacker attr_reader :name, :type, :formatter, :args - delegate :call, :to => :@callable + delegate :call, to: :@callable def initialize(klass, name, opts = {}, &block) @klass, @name = klass, name diff --git a/lib/ransack/search.rb b/lib/ransack/search.rb index 95980c0c..fd9d04fc 100644 --- a/lib/ransack/search.rb +++ b/lib/ransack/search.rb @@ -9,10 +9,10 @@ class Search attr_reader :base, :context - delegate :object, :klass, :to => :context + delegate :object, :klass, to: :context delegate :new_grouping, :new_condition, :build_grouping, :build_condition, - :translate, :to => :base + :translate, to: :base def initialize(object, params = {}, options = {}) strip_whitespace = options.fetch(:strip_whitespace, Ransack.options[:strip_whitespace])