@@ -7,17 +7,17 @@ module Generators
7
7
class ScaffoldGenerator < Base
8
8
include ::Rails ::Generators ::ResourceHelpers
9
9
source_paths << File . expand_path ( '../helper/templates' , __dir__ )
10
- argument :attributes , : type => :array , : default => [ ] , : banner => "field:type field:type"
10
+ argument :attributes , type : :array , default : [ ] , banner : "field:type field:type"
11
11
12
- class_option :orm , : desc => "ORM used to generate the controller"
13
- class_option :template_engine , : desc => "Template engine to generate view files"
14
- class_option :singleton , : type => :boolean , : desc => "Supply to create a singleton controller"
15
- class_option :api , : type => :boolean , : desc => "Skip specs unnecessary for API-only apps"
12
+ class_option :orm , desc : "ORM used to generate the controller"
13
+ class_option :template_engine , desc : "Template engine to generate view files"
14
+ class_option :singleton , type : :boolean , desc : "Supply to create a singleton controller"
15
+ class_option :api , type : :boolean , desc : "Skip specs unnecessary for API-only apps"
16
16
17
- class_option :controller_specs , : type => :boolean , : default => true , : desc => "Generate controller specs"
18
- class_option :view_specs , : type => :boolean , : default => true , : desc => "Generate view specs"
19
- class_option :helper_specs , : type => :boolean , : default => true , : desc => "Generate helper specs"
20
- class_option :routing_specs , : type => :boolean , : default => true , : desc => "Generate routing specs"
17
+ class_option :controller_specs , type : :boolean , default : true , desc : "Generate controller specs"
18
+ class_option :view_specs , type : :boolean , default : true , desc : "Generate view specs"
19
+ class_option :helper_specs , type : :boolean , default : true , desc : "Generate helper specs"
20
+ class_option :routing_specs , type : :boolean , default : true , desc : "Generate routing specs"
21
21
22
22
def initialize ( *args , &blk )
23
23
@generator_args = args . first
@@ -60,7 +60,7 @@ def generate_routing_spec
60
60
template 'routing_spec.rb' , template_file
61
61
end
62
62
63
- hook_for :integration_tool , :as => :integration
63
+ hook_for :integration_tool , as : :integration
64
64
65
65
protected
66
66
0 commit comments