rooftop-rails 0.0.6.3 → 0.0.6.4

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: 0f1c6a9de292c6a1c912e3ace8972d1891c60f99
4
- data.tar.gz: e6f4a3e07a5bcb4a224560fe075c582abd132005
3
+ metadata.gz: 9c763b6f784a114983b3477ba471e1ae4192c4d7
4
+ data.tar.gz: 052fd96a5732b5af07af3f7d85c7a8a385f6c21e
5
5
  SHA512:
6
- metadata.gz: fb8d2808557ca520a98a96128f52cb4d67cbbd06cea0ebd5cd72167da6d682e4fb0e249ace5cb4221d23b95bebb540a4ee0fe7d1b1bd3c77f019749c7f35c02e
7
- data.tar.gz: 13955771a1fdd231223611d71f223427020e5a69cb345247d57480c8558e32847187a3b203e4b4ee0f24794e84258fb3a13fd79bfb562a70bf4c2e7d03cc82dc
6
+ metadata.gz: de633ef360fa5634eaf35a14b834074d76167cb8e34329e50fb4dfcb9b34bb742e51c5e6f734f5a6f9d78612e6e79b53fb73bb9e4966dcef3b7df50ff01e81ee
7
+ data.tar.gz: 6822909f77f6c4973fd1838a79cab5cf8f353ef0f2a2152e021accfd3db7a31af8a9689f1eee22c2971f6c864eaad97e2800a9e4248345747e034d48357ed1bf
@@ -22,7 +22,8 @@ module Rooftop
22
22
  path = CGI::unescape(path) if options[:unescape]
23
23
  delimiter = options[:delimiter]
24
24
  slug = "#{options[:prefix]}#{path}".gsub(/^\//, '').split(delimiter).last
25
- entity = where(slug: slug, per_page: 1).first
25
+ entities = where(slug: slug)
26
+ entity = entities.to_a.find {|e| e.nested_path == path}
26
27
  if entity.nil?
27
28
  raise Rooftop::RecordNotFoundError, "Couldn't find #{self} with slug #{slug}"
28
29
  else
@@ -1,5 +1,5 @@
1
1
  module Rooftop
2
2
  module Rails
3
- VERSION = "0.0.6.3"
3
+ VERSION = "0.0.6.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rooftop-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6.3
4
+ version: 0.0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Error Studio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-25 00:00:00.000000000 Z
11
+ date: 2016-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: require_all