Module: ActiveRecord::Migrations

Defined in:
lib/active_record/migrations.rb,
lib/active_record/migrations/tasks.rb,
lib/active_record/migrations/version.rb,
lib/active_record/migrations/generator.rb

Defined Under Namespace

Classes: Generator

Constant Summary collapse

VERSION =
"1.5.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.rootObject

Returns the value of attribute root.



26
27
28
# File 'lib/active_record/migrations/tasks.rb', line 26

def root
  @root
end

Class Method Details

.database?Boolean

Returns:

  • (Boolean)


33
34
35
36
37
# File 'lib/active_record/migrations/tasks.rb', line 33

def self.database?
	!ActiveRecord::Base.connection.data_sources.empty?
rescue ActiveRecord::NoDatabaseError
	false
end

.migrations_rootObject



28
29
30
# File 'lib/active_record/migrations/tasks.rb', line 28

def migrations_root
	File.join(self.root, 'db/migrate')
end