How to fix “Bad URI (is not URI?)”

This URL contains special characters, which Ruby can’t handle: URI.parse ‘http://www.yr.no/sted/Finland/Västra_Finland/Askainen/varsel.xml’ URI::InvalidURIError: bad URI(is not URI?): http://www.yr.no/sted/Finland/Västra_Finland/Askainen/varsel.xml 3 from /usr/local/lib/ruby/1.8/uri/common.rb:436:in … Continue reading How to fix “Bad URI (is not URI?)”

observe_field in Ruby on Rails (another way to use ajax)

Code in View: function serialize_fields(){ var fields = new Array(); fields.push(Form.Element.serialize(‘content_node_name’)); fields.push(Form.Element.serialize(‘content_node[destination_id]’)); fields.push(Form.Element.serialize(‘content_node[parent_id]’)); fields.push(Form.Element.serialize(‘cont_id’)); return fields.join(‘&’); } <%= observe_field “content_node_name”, … Continue reading observe_field in Ruby on Rails (another way to use ajax)