Sha256: 1e129beea850666dbcb198c852ba675ea0a3ac0cc7c2c9b9a6de9598cbbd68e0
Contents?: true
Size: 640 Bytes
Versions: 6
Compression:
Stored size: 640 Bytes
Contents
# frozen_string_literal: true require 'rails/generators/active_record' module ActiveRecord module Generators class SailGenerator < ActiveRecord::Generators::Base source_root File.expand_path('../templates', __FILE__) def copy_sail_migration migration_template 'settings_migration.rb', "db/migrate/#{target_name}.rb", migration_version: migration_version end def migration_version if Rails.version.start_with?('5') "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end end def target_name name || 'create_sail_settings' end end end end
Version data entries
6 entries across 6 versions & 1 rubygems