{"id":14955615,"url":"https://github.com/yhirano55/table_help","last_synced_at":"2025-10-08T18:02:14.274Z","repository":{"id":56896899,"uuid":"106137648","full_name":"yhirano55/table_help","owner":"yhirano55","description":"Provide helper methods to build collection or resource tables for Rails 5","archived":false,"fork":false,"pushed_at":"2018-06-15T09:17:01.000Z","size":31,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T01:14:52.040Z","etag":null,"topics":["actionview","erb","rails5"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yhirano55.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-07T23:39:12.000Z","updated_at":"2020-02-05T07:56:35.000Z","dependencies_parsed_at":"2022-08-21T00:50:40.859Z","dependency_job_id":null,"html_url":"https://github.com/yhirano55/table_help","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhirano55%2Ftable_help","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhirano55%2Ftable_help/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhirano55%2Ftable_help/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhirano55%2Ftable_help/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yhirano55","download_url":"https://codeload.github.com/yhirano55/table_help/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234726143,"owners_count":18877489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actionview","erb","rails5"],"created_at":"2024-09-24T13:11:27.236Z","updated_at":"2025-10-01T18:31:49.103Z","avatar_url":"https://github.com/yhirano55.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TableHelp\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Gem Version](https://badge.fury.io/rb/table_help.svg)](https://badge.fury.io/rb/table_help)\n[![Build Status](https://travis-ci.org/yhirano55/table_help.svg?branch=master)](https://travis-ci.org/yhirano55/table_help)\n\nProvide helper methods to build collection or resource tables for Rails 5.\n\n`table_for` and `attributes_table_for` helper methods implemented in `TableHelp` are inspired by [ActiveAdmin](https://github.com/activeadmin/activeadmin).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'table_help'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install table_help\n\n## Usage\n\n### Collection\n\n```html+erb\n\u003c%= table_for @articles do |t| %\u003e\n  \u003c% t.column :title %\u003e\n  \u003c% t.column :body do |article| %\u003e\n    \u003c%= truncate(article.body) %\u003e\n  \u003c% end %\u003e\n  \u003c% t.column :created_at %\u003e\n  \u003c% t.column :updated_at %\u003e\n  \u003c% t.column do |article| %\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003c%= link_to \"Show\", article %\u003e\u003c/li\u003e\n      \u003cli\u003e\u003c%= link_to \"Edit\", edit_article_path(article) %\u003e\u003c/li\u003e\n      \u003cli\u003e\u003c%= link_to \"Destroy\", article, method: :delete %\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c% end %\u003e\n\u003c% end %\u003e\n```\n\n### Resource\n\n```html+erb\n\u003c%= attributes_table_for @article do |t| %\u003e\n  \u003c% t.row :title %\u003e\n  \u003c% t.row :body do |article| %\u003e\n    \u003c%= truncate(article.body) %\u003e\n  \u003c% end %\u003e\n  \u003c% t.row :created_at %\u003e\n  \u003c% t.row :updated_at %\u003e\n  \u003c% t.row do |article| %\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003c%= link_to \"Edit\", edit_article_path(article) %\u003e\u003c/li\u003e\n      \u003cli\u003e\u003c%= link_to \"Destroy\", article, method: :delete %\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c% end %\u003e\n\u003c% end %\u003e\n```\n\n## Configuration\n\nYou can change the default options for each table.\n\n```ruby\n# config/initializers/table_help.rb\nTableHelp.config.default_options = {\n  table_for: { class: \"table_for your_optional_style\", border: \"1\" },\n  attributes_table_for: { class: \"attributes_table_for your_optional_style\", border: \"0\" },\n}\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhirano55%2Ftable_help","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyhirano55%2Ftable_help","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhirano55%2Ftable_help/lists"}