class Neo4j::PendingMigrationError
Inspired/taken from active_record/migration.rb
Public Class Methods
new(migrations)
click to toggle source
Calls superclass method
# File lib/neo4j/errors.rb 37 def initialize(migrations) 38 pending_migrations = migrations.join("\n") 39 if rails? && defined?(Rails.env) 40 super("Migrations are pending:\n#{pending_migrations}\n To resolve this issue, run:\n\n #{command_name} neo4j:migrate RAILS_ENV=#{::Rails.env}") 41 else 42 super("Migrations are pending:\n#{pending_migrations}\n To resolve this issue, run:\n\n #{command_name} neo4j:migrate") 43 end 44 end
Private Instance Methods
command_name()
click to toggle source
# File lib/neo4j/errors.rb 48 def command_name 49 return 'rake' unless rails? 50 Rails.version.to_f >= 5 ? 'bin/rails' : 'bin/rake' 51 end
rails?()
click to toggle source
# File lib/neo4j/errors.rb 53 def rails? 54 defined?(Rails) 55 end