app/controllers/lookbook/app_controller.rb in lookbook-0.3.4 vs app/controllers/lookbook/app_controller.rb in lookbook-0.3.5

- old
+ new

@@ -48,10 +48,10 @@ end def find_preview candidates = [] params[:path].to_s.scan(%r{/|$}) { candidates << $` } - match = candidates.detect { |candidate| Lookbook::Preview.exists?(candidate) } + match = candidates.reverse.detect { |candidate| Lookbook::Preview.exists?(candidate) } @preview = match ? Lookbook::Preview.find(match) : nil end def find_example @example = if @preview