i am using rexml and try to find id from Comment table i got the error
my code is like this....
XPath.each(new_article, 'comments') do |comments|
XPath.each(comments, 'comment') do |new_comment|
c_oldid =
XmlMigratedData.find(:first,:conditions=>["model_type=? and
ext_id=?","Comment",new_comment.attribute('id').to_s])
if c_oldid !=nil
debugger
@comment=Comment.find(c_oldid.int_id)
@comment.update_attributes(:article_id=>article.id) if
@comment
else
logger.error("#{comment.attribute('id').to_s} for
#{old_id}")
end
end
end
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/runner.rb:47:
undefined method `find' for REXML::Comment:Class (NoMethodError)
Suggest me....
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---