route(routing_code)
public
Make an entry in Rails routing file
config/routes.rb
route "root 'welcome#index'"
# File railties/lib/rails/generators/actions.rb, line 254
def route(routing_code)
log :route, routing_code
sentinel = /\.routes\.draw do\s*\n/
in_root do
inject_into_file "config/routes.rb", optimize_indentation(routing_code, 2), after: sentinel, verbose: false, force: false
end
end