Skip to content

Commit 69c0420

Browse files
committed
Use symbols for action hook names
Rails 5 requires symbols for the names of hooks. This fixes the following deprecation warning: > DEPRECATION WARNING: Passing string to define callback is deprecated > and will be removed in Rails 5.1 without replacement. (called from > verify_scoped_resource at lib/kracken/controllers/json_api_compatible.rb:69)
1 parent 75e38c8 commit 69c0420

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kracken/controllers/json_api_compatible.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def munge_resource_root!
5050
end
5151

5252
def verify_scoped_resource(resource, options = {})
53-
name = "verify_scoped_#{resource}"
53+
name = "verify_scoped_#{resource}".to_sym
5454
relation = options.extract!(:as).fetch(:as, resource).to_s.pluralize
5555
scope = options.extract!(:scope).fetch(:scope, :current_user)
5656
resource_id = (resource_type == resource.to_sym) ? :id : "#{resource}_id"

0 commit comments

Comments
 (0)