Sha256: 249ca0bf519bd1d4b58b849cb43cb90ec636c9ee36a64474e4ec52b6d3321580
Contents?: true
Size: 864 Bytes
Versions: 8
Compression:
Stored size: 864 Bytes
Contents
# frozen_string_literal: true require 'rails/generators' require 'rails/generators/active_record' module Doorkeeper class ApplicationOwnerGenerator < ::Rails::Generators::Base include ::Rails::Generators::Migration source_root File.expand_path('templates', __dir__) desc 'Provide support for client application ownership.' def application_owner migration_template( 'add_owner_to_application_migration.rb.erb', 'db/migrate/add_owner_to_application.rb', migration_version: migration_version ) end def self.next_migration_number(dirname) ActiveRecord::Generators::Base.next_migration_number(dirname) end private def migration_version if ActiveRecord::VERSION::MAJOR >= 5 "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems