Permalink
Browse files

returning isn't always available

  • Loading branch information...
1 parent 6997660 commit 32384af6a3cccc1822c2017c3a478901408a529c @nakajima committed Feb 3, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sinatras-hat/resource.rb
@@ -24,7 +24,7 @@ def path(suffix, record=nil)
private
def path_records_for(record)
- returning [record] do |parents|
+ [record].tap do |parents|
resources.reverse.each do |resource|
parents << resource.model.find_owner(parents.last.attributes)
parents.compact!

0 comments on commit 32384af

Please sign in to comment.