Sha256: 207e35a625e16147e31be0465260ade80ff2b77ff45cd09ed9174942520c24d1

Contents?: true

Size: 560 Bytes

Versions: 8

Compression:

Stored size: 560 Bytes

Contents

require_relative 'abstract_migration_generator'

class Sufia::Models::OrcidFieldGenerator < Sufia::Models::AbstractMigrationGenerator
  source_root File.expand_path('../templates', __FILE__)

  desc """
This generator adds a field to hold users' ORCIDs to your application:
 1. Creates a database migration if they do not exist in /db/migrate
       """

  def banner
    say_status("info", "ADDING ORCID FIELD TO USER MODEL", :blue)
  end

  # Setup the database migration
  def copy_migrations
    better_migration_template 'add_orcid_to_users.rb'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sufia-models-6.7.0 lib/generators/sufia/models/orcid_field_generator.rb
sufia-models-6.6.1 lib/generators/sufia/models/orcid_field_generator.rb
sufia-models-6.6.0 lib/generators/sufia/models/orcid_field_generator.rb
sufia-models-6.5.0 lib/generators/sufia/models/orcid_field_generator.rb
sufia-models-6.4.0 lib/generators/sufia/models/orcid_field_generator.rb
sufia-models-6.3.0 lib/generators/sufia/models/orcid_field_generator.rb
sufia-models-6.2.0 lib/generators/sufia/models/orcid_field_generator.rb
sufia-models-6.1.0 lib/generators/sufia/models/orcid_field_generator.rb