views:

13

answers:

0

I am trying to write a Rails app that takes an XML object and then iterates over the object showing the user the information contained inside the different nodes.

I am completely new to Rails, coming from a PHP background and am having some trouble with a particular function.

I need to basically say, if this node exists die, if it doesn't continue with the code. Now I know how to do this in PHP but for the life of me can't figure it out in Ruby using Hpricot.

Controller:

@auth_ck.seach("/#{error}") do
      puts "error!"
    end

Any idea what I am doing wrong?