Sha256: 17ea13587b9a0079c2850df70cbb7439203a80e7e90d87232483e0e69074fcf0
Contents?: true
Size: 997 Bytes
Versions: 121
Compression:
Stored size: 997 Bytes
Contents
require 'rails/generators/rails/resource/resource_generator' module Rails module Generators class ScaffoldGenerator < ResourceGenerator # :nodoc: 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 def handle_skip @options = @options.merge(stylesheets: false) unless options[:assets] @options = @options.merge(stylesheet_engine: false) unless options[:stylesheets] end hook_for :scaffold_controller, required: true hook_for :assets do |assets| invoke assets, [controller_name] end hook_for :stylesheet_engine do |stylesheet_engine| if behavior == :invoke invoke stylesheet_engine, [controller_name] end end end end end
Version data entries
121 entries across 117 versions & 9 rubygems
Version | Path |
---|---|
railties-4.0.1.rc1 | lib/rails/generators/rails/scaffold/scaffold_generator.rb |