lib/stair_master/step.rb in stair_master-0.0.2 vs lib/stair_master/step.rb in stair_master-0.0.3

- old
+ new

@@ -29,12 +29,14 @@ results end def url_for(resources=[], options={}) begin - Rails.application.routes.url_helpers.send @path.to_sym, resources, options - rescue - raise RuntimeError, "Could not find the route '#{ @path }' in your application." + ## TODO: There is probably a better way to handle this. + resources = resources.nil? ? [] : resources + Rails.application.routes.url_helpers.send @path.to_sym, (resources.empty? ? nil : resources), options + rescue Exception => e + raise RuntimeError, "Could not find the route '#{ @path }' in your application. #{ e.message }" end end def to_s label \ No newline at end of file