lib/avo/current.rb in avo-3.0.0.pre19 vs lib/avo/current.rb in avo-3.0.1.beta1
- old
+ new
@@ -22,13 +22,18 @@
attribute :context, :user, :view_context
attribute :error_manager
attribute :resource_manager
attribute :tool_manager
attribute :plugin_manager
- attribute :locale
delegate :params, to: :request
def request
view_context.request || ActionDispatch::Request.empty
+ end
+
+ def current_user
+ Rails.logger.warn "DEPRECATION WARNING: Avo::Current.current_user become deprecated and will become obsolete on futhure versions. Please use Avo::Current.user instead."
+
+ user
end
end