Class: Rails::Generators::CellGenerator
- Inherits:
-
NamedBase
- Object
- NamedBase
- Rails::Generators::CellGenerator
- Defined in:
- lib/rails/generators/cell/cell_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_cell_file ⇒ Object
13 14 15 |
# File 'lib/rails/generators/cell/cell_generator.rb', line 13 def create_cell_file template 'cell.rb.erb', File.join('app/cells', class_path, "#{file_name}_cell.rb") end |
#create_view_files ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/rails/generators/cell/cell_generator.rb', line 17 def create_view_files states.each do |state| @state = state @path = File.join('app/cells', class_path, file_name, "#{state}.#{template_engine}") template "view.#{template_engine}", @path end end |