tramway 2.3.1.2 → 2.3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/docs/AGENTS.md +10 -2
- data/lib/generators/tramway/install/install_generator.rb +2 -1
- data/lib/tramway/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5de5b05b1753cdf48960fb5a7f8a98e63e42b95db21eda01d3f28a828d97b81f
|
|
4
|
+
data.tar.gz: 8bb86b14f367b4874ca04d92bc81daab8566109ebeb86033bc6dacf3061000fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45bbf5d2b75437f5b55f3df5c8a8041fb7cc1db11b8ce275277012c1aea3027587e114986cf9b0773fc0f72a0a5a26fbf8702dbd4fb4f2ae5375dfc9634d5841
|
|
7
|
+
data.tar.gz: c9a4dcd50b189a79592ac6e50df049b8eb3ff33387644d0db2fc76672815197ae33d830025a2982c9f1064a97a2bae5ae2fcce6fddf30043e114ac3d8fa3eeac
|
data/README.md
CHANGED
|
@@ -51,7 +51,7 @@ bundle install
|
|
|
51
51
|
bin/rails g tramway:install
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
The install generator adds the required gems (`haml-rails`, `kaminari`, `view_component`, and `dry-
|
|
54
|
+
The install generator adds the required gems (`haml-rails`, `kaminari`, `view_component`, `dry-initializer`, and `dry-monads`) to your
|
|
55
55
|
application's Gemfile—if they are not present—and appends the Tailwind safelist configuration Tramway ships with.
|
|
56
56
|
|
|
57
57
|
## Getting Started
|
data/docs/AGENTS.md
CHANGED
|
@@ -356,7 +356,12 @@ In case you need something that looks like enumerize but it's a process state, u
|
|
|
356
356
|
Use model scopes instead of creating private methods for object collections.
|
|
357
357
|
|
|
358
358
|
### Rule 23
|
|
359
|
-
Use `tramway_title` for the main title on pages
|
|
359
|
+
Use `tramway_title` for the main title on pages. `tramway_title text: 'Title'` OR
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
tramway_title do
|
|
363
|
+
More complicated title with HTML tags
|
|
364
|
+
```
|
|
360
365
|
|
|
361
366
|
Example
|
|
362
367
|
*app/models/user.rb*
|
|
@@ -458,7 +463,7 @@ In case, you need to make a one link in tramway_table on each row. Use `tramway_
|
|
|
458
463
|
Always use tramway decorated objects in views.
|
|
459
464
|
|
|
460
465
|
### Rule 30
|
|
461
|
-
For Tailwind classes with `/`, `[`, `]` characters use `{ class: 'here is the complicated class' }` in HAML.
|
|
466
|
+
For Tailwind classes with arbitrary values (with `/`, `[`, `]` characters) use `{ class: 'here is the complicated class' }` in HAML.
|
|
462
467
|
|
|
463
468
|
### Rule 31
|
|
464
469
|
Always `tramway_decorate` and `tramway_form` for creating these types of objects. Don't use decorator and form classes for this.
|
|
@@ -466,6 +471,9 @@ Always `tramway_decorate` and `tramway_form` for creating these types of objects
|
|
|
466
471
|
### Rule 32
|
|
467
472
|
In Tramway Decorators, use `delegate_attributes` method instead of `delegate :something, to: :object`
|
|
468
473
|
|
|
474
|
+
### Rule 33
|
|
475
|
+
In case you want to use container on the page, use `tramway_container` helper instead of creating a component for that or using a plain div with Tailwind classes.
|
|
476
|
+
|
|
469
477
|
## Controller Patterns
|
|
470
478
|
|
|
471
479
|
- Keep actions short and explicit with guard clauses.
|
|
@@ -16,7 +16,8 @@ module Tramway
|
|
|
16
16
|
{ name: 'haml-rails', declaration: 'gem "haml-rails"' },
|
|
17
17
|
{ name: 'kaminari', declaration: 'gem "kaminari"' },
|
|
18
18
|
{ name: 'view_component', declaration: 'gem "view_component"' },
|
|
19
|
-
{ name: 'dry-initializer', declaration: "gem 'dry-initializer'" }
|
|
19
|
+
{ name: 'dry-initializer', declaration: "gem 'dry-initializer'" },
|
|
20
|
+
{ name: 'dry-monads', declaration: "gem 'dry-monads'" }
|
|
20
21
|
]
|
|
21
22
|
end
|
|
22
23
|
|
data/lib/tramway/version.rb
CHANGED