lib/action_widget/extensions/rails/generators.rb in action_widget-0.2.0 vs lib/action_widget/extensions/rails/generators.rb in action_widget-0.3.0

- old
+ new

@@ -1,11 +1,19 @@ module ActionWidget module Extensions module Rails module Generators - - class Create < ::Rails::Generators::Base - source_root File.expand_path('../../support/templates', __FILE__) + + class Base < ::Rails::Generators::Base + + def self.namespace(name=nil) + super.sub(/extensions:rails:/, '') + end + + end + + class Create < Base + source_root File.expand_path('../../../../../support/templates', __FILE__) argument :widget_name, :type => :string class_option :rspec, :type => :boolean, :default => true, :description => "Generates rspec file" def generate_widget_implementation_file empty_directory 'app/widgets' \ No newline at end of file