No commit activity in last 3 years
No release in over 3 years
This module provides table_for(model) and dl_for(model) helpers.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Gem Gem Inch CI Ruby

table builder and description list (dl) helper for Rails / ActiveModels

Usage

/ on Rails
/ foo.html.slim

= table_for(@bars) do |s|
  - s.only :id, :name, :kind, :foo_id
  - s.link :id, :bar_path
  - s.link :foo_id, :foo_path
  - s.format :foo_id, [:foo_id, [:foo, :name]]
  - s.format :kind do |record|
    = Foo::KIND[record.kind]

= dl_for(@foo, except: [:created_at, :updated_at])

see API Documents for details

Installation

Add this line to your application's Gemfile:

gem "record_view_helper"

And then execute:

$ bundle

Or install it yourself as:

$ gem install record_view_helper

See also

License

The gem is available as open source under the terms of the Zlib License.