Sha256: 99d597f45cbdf242410dc98f9e6c7201c26783acb01829bea8e5e9da80a6675b

Contents?: true

Size: 324 Bytes

Versions: 2

Compression:

Stored size: 324 Bytes

Contents

module RailsPages
  module Generators
    class ResourceRouteGenerator < Rails::Generators::NamedBase
      source_root File.expand_path(__FILE__)

      def insert_resource_route
        route "resources :#{ARGV[0].pluralize}, :only => :show, :format => false, :constraints => { :id => /.+?/ }"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_pages-0.0.2 lib/generators/rails_pages/resource_route/resource_route_generator.rb
rails_pages-0.0.1 lib/generators/rails_pages/resource_route/resource_route_generator.rb