- fixed map api call in version 0.4.

This commit is contained in:
Immanuel Scholz 2007-01-13 04:03:46 +00:00
parent 9189093997
commit 1ecf13d846
3 changed files with 7 additions and 7 deletions

View file

@ -101,7 +101,7 @@ class Node < ActiveRecord::Base
key = parts[0].strip unless parts[0].nil?
val = parts[1].strip unless parts[1].nil?
if key != '' && val != ''
el2 = Node.new('tag')
el2 = XML::Node.new('tag')
el2['k'] = key.to_s
el2['v'] = val.to_s
el << el2

View file

@ -8,8 +8,8 @@ class Segment < ActiveRecord::Base
has_many :old_segments, :foreign_key => :id
belongs_to :user
has_one :from_node, :class => 'Node', :foreign_key => 'node_a'
has_one :to_node, :class => 'Node', :foreign_key => 'node_b'
has_one :from_node, :class_name => 'Node', :foreign_key => 'node_a'
has_one :to_node, :class_name => 'Node', :foreign_key => 'node_b'
def self.from_xml(xml, create=false)
p = XML::Parser.new
@ -104,7 +104,7 @@ class Segment < ActiveRecord::Base
end
def precondtions_ok?
return from_node and from_node.visible and to_node and to_node.visible
from_node and from_node.visible and to_node and to_node.visible
end
end