/ Published in: Ruby
put this into lib/tasks and then run rake db:version
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
namespace :db do desc "Returns the current schema version" task :version => :environment do puts "Current version: " + ActiveRecord::Migrator.current_version.to_s end end
URL: http://jayfields.blogspot.com/2006/11/rails-get-schemainfo-version-number.html