We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01319ba commit dc4a159Copy full SHA for dc4a159
app/components/alchemy/admin/toolbar_button.rb
@@ -106,7 +106,7 @@ def permissions_from_url
106
action_controller = url.delete_prefix("/").split("/")
107
[
108
action_controller.last.to_sym,
109
- action_controller[0..action_controller.length - 2].join("_").to_sym
+ action_controller[0..-2].join("_").to_sym
110
]
111
end
112
spec/libraries/auth_accessors_spec.rb
@@ -40,7 +40,7 @@ class MyCustomUser
40
41
context "and the default user class does not exist" do
42
before do
43
- if Object.constants.include?(:User)
+ if Object.const_defined?(:User)
44
Object.send(:remove_const, :User)
45
46
0 commit comments