about summary refs log tree commit diff
path: root/app/lib/inline_rabl_scope.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/inline_rabl_scope.rb')
-rw-r--r--app/lib/inline_rabl_scope.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/lib/inline_rabl_scope.rb b/app/lib/inline_rabl_scope.rb
new file mode 100644
index 000000000..26adcb03a
--- /dev/null
+++ b/app/lib/inline_rabl_scope.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class InlineRablScope
+  include RoutingHelper
+
+  def initialize(account)
+    @account = account
+  end
+
+  def current_user
+    @account.try(:user)
+  end
+
+  def current_account
+    @account
+  end
+end