I am using http.get in a model to parse html code returned from a Oracle
server.
My first try was to use assertions (assert and assert_select) to test
and parse the html code. But I have problems including the methods in
the model. Have tried both "include" and copy/paste to get assertion
methods into my model. Works as a model, but I get load errors when I am
using the model from a controller.
Does anyone known the correct way to get assertion methods merged into a
model?
I am considering replace assertions with a html parser. Is there a
recommented html parser for ruby?
I am using http.get in a model to parse html code returned from a Oracle
server.
My first try was to use assertions (assert and assert_select) to test
and parse the html code. But I have problems including the methods in
the model.
Why do you need assertions to parse HTML? Assertions are for tests, not
generic parsing.
Have tried both "include" and copy/paste to get assertion
methods into my model. Works as a model, but I get load errors when I am
using the model from a controller.
What do the errors say?
Does anyone known the correct way to get assertion methods merged into a
model?
I am considering replace assertions with a html parser.
Good idea.
Is there a
recommented html parser for ruby?
I think most people are using Nokogiri these days.