Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Grails be configured to use all lowercase URL's?

Tags:

grails

By default, Grails uses lowerCamelCase for the URL's. While this isn't a big deal, I sort of favor the the all lowercase URL design, which also reduces gotchas from "normal" people not realizing that case can sometimes make a difference.
I could use the custom mapping to add lowercase versions of all of my controllers (which I do in some cases) but that sort of goes against the general idea of letting Grails do stuff for me.

So, is there a way to tell Grails to use lowercase mappings by default or what would be a good Grailsy way to accomplish this feature?

Note: I'm not necessarily against leaving URL parameters in camel case however, just the base URL of controller/action part.

Note: Due to an answer below, this question is specific to Grails 1.1.0.

like image 585
ahanson Avatar asked Aug 27 '09 18:08

ahanson


1 Answers

Strange, my grails 1.1.1 does use all lowercase for the URL part of the URL mappings by default. My URLs' action and controller parts are lowercase already.

Can you post your grails-app/conf/UrlMappings.groovy file?

like image 75
Sean A.O. Harney Avatar answered Nov 11 '22 13:11

Sean A.O. Harney