add_resource_route (Merb::Generators::ResourceControllerGenerator)

    # File lib/generators/resource_controller.rb, line 54
        def add_resource_route(plural_resource)
          router_path = Merb.root + "/config/router.rb"
          sentinel = "Merb::Router.prepare do"
          to_inject = "resources :#{plural_resource}"
          if File.exist?(router_path)
            content = File.read(router_path).gsub(/(#{Regexp.escape(sentinel)})/mi){|match| "#{match}\n  #{to_inject}"}
            File.open(router_path, 'wb') { |file| file.write(content) }
          end
        end