Sha256: a64053b6c51d688d294fa2a83ff08ca7d47d3bda2f6b123e60556914a1071ff3
Contents?: true
Size: 473 Bytes
Versions: 3
Compression:
Stored size: 473 Bytes
Contents
require 'active_record/schema_dumper' class Storey::RubyDumper def self.dump(*args) self.new(*args).dump end def initialize(options={}) default_file_path = File.join(Rails.root, 'db', 'schema.rb') @file = options[:file] || default_file_path end def dump File.open(@file, "w:utf-8") do |file| ActiveRecord::Base.establish_connection(Rails.env) ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
storey-0.4.0 | lib/storey/ruby_dumper.rb |
storey-0.3.6 | lib/storey/ruby_dumper.rb |
storey-0.3.5 | lib/storey/ruby_dumper.rb |