lib/nanoc/helpers/link_to.rb in nanoc-4.1.6 vs lib/nanoc/helpers/link_to.rb in nanoc-4.2.0b1

- old
+ new

@@ -120,10 +120,11 @@ if target.is_a?(String) path = target else path = target.path if path.nil? + # TODO: get proper error raise "Cannot get the relative path to #{target.inspect} because this target is not outputted (its routing rule returns nil)" end end # Handle Windows network (UNC) paths @@ -132,9 +133,10 @@ end # Get source and destination paths dst_path = Pathname.new(path) if @item_rep.path.nil? + # TODO: get proper error raise "Cannot get the relative path to #{path} because the current item representation, #{@item_rep.inspect}, is not outputted (its routing rule returns nil)" end src_path = Pathname.new(@item_rep.path) # Calculate the relative path (method depends on whether destination is