It’s just data

Wunderbar on Rails


Usage: add wunderbar and nokogiri to your Gemfile and run bundle install.  Template extensions supported are _html and _json.  Examples: view, layout, json.

Note that as Rails layouts and views are predicated on the assumption that output is produced by concatenating text, one must use _ yield instead of simply yield.  I have noticed that this may lose blank lines in the process, which apparently is a known issue with Nokogiri.  Not a problem if the layout is erb, but then you lose the unified indentation that you get if you have a layout using _html.

On the plus side, Wunderbar will note when the first argument to a call which creates an element is html_safe? and will treat it as markup.  An example of where this is useful would be in the _td link_to calls below.

_h1_ 'Listing products'

_table do
  _tr do
    _th 'Title'

  @products.each do |product|
    _tr_ do
      _td product.title
      _td link_to 'Show', product
      _td link_to 'Edit', edit_product_path(product)
      _td link_to 'Destroy', product, confirm: 'Are you sure?', method: :delete 


_ link_to 'New Product', new_product_path

If you are in the hunt of games which can let you play cards games so here these games are one of the best games in the market according to the feedback of players. If you play these games for once you will loving these games for playing again and again.

Posted by hearts card game online free at

Add your comment