Class: Redde::Generators::ScaffoldGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Redde::Generators::ScaffoldGenerator
- Defined in:
- lib/generators/redde/scaffold/scaffold_generator.rb
Instance Attribute Summary collapse
-
#base_name ⇒ Object
Returns the value of attribute base_name.
-
#controller_class_nesting ⇒ Object
Returns the value of attribute controller_class_nesting.
-
#controller_class_nesting_depth ⇒ Object
Returns the value of attribute controller_class_nesting_depth.
-
#controller_class_path ⇒ Object
Returns the value of attribute controller_class_path.
-
#controller_file_path ⇒ Object
Returns the value of attribute controller_file_path.
-
#controller_routing_path ⇒ Object
Returns the value of attribute controller_routing_path.
-
#model_name ⇒ Object
Returns the value of attribute model_name.
Instance Method Summary collapse
- #copy_views ⇒ Object
- #generate_translations ⇒ Object
-
#initialize(args, *options) ⇒ ScaffoldGenerator
constructor
A new instance of ScaffoldGenerator.
Constructor Details
#initialize(args, *options) ⇒ ScaffoldGenerator
Returns a new instance of ScaffoldGenerator.
16 17 18 19 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 16 def initialize(args, *) super(args, *) initialize_views_variables end |
Instance Attribute Details
#base_name ⇒ Object
Returns the value of attribute base_name.
12 13 14 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 12 def base_name @base_name end |
#controller_class_nesting ⇒ Object
Returns the value of attribute controller_class_nesting.
12 13 14 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 12 def controller_class_nesting @controller_class_nesting end |
#controller_class_nesting_depth ⇒ Object
Returns the value of attribute controller_class_nesting_depth.
12 13 14 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 12 def controller_class_nesting_depth @controller_class_nesting_depth end |
#controller_class_path ⇒ Object
Returns the value of attribute controller_class_path.
12 13 14 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 12 def controller_class_path @controller_class_path end |
#controller_file_path ⇒ Object
Returns the value of attribute controller_file_path.
12 13 14 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 12 def controller_file_path @controller_file_path end |
#controller_routing_path ⇒ Object
Returns the value of attribute controller_routing_path.
12 13 14 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 12 def controller_routing_path @controller_routing_path end |
#model_name ⇒ Object
Returns the value of attribute model_name.
12 13 14 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 12 def model_name @model_name end |
Instance Method Details
#copy_views ⇒ Object
21 22 23 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 21 def copy_views generate_views end |
#generate_translations ⇒ Object
25 26 27 |
# File 'lib/generators/redde/scaffold/scaffold_generator.rb', line 25 def generate_translations template 'ru.yml', "config/locales/#{resource_name}/ru.yml" end |