Commit 435cc1a5 by ivan Lan

Use prepend_before_action instead of before_action in method auth_action

parent 1e9cf58f
...@@ -15,7 +15,7 @@ module RailsApiAuthentication ...@@ -15,7 +15,7 @@ module RailsApiAuthentication
module ClassMethods module ClassMethods
def auth_action klass_sym, options={} def auth_action klass_sym, options={}
before_action :perform, options prepend_before_action :perform, options
@klass = klass_sym.to_s.camelize.constantize @klass = klass_sym.to_s.camelize.constantize
define_method("current_#{klass_sym}") { @current_auth || nil } define_method("current_#{klass_sym}") { @current_auth || nil }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment