Class: DecentExposure::Generators::ScaffoldTemplatesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/decent_exposure/scaffold_templates_generator.rb

Constant Summary collapse

VIEWS =
i[_form edit index new show]
AVAILABLE_ENGINES =
%w[erb haml]

Instance Method Summary collapse

Instance Method Details

#generateObject



13
14
15
16
17
18
# File 'lib/generators/decent_exposure/scaffold_templates_generator.rb', line 13

def generate
  validate_template_engine

  generate_controller
  VIEWS.each { |view| generate_view(view) }
end