Ruby Version (the version included in LipsiADMIN):
bool_fn = "function(v, p, r){ var tmp = (v!=undefined && v!=''); return Ext.util.Format.boolRenderer(tmp, p, r) }".to_l @column_store = column_store_for Order do |cm| cm.add :custom_id cm.add :invoice_name cm.add "name", :align => :center, :dataIndex => :order_from cm.add :package_weigth, :hidden => true, :align => :center, :sortable => false cm.add "order_items.first.delivery_name", "Spedizione", :hidden => true, :dataIndex => "orders.order_items.delivery_name", :sortable => false cm.add :payment_name, :align => :center, :sortable => false cm.add "ecommerce.name", "Ecommerce", :align => :center, :sortable => false cm.add "ebay_order.id", "Cod. Ebay Ord.", :hidden => true, :sortable => false cm.add :total, :renderer => :eur_money, :align => :right, :align => :right, :sortable => false cm.add "has_invoice?", :renderer => :boolean, :align => :center, :editor => { :xtype => :checkbox }, :sortable => false, :header => "Fatturato", :name => "order[invoice_attribute][date]", :dataIndex => "orders.has_invoice" cm.add :shipped, :renderer => :boolean, :align => :center, :editor => { :xtype => :checkbox }, :sortable => false cm.add :updated_at, :renderer => :datetime, :align => :right, :hidden => true end
Yaml Version:
renderers: boolean: &boolean_renderer renderer: | __js__ function(v, p, r){ var tmp = (v!=undefined && v!=''); return Ext.util.Format.boolRenderer(tmp, p, r) } editors: checkbox: &checkbox xtype: checkbox columns: - id: custom_id - id: invoice_name - id: name dataIndex: order_from align: center - id: package_weigth hidden: true align: center sortable: false - id: delivery_name dataIndex: order_items.first.delivery_name header: Spedizione - id: payment_name align: center sortable: false - id: ecommerce_name dataIndex: ecommerce.name header: Ecommerce align: center sortable: false - id: ebay_order_id dataIndex: ebay_order.id header: Cod. Ebay Ord. hidden: true sortable: false - id: total renderer: eur_money align: right sortable: true - id: has_invoice method: has_invoice? renderer: boolean align: center editor: *checkbox sortable: false header: Fatturato name: "order[invoice_attribute][date]" - id: shipped renderer: boolean align: center - id: paid_time <<: *boolean_renderer - id: updated_at renderer: datetime align: right hidden: true
My choice is yaml version, more concise and more clear.
And you? What do you prefer?

I prefer the Yalm version, although I am used to the Rails convention. The question that I still ask is although the Yaml might seem cleaner and easier to understand the question is, is there proper syntax validations in IDE's and would it be easy to debug when a error occurs?