README.md in easy_data_tables-0.2.0 vs README.md in easy_data_tables-0.3.0
- old
+ new
@@ -33,21 +33,26 @@
### Parameters
#### Columns
-Columns are an array of hashes. There are two types of columns: 'normal' and 'combined'
+Columns are an array of hashes. There are three types of columns: 'normal', 'custom' and 'combined'
Normal column hashes accept the following keys:
- **label**: string, default: '' => will inform the label of the column on the table
- **type**: string, default: 'Integer', options: 'Integer', 'Currency', 'Percentage' => will inform the formating of the column
- **default**: any, default: 0 => Will inform the default when a value is not found
- **collection**: ActiveRecord::Relation, **required** => The data of the column (e.g. User.where(active: true)- -
- **agregate_function**: Array of symbols OR symbol, **required** => aggregate function to run (e.g. [:average, :expense] OR :count)
- **column_type**: string => will inform the type of column to use
+Custom column hashes accept the following keys:
+- **label**: string, default: '' => will inform the label of the column on the table
+- **values**: Hash, keys must coincide with the rows of the table, values are the content that will appear in each cell
+- **column_type**: string => must be '**custom**'
+
Cobmbined column hashes accept the following keys:
- **label**: string, default: '' => will inform the label of the column on the table
- **type**: string, default: 'Integer', options: 'Integer', 'Currency', 'Percentage' => will inform the formating of the column
- **columns**: Array, **required** => Will inform the columns to combine (e.g. ['expenditure', 'user_count'])
@@ -154,6 +159,9 @@
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Changelog
### v 0.2.0
-- added possibility of downloading the table as a csv (both formated and unformated)
+- added possibility of downloading the table as a csv (both formated and unformated)
+
+### v 0.2.0
+- added possibility of creating custom tables
\ No newline at end of file