lib/generators/rating/install_generator.rb in rating-0.8.0 vs lib/generators/rating/install_generator.rb in rating-0.9.0
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
module Rating
class InstallGenerator < Rails::Generators::Base
- source_root File.expand_path('../templates', __FILE__)
+ source_root File.expand_path('templates', __dir__)
desc 'Creates Rating migration'
def create_migration
template 'db/migrate/create_rating_table.rb', "db/migrate/#{timestamp(0)}_create_rating_table.rb"