class UrlMappings {
    static mappings = {
        "/$controller/$action?/$id?"{
            constraints {
                // apply constraints here
            }
        }

        "/image/$id/$size?/$filename?" {
            constraints {
                size(matches: /\d+/)
            }
            controller = 'pictureDetailed'
            action = 'view'
        }

        "/"(view:"/index")
        "500"(view:'/error')
    }
}
