hammock 0.3.10.2 → 0.3.10.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/hammock.gemspec +1 -1
- data/lib/hammock/scope.rb +6 -1
- data/lib/hammock.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/hammock.gemspec
CHANGED
data/lib/hammock/scope.rb
CHANGED
@@ -111,7 +111,12 @@ module Hammock
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def scope_for_route route
|
114
|
-
|
114
|
+
(
|
115
|
+
current_user && scope_for_user_and_route(:user_scope_for, route)
|
116
|
+
) || scope_for_user_and_route(:public_scope_for, route)
|
117
|
+
end
|
118
|
+
|
119
|
+
def scope_for_user_and_route method_name, route
|
115
120
|
mdl.send(method_name, route.verb) || mdl.send(method_name, route.default_verb)
|
116
121
|
end
|
117
122
|
|
data/lib/hammock.rb
CHANGED