Sha256: 549db78f77bb6b5ddc19efcc7e87dce692f390919053341aafbfed6235a0b72e

Contents?: true

Size: 560 Bytes

Versions: 11

Compression:

Stored size: 560 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::MAJOR >= 5
          "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/devise_invitable-2.0.9/lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.9 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.8 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.7 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.6 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.5 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.4 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.3 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.2 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.1 lib/generators/active_record/devise_invitable_generator.rb
devise_invitable-2.0.0 lib/generators/active_record/devise_invitable_generator.rb