ref: refs/heads/use-activeresource commit 8d856834589953f1be87485f2d0a856e37aa9554 Author: Stefan Schubert <schubi@suse.de> Date: Mon Aug 17 15:15:21 2009 +0200 added dummy-host for Sinatra --- .../db/migrate/20090817130056_insert_dummy_host.rb | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/webclient/db/migrate/20090817130056_insert_dummy_host.rb b/webclient/db/migrate/20090817130056_insert_dummy_host.rb new file mode 100644 index 0000000..64d3777 --- /dev/null +++ b/webclient/db/migrate/20090817130056_insert_dummy_host.rb @@ -0,0 +1,16 @@ +class InsertDummyHost < ActiveRecord::Migration + def self.up + Host.create( + :url => 'http://localhost:4567', + :name => 'dummy-host', + :updated_at => Time.now.utc, + :description => 'Dummy REST service(host)', + :created_at => Time.now.utc + ) if ENV['RAILS_ENV'] != 'production' + end + + def self.down + host = Host.find_by_name('dummy-host') + host.destroy if host + end +end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org