Sha256: cb47bc444fb44d77d5f84fa2163651a74b61840e97ab406078154fbb45a36bec

Contents?: true

Size: 823 Bytes

Versions: 19

Compression:

Stored size: 823 Bytes

Contents

require 'rails/generators/rails/resource/resource_generator'

module Rails
  module Generators
    class ScaffoldGenerator < ResourceGenerator #metagenerator
      remove_hook_for :resource_controller
      remove_class_option :actions

      class_option :stylesheets, :type => :boolean, :desc => "Generate Stylesheets"
      class_option :stylesheet_engine, :desc => "Engine for Stylesheets"
      class_option :assets, :type => :boolean
      class_option :resource_route, :type => :boolean

      hook_for :scaffold_controller, :required => true

      hook_for :assets do |assets|
        invoke assets, [controller_name]
      end

      hook_for :stylesheet_engine do |stylesheet_engine|
        invoke stylesheet_engine, [controller_name] if options[:stylesheets] && behavior == :invoke
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
railties-3.2.22.5 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.22.4 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.22.3 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.22.2 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.22.1 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.22 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.21 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.20 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.19 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.18 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.17 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.16 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.15 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.15.rc3 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.15.rc2 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.15.rc1 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.14 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.14.rc2 lib/rails/generators/rails/scaffold/scaffold_generator.rb
railties-3.2.14.rc1 lib/rails/generators/rails/scaffold/scaffold_generator.rb