Class: Brancusi::ControllerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/brancusi/controller/controller_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_controllerObject



7
8
9
10
11
12
# File 'lib/generators/brancusi/controller/controller_generator.rb', line 7

def create_controller
  template 'controller.rb', File.join("app/assets/javascripts/app/controllers", "#{file_name}_controller.js.coffee")
  actions.each do |action|
    generate('brancusi:view', "#{file_name}/#{action}")
  end
end