Commit 86cc5c41 by Ivan Lan

Merge branch 'lan/prepend_before_action' into 'master'

Use prepend_before_action instead of before_action in method auth_action See merge request !3
parents 525c4153 435cc1a5
...@@ -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