lib/generators/haml/controller/controller_generator.rb in rails3-generators-0.8.2 vs lib/generators/haml/controller/controller_generator.rb in rails3-generators-0.9.0

- old
+ new

@@ -1,24 +1,16 @@ require 'generators/haml' -require 'rails/generators/named_base' +require 'rails/generators/erb/controller/controller_generator' module Haml module Generators - class ControllerGenerator < Rails::Generators::NamedBase + class ControllerGenerator < Erb::Generators::ControllerGenerator extend TemplatePath - - argument :actions, :type => :array, :default => [], :banner => "action action" - def create_view_files - base_path = File.join("app/views", class_path, file_name) - empty_directory base_path + protected - actions.each do |action| - @action = action - @path = File.join(base_path, "#{action}.html.haml") - - template 'view.html.haml', @path + def handler + :haml end - end end end -end \ No newline at end of file +end