From fd9cd712f8e32378bdee5f049db2a0fe034a9b2a Mon Sep 17 00:00:00 2001 From: Xinhui Date: Wed, 19 Apr 2017 15:35:13 +0200 Subject: Refactoring Pundit ApplicationPolicy with UserContext Refs #3140 --- app/models/user_context.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 app/models/user_context.rb (limited to 'app/models') diff --git a/app/models/user_context.rb b/app/models/user_context.rb new file mode 100644 index 000000000..e0a856e4b --- /dev/null +++ b/app/models/user_context.rb @@ -0,0 +1,8 @@ +class UserContext + attr_reader :user, :context + + def initialize(user, context = {}) + @user = user + @context = context + end +end -- cgit v1.2.3