Skip to content

Commit

Permalink
Drop unnecessary stuff (activeadmin#5780)
Browse files Browse the repository at this point in the history
We no longer need this, since we support rubies above or equal to 2.4.
  • Loading branch information
deivid-rodriguez authored and jshow committed Jun 24, 2019
1 parent e7fa449 commit 12502ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/active_admin/filters/active_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def values
end

def label
# TODO: to remind us to go back to the simpler str.downcase once we support ruby >= 2.4 only.
translated_predicate = predicate_name.mb_chars.downcase.to_s
translated_predicate = predicate_name.downcase
if filter_label && filter_label.is_a?(Proc)
"#{filter_label.call} #{translated_predicate}"
elsif filter_label
Expand Down
3 changes: 1 addition & 2 deletions spec/unit/page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def config(options = {})
end

it "returns the singular, lowercase name" do
expect(config.resource_name.singular)
.to eq "chocolate i l#{RUBY_VERSION >= '2.4.0' ? 'ø' : 'Ø'}ve you!"
expect(config.resource_name.singular).to eq "chocolate i løve you!"
end
end

Expand Down

0 comments on commit 12502ef

Please sign in to comment.