Sha256: ce16c023baaac3aa7c0f3c12f983fb83276f2ad7a2a38fda06e23638b6050b77

Contents?: true

Size: 731 Bytes

Versions: 31

Compression:

Stored size: 731 Bytes

Contents

require 'rails/generators/rails/resource/resource_generator'
#require 'generators/active_scaffold_controller/active_scaffold_controller_generator'

module Rails
  module Generators
    class ActiveScaffoldGenerator < ResourceGenerator #metagenerator
      remove_hook_for :resource_controller
      remove_hook_for :resource_route
      remove_class_option :actions
      
      def add_resource_route
        route_config =  class_path.collect{|namespace| "namespace :#{namespace} do " }.join(" ") 
        route_config << "resources :#{file_name.pluralize} do as_routes end"
        route_config << " end" * class_path.size 
        route route_config
      end 
     
      invoke "active_scaffold_controller"
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
active_scaffold-3.4.17 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.16 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.14 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.13 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.12 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.11 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.10 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.9 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.8 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.7 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.5 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.4 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.3 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.2 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.1 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.0.1 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.4.0 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.3.3 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.3.2 lib/generators/active_scaffold/active_scaffold_generator.rb
active_scaffold-3.3.1 lib/generators/active_scaffold/active_scaffold_generator.rb