Class: WebAppTheme::Generators::ScaffoldGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::NamedBase
- Base
- WebAppTheme::Generators::ScaffoldGenerator
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/web_app_theme/scaffold/scaffold_generator.rb
Instance Method Summary collapse
- #copy_edit_file ⇒ Object
- #copy_form_file ⇒ Object
- #copy_index_file ⇒ Object
- #copy_new_file ⇒ Object
- #copy_show_file ⇒ Object
- #copy_sidebar ⇒ Object
- #create_root_folder ⇒ Object
Methods inherited from Base
Instance Method Details
#copy_edit_file ⇒ Object
25 26 27 |
# File 'lib/generators/web_app_theme/scaffold/scaffold_generator.rb', line 25 def copy_edit_file copy_view :edit end |
#copy_form_file ⇒ Object
37 38 39 |
# File 'lib/generators/web_app_theme/scaffold/scaffold_generator.rb', line 37 def copy_form_file copy_view :_form, :form end |
#copy_index_file ⇒ Object
20 21 22 23 |
# File 'lib/generators/web_app_theme/scaffold/scaffold_generator.rb', line 20 def copy_index_file return if [:singleton] copy_view :index, :tables end |
#copy_new_file ⇒ Object
33 34 35 |
# File 'lib/generators/web_app_theme/scaffold/scaffold_generator.rb', line 33 def copy_new_file copy_view :new end |
#copy_show_file ⇒ Object
29 30 31 |
# File 'lib/generators/web_app_theme/scaffold/scaffold_generator.rb', line 29 def copy_show_file copy_view :show end |
#copy_sidebar ⇒ Object
41 42 43 44 |
# File 'lib/generators/web_app_theme/scaffold/scaffold_generator.rb', line 41 def return unless [:style] == "web_app_theme" copy_view :_sidebar, :sidebar end |
#create_root_folder ⇒ Object
16 17 18 |
# File 'lib/generators/web_app_theme/scaffold/scaffold_generator.rb', line 16 def create_root_folder empty_directory File.join("app/views", controller_file_path) end |