friendly_routes 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd836abf288ae5f9072f7da35f300a37cfbf31bf
|
4
|
+
data.tar.gz: ab34480af694a86b1c98934741f921af7b094ee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9954ca6a4d9bd2623aee50cdf78ffce6f9cff96b970aa461aab966c4e69c16471bfbbfdc72ae09fef826a85ffd2764e2b6609ef444e7e7d670fb73f4be9b0af
|
7
|
+
data.tar.gz: 9d7764c924995f7f620ea489a1095afd0301baace01c43f3bcbd6bf2818570222525ce4cf23fc61716be211d36163273864eb6c2b23bfa71740f618bce09a57d
|
@@ -41,8 +41,8 @@ module FriendlyRoutes
|
|
41
41
|
# @param [Integer|Object] id_or_instance collection instance or it id
|
42
42
|
# @return [Boolean]
|
43
43
|
def allowed?(id_or_instance)
|
44
|
-
if id_or_instance.is_a?(
|
45
|
-
@collection_ids.
|
44
|
+
if id_or_instance.is_a?(ActiveRecord::Base)
|
45
|
+
@collection_ids.include?(id_or_instance.id)
|
46
46
|
else
|
47
47
|
@collection.find_by(id: id_or_instance).present?
|
48
48
|
end
|