77** ActiveFields** is a _ Rails_ plugin that implements the _ Entity-Attribute-Value_ (_ EAV_ ) pattern,
88enabling the addition of custom fields to any model at runtime without requiring changes to the database schema.
99
10+ ## Table of Contents
11+
12+ - [ Key Concepts] ( #key-concepts )
13+ - [ Models Structure] ( #models-structure )
14+ - [ Requirements] ( #requirements )
15+ - [ Installation] ( #installation )
16+ - [ Field Types] ( #field-types )
17+ - [ Fields Base Attributes] ( #fields-base-attributes )
18+ - [ Field Types Summary] ( #field-types-summary )
19+ - [ Search Functionality] ( #search-functionality )
20+ - [ Configuration] ( #configuration )
21+ - [ Limiting Field Types for a Customizable] ( #limiting-field-types-for-a-customizable )
22+ - [ Customizing Internal Model Classes] ( #customizing-internal-model-classes )
23+ - [ Adding Custom Field Types] ( #adding-custom-field-types )
24+ - [ Scoping] ( #scoping )
25+ - [ Localization (I18n)] ( #localization-i18n )
26+ - [ Current Restrictions] ( #current-restrictions )
27+ - [ API Overview] ( #api-overview )
28+ - [ Fields API] ( #fields-api )
29+ - [ Values API] ( #values-api )
30+ - [ Customizable API] ( #customizable-api )
31+ - [ Global Config] ( #global-config )
32+ - [ Registry] ( #registry )
33+ - [ Development] ( #development )
34+ - [ Contributing] ( #contributing )
35+ - [ License] ( #license )
36+
1037## Key Concepts
1138
1239- ** Customizable** : A record that has custom fields (_ Entity_ ).
@@ -292,6 +319,9 @@ classDiagram
292319All _Active Field_ model names start with ` ActiveFields::Field` .
293320We replace it with ` ** ` for conciseness.
294321
322+ < details>
323+ < summary><strong> Table< /strong></summary>
324+
295325| Active Field model | Type name | Attributes | Options |
296326| ---------------------------------| ------------------| ------------------------------------------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
297327| ` ** ::Boolean` | ` boolean` | ` default_value` < br>( ` boolean` or ` nil` ) | ` required` (` boolean` ) - the value must not be ` false` < br> ` nullable` (` boolean` ) - the value could be ` nil` |
@@ -309,6 +339,8 @@ We replace it with `**` for conciseness.
309339| ` ** ::TextArray` | ` text_array` | ` default_value` < br>( ` array[string]` ) | ` min_length` (` integer` ) - minimum value length allowed, for each element< br> ` max_length` (` integer` ) - maximum value length allowed, for each element< br> ` min_size` (` integer` ) - minimum value size< br> ` max_size` (` integer` ) - maximum value size |
310340| _Your custom class can be here_ | _..._ | _..._ | _..._ |
311341
342+ < /details>
343+
312344** Note:** Options marked with ** \* ** are mandatory.
313345
314346# ## Search Functionality
@@ -354,14 +386,18 @@ Key details:
354386
355387Supported _operations_ and _operators_ for each _Active Field_ type are listed below.
356388
357- # ### Boolean
389+ < details>
390+ < summary><strong> Boolean< /strong></summary>
358391
359392| Operation | Operator | Description |
360393| ------------| ----------| -----------------------------|
361394| ` eq` | ` =` | Value is equal to given |
362395| ` not_eq` | ` ! =` | Value is not equal to given |
363396
364- # ### Date
397+ < /details>
398+
399+ < details>
400+ < summary><strong> Date< /strong></summary>
365401
366402| Operation | Operator | Description |
367403| ------------| ----------| -----------------------------------------|
@@ -372,7 +408,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
372408| ` lt` | ` < ` | Value is less than given |
373409| ` lteq` | ` < =` | Value is less than or equal to given |
374410
375- # ### DateArray
411+ < /details>
412+
413+ < details>
414+ < summary><strong> DateArray< /strong></summary>
376415
377416| Operation | Operator | Description |
378417| ---------------| ----------| ----------------------------------------------------------------|
@@ -393,7 +432,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
393432| `size_lt` | `#<` | Array value size is less than given |
394433| `size_lteq` | `#<=` | Array value size is less than or equal to given |
395434
396- #### DateTime
435+ </details>
436+
437+ <details>
438+ <summary><strong>DateTime</strong></summary>
397439
398440| Operation | Operator | Description |
399441|------------|----------|-----------------------------------------|
@@ -404,7 +446,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
404446| `lt` | `<` | Value is less than given |
405447| `lteq` | `<=` | Value is greater than or equal to given |
406448
407- #### DateTimeArray
449+ </details>
450+
451+ <details>
452+ <summary><strong>DateTimeArray</strong></summary>
408453
409454| Operation | Operator | Description |
410455|---------------|----------|----------------------------------------------------------------|
@@ -425,7 +470,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
425470| ` size_lt` | ` # <` | Array value size is less than given |
426471| ` size_lteq` | ` # <=` | Array value size is less than or equal to given |
427472
428- # ### Decimal
473+ < /details>
474+
475+ < details>
476+ < summary><strong> Decimal< /strong></summary>
429477
430478| Operation | Operator | Description |
431479| ------------| ----------| -----------------------------------------|
@@ -436,7 +484,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
436484| ` lt` | ` < ` | Value is less than given |
437485| ` lteq` | ` < =` | Value is greater than or equal to given |
438486
439- # ### DecimalArray
487+ < /details>
488+
489+ < details>
490+ < summary><strong> DecimalArray< /strong></summary>
440491
441492| Operation | Operator | Description |
442493| ---------------| ----------| ----------------------------------------------------------------|
@@ -457,14 +508,20 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
457508| `size_lt` | `#<` | Array value size is less than given |
458509| `size_lteq` | `#<=` | Array value size is less than or equal to given |
459510
460- #### Enum
511+ </details>
512+
513+ <details>
514+ <summary><strong>Enum</strong></summary>
461515
462516| Operation | Operator | Description |
463517|------------|----------|-----------------------------|
464518| `eq` | `=` | Value is equal to given |
465519| `not_eq` | `!=` | Value is not equal to given |
466520
467- #### EnumArray
521+ </details>
522+
523+ <details>
524+ <summary><strong>EnumArray</strong></summary>
468525
469526| Operation | Operator | Description |
470527|---------------|----------|----------------------------------------------------|
@@ -477,7 +534,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
477534| ` size_lt` | ` # <` | Array value size is less than given |
478535| ` size_lteq` | ` # <=` | Array value size is less than or equal to given |
479536
480- # ### Integer
537+ < /details>
538+
539+ < details>
540+ < summary><strong> Integer< /strong></summary>
481541
482542| Operation | Operator | Description |
483543| ------------| ----------| -----------------------------------------|
@@ -488,7 +548,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
488548| ` lt` | ` < ` | Value is less than given |
489549| ` lteq` | ` < =` | Value is greater than or equal to given |
490550
491- # ### IntegerArray
551+ < /details>
552+
553+ < details>
554+ < summary><strong> IntegerArray< /strong></summary>
492555
493556| Operation | Operator | Description |
494557| ---------------| ----------| ----------------------------------------------------------------|
@@ -509,7 +572,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
509572| `size_lt` | `#<` | Array value size is less than given |
510573| `size_lteq` | `#<=` | Array value size is less than or equal to given |
511574
512- #### Text
575+ </details>
576+
577+ <details>
578+ <summary><strong>Text</strong></summary>
513579
514580| Operation | Operator | Description |
515581|-------------------|----------|-------------------------------------------------------------|
@@ -528,7 +594,10 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
528594| `not_iend_with` | `!$*` | Value doesn' t end with given substring (case-insensitive) |
529595| ` not_icontain` | ` ! ~* ` | Value doesn' t contain given substring (case-insensitive) |
530596
531- #### TextArray
597+ </details>
598+
599+ <details>
600+ <summary><strong>TextArray</strong></summary>
532601
533602| Operation | Operator | Description |
534603|------------------|----------|-------------------------------------------------------------|
@@ -543,6 +612,8 @@ Supported _operations_ and _operators_ for each _Active Field_ type are listed b
543612| ` size_lt` | ` # <` | Array value size is less than given |
544613| ` size_lteq` | ` # <=` | Array value size is less than or equal to given |
545614
615+ < /details>
616+
546617# # Configuration
547618
548619# ## Limiting Field Types for a Customizable
0 commit comments