Skip to content

Commit dc4a159

Browse files
committed
chore: standardrb --fix
1 parent 01319ba commit dc4a159

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/components/alchemy/admin/toolbar_button.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def permissions_from_url
106106
action_controller = url.delete_prefix("/").split("/")
107107
[
108108
action_controller.last.to_sym,
109-
action_controller[0..action_controller.length - 2].join("_").to_sym
109+
action_controller[0..-2].join("_").to_sym
110110
]
111111
end
112112
end

spec/libraries/auth_accessors_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class MyCustomUser
4040

4141
context "and the default user class does not exist" do
4242
before do
43-
if Object.constants.include?(:User)
43+
if Object.const_defined?(:User)
4444
Object.send(:remove_const, :User)
4545
end
4646
end

0 commit comments

Comments
 (0)