instance method add_resource_route

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v3.1.12

Available in: v3.0.20 v3.1.12

Signature

add_resource_route()

No documentation comment.

Source
# File railties/lib/rails/generators/rails/resource/resource_generator.rb, line 17
      def add_resource_route
        return if options[:actions].present?
        route_config =  class_path.collect{|namespace| "namespace :#{namespace} do " }.join(" ")
        route_config << "resources :#{file_name.pluralize}"
        route_config << " end" * class_path.size
        route route_config
      end

Defined in railties/lib/rails/generators/rails/resource/resource_generator.rb line 17 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generators::ResourceGenerator

Type at least 2 characters to search.

↑↓ navigate · open · esc close