lib/generators/rails/notifier_generator.rb in pubsub_notifier-0.1.0 vs lib/generators/rails/notifier_generator.rb in pubsub_notifier-0.1.1
- old
+ new
@@ -1,11 +1,12 @@
module Rails
module Generators
- class NotifierGenerator < ::Rails::Generators::NamedBase
+ class NotifierGenerator < NamedBase
source_root File.expand_path("../templates", __FILE__)
+ check_class_collision suffix: "Notifier"
def create_notifier_file
- template 'notifier.rb', File.join('app/notifiers', class_path, "#{file_name}_notifier.rb")
+ template "notifier.tt", File.join("app/notifiers", class_path, "#{file_name}_notifier.rb")
end
hook_for :test_framework
end
end