    # File lib/ramaze/controller.rb, line 70
        def self.generate_mapping(klass_name = self.name)
          chunks = klass_name.to_s.split(/::/)
          return if chunks.empty?

          last = chunks.last
          return IRREGULAR_MAPPING[last] if IRREGULAR_MAPPING.key?(last)

          last.sub!(/Controller$/, '')
          '/' << chunks.map{|chunk| chunk.snake_case }.join('/')
        end