method
add_routes
v5.1.7 -
Show latest stable
- Class:
Rails::Generators::ControllerGenerator
add_routes()public
No documentation available.
# File railties/lib/rails/generators/rails/controller/controller_generator.rb, line 15
def add_routes
unless options[:skip_routes]
actions.reverse_each do |action|
# route prepends two spaces onto the front of the string that is passed, this corrects that.
route indent(generate_routing_code(action), 2)[2..-1]
end
end
end