Sha256: af33077b5e26f59899b3c1ac93425137e29a7d429410f79ceecd5d165f807de9
Contents?: true
Size: 564 Bytes
Versions: 3
Compression:
Stored size: 564 Bytes
Contents
require 'rails/generators/active_record' module ActiveRecord module Generators class DeviseInvitableGenerator < ActiveRecord::Generators::Base source_root File.expand_path("../templates", __FILE__) def copy_devise_migration migration_template "migration.rb", "db/migrate/devise_invitable_add_to_#{table_name}.rb", migration_version: migration_version end def migration_version if Rails.version.start_with? '5.' "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems