Fix some new rubocop warnings
This commit is contained in:
parent
c03ba5f6b8
commit
ea59d95f4a
23 changed files with 99 additions and 81 deletions
|
@ -89,7 +89,7 @@ class BoundingBox
|
|||
end
|
||||
|
||||
def complete?
|
||||
!to_a.include?(nil)
|
||||
to_a.exclude?(nil)
|
||||
end
|
||||
|
||||
def centre_lon
|
||||
|
|
|
@ -158,7 +158,7 @@ module ActionController
|
|||
|
||||
def create_paginators_and_retrieve_collections #:nodoc:
|
||||
Pagination::OPTIONS[self.class].each do |collection_id, options|
|
||||
next if options[:actions] && !options[:actions].include?(action_name)
|
||||
next if options[:actions]&.exclude?(action_name)
|
||||
|
||||
paginator, collection =
|
||||
paginator_and_collection_for(collection_id, options)
|
||||
|
|
|
@ -17,7 +17,7 @@ class Locale < I18n::Locale::Tag::Rfc4646
|
|||
def expand
|
||||
List.new(reverse.each_with_object([]) do |locale, expanded|
|
||||
locale.candidates.uniq.reverse_each do |candidate|
|
||||
expanded << candidate if candidate == locale || !expanded.include?(candidate)
|
||||
expanded << candidate if candidate == locale || expanded.exclude?(candidate)
|
||||
end
|
||||
end.reverse.uniq)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue