diff options
| author | Xinhui | 2017-04-19 15:35:13 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-04-19 15:36:46 +0200 | 
| commit | fd9cd712f8e32378bdee5f049db2a0fe034a9b2a (patch) | |
| tree | d40b8072bf5ca8425f71c1ed4459833940742c1e /app/models/user_context.rb | |
| parent | a1c1d659a984d05799812c92a53925337f361930 (diff) | |
| download | chouette-core-fd9cd712f8e32378bdee5f049db2a0fe034a9b2a.tar.bz2 | |
Refactoring Pundit ApplicationPolicy with UserContext
Refs #3140
Diffstat (limited to 'app/models/user_context.rb')
| -rw-r--r-- | app/models/user_context.rb | 8 | 
1 files changed, 8 insertions, 0 deletions
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  | 
