Sha256: 31ff0c53752a5e1bb3977c76d268b3d0a817e9276d9e8a5d9387b0e0c1b37c5c
Contents?: true
Size: 721 Bytes
Versions: 29
Compression:
Stored size: 721 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
29 entries across 29 versions & 1 rubygems