Ruby on Rails database loading and saving

I have a problem to fetch data from my rails applications. It is Rails 2.3 and xml files (rxml) and I use DHTMLX. They are close in may ways. I used the same techniques initialize and load the data from the rxml file. Rail processes rxml into xml with full of data.However, I followed the guide http://docs.webix.com/datatable__external_configuration.html to make xml file in rails but webix not showing anything in the datatable I setup. tried

 { view:"datatable", datatype:"xml", url:"rest->/finance/clients/" }

 { view:"datatable", datatype:"xml", url:"/finance/clients/" }

don’t work. /finance/clients/ is working is DHTMLX.

My rxml file is

xml.instruct! :xml, :version=>"1.0"

xml.data do
  xml.config do
    xml.columns do
      xml.column "id" => "name", "title" => t('name')
      xml.column "id" => "address", "title" => t('address')
      xml.column "id" => "phone", "title" => t('phone')
      xml.column "id" => "email", "title" => t('email')
    end
  end
  @clients.each do |client|
    xml.item "id" => client.id, "name" => client.name, "address" => client.address, "phone" => client.phone, "email" => client.email
  end
end

The guide is helpful but not enough and internet source about webix is not enough either.
I hope you can help me. Thank you.

Unfortunately you have found the regression in the latest version.
You can:

a) update codebase ( same fix will be released as Webix 1.7 )
https://s3.amazonaws.com/uploads.hipchat.com/15721/61242/870DLpMChDTRAly/webix_v1.6.0.zip

or

b) change xml from

<columns>

to

<columns stack="true">

I used all the combinations: both point a and b along with
{ view:“datatable”, datatype:“xml”, url:“rest->/finance/clients/” } or
{ view:“datatable”, datatype:“xml”, url:"/finance/clients/" }

None works for me.

Please check
http://webix.com/snippet/957edce9

Thanks for the help. It is still not working. For some reason webix not able to get rails xml file. My app log not showing problem and nothing about xml file or and its sql query.

Can you share the problematic XML output.

To be correctly parsed

  • xml must be valid
  • it must be server with xml/text content type
  • there must not be any whitespaces before start of xml and a first tag.

the xml is rxml (rails xml) combines rails and xml to glue them together. It is to understand. I made sure it works for webix format.

xml.data do
  xml.config "stack" => "true" do
    xml.columns do
      xml.column "id" => "name", "header" => t('name')
      xml.column "id" => "address", "header" => t('address')
      xml.column "id" => "phone", "header" => t('phone')
      xml.column "id" => "email", "header" => t('email')
    end
  end
end

THe problem is not with rxml file it is with getting the file. If the file is proccessed, it either shows data or flags error message in the browsed or in app log file. The only trace I found is the log bellow. The problem I think is with this ( Rendering template within layouts/application ) it should not happen because the rxml file is in /finance/ not in /layout. I use at the same time DHTMLX components. They work as they are supposed to do. Just load the componant with xml thourgh loadXML or just load("/finance/asset_to_categories") and it works without processing layout/application thing. It processes the right url.

Processing FinanceController#asset_to_categories (for 127.0.0.1 at 2014-04-12 15:56:41) [GET]
  Parameters: {"controller"=>"finance", "action"=>"asset_to_categories"}
Rendering template within layouts/application
Rendering finance/asset_to_categories
Completed in 22ms (View: 18, DB: 0) | 200 OK [http://localhost/finance/asset_to_categories]

I used webix datatype like this

    dtable = new webix.ui({
      view:"datatable",
	  container:"grid",
      url:"rest->/finance/asset_to_categories",
      datatype:"xml"
    });

I tried rest-> sync-> get-> or just direct same result. post-> gives me error (authorization)