OSDN Git Service

create xes; copy xes
authornomeu <nomeu@users.sourceforge.jp>
Thu, 7 Jul 2011 05:09:14 +0000 (14:09 +0900)
committernomeu <nomeu@users.sourceforge.jp>
Thu, 7 Jul 2011 05:09:14 +0000 (14:09 +0900)
app/models/x.rb [new file with mode: 0644]
bin/copy-xes.rb [new file with mode: 0644]

diff --git a/app/models/x.rb b/app/models/x.rb
new file mode 100644 (file)
index 0000000..ddabfcb
--- /dev/null
@@ -0,0 +1,2 @@
+class X < ActiveGroonga::Base
+end
diff --git a/bin/copy-xes.rb b/bin/copy-xes.rb
new file mode 100644 (file)
index 0000000..d881e64
--- /dev/null
@@ -0,0 +1,6 @@
+Record::X.all(:include => :arc).each do |rec|
+  x = X.new
+  x.arc = rec.arc.code
+  x.path = rec.path
+  x.save
+end