Skip to content

Commit ac7e53a

Browse files
committed
update README
1 parent 34f3ef2 commit ac7e53a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ This gem provides a mixin for ActiveRecord support table models that allows you
88

99
These kinds of models blur the line between data and code. You'll often end up with constants and application logic based on specific values that need to exist in the table. By using this gem, you can easily define methods for loading and comparing specific instances. This can give you cleaner code that reads far more naturally. You can also avoid defining dozens of constants or referencing magic values (i.e. no more hard-coded strings or ids in the code to look up specific records).
1010

11+
## Table of Contents
12+
13+
- [Usage](#usage)
14+
- [Specifying Data Files](#specifying-data-files)
15+
- [Named Instances](#named-instances)
16+
- [Documenting Named Instance Helpers](#documenting-named-instance-helpers)
17+
- [Caching](#caching)
18+
- [Loading Data](#loading-data)
19+
- [Testing](#testing)
20+
- [Installation](#installation)
21+
- [Contributing](#contributing)
22+
- [License](#license)
23+
1124
## Usage
1225

1326
In the examples below, suppose we have a simple `Status` model in which each row has an id and a name, and the name can only have a handful of statuses: "Pending", "In Progress", and "Completed".
@@ -212,6 +225,9 @@ class Thing < ApplicationRecord
212225
end
213226
```
214227
228+
> ![TIP]
229+
> The [support_table](https://github.com/bdurand/support_table) gem combines both gems in a drop in solution for Rails applications.
230+
215231
### Loading Data
216232
217233
Calling `sync_table_data!` on your model class will synchronize the data in the database table with the values from the data files.

0 commit comments

Comments
 (0)