less-js-routes
less-js-routes copied to clipboard
functions do not return correct path with when no format is specified
What steps will reproduce the problem?
- Using routes with :format (like default map.resource generated routes).
What is the expected output? What do you see instead? I.e: route admin_ticket_path(4) should return admin/ticket/4 instead it returns admin/ticket/4undefined.
What version of the product are you using? On what operating system? commit d9cacd51454814cf4268da007c439573418adbcd tree 1b1e8be1620c5bfee4e165afc0355cd2042d1faf
Please provide any additional information below. Problem is caused by format parameter not having default value equal to ''. I fixed it in my fork, but I think it can be done prettier: http://github.com/Yax/less-js-routes/commit/eebed718bac239f3dd82235164edb90809ad05e2