Class: PartGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- PartGenerator
- Defined in:
- lib/generators/part_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_part_views ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/generators/part_generator.rb', line 14 def create_part_views inside("app/parts/views/#{file_name}_part") do actions.each do |action| create_file "#{action}.html.erb" end end end |
#generate_part_class ⇒ Object
10 11 12 |
# File 'lib/generators/part_generator.rb', line 10 def generate_part_class template "part.rb", "app/parts/#{file_name}_part.rb" end |