Commit 53635017 by liyijie

Add @current_user etc.

parent 80df9ea7
...@@ -22,6 +22,7 @@ module RailsApiAuthentication ...@@ -22,6 +22,7 @@ module RailsApiAuthentication
@klasses = Array(klass_sym).map do |sym| @klasses = Array(klass_sym).map do |sym|
define_method("current_#{sym}") { @current_auth } define_method("current_#{sym}") { @current_auth }
instance_variable_set("@current_#{sym}", @current_auth)
sym.to_s.camelize.constantize sym.to_s.camelize.constantize
end end
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