tramway 3.0.3 → 3.0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1da050191fdef1006bf62ea51fe4d11465eb809c273dc681f55f8937243e53fa
4
- data.tar.gz: bce78a50e8ce1fdc3b8a126f3797841c5883c3b1810c370abfb00ba9609cc1e9
3
+ metadata.gz: afcbecc810bcf507e214d52763f4d7022b467f86ceb45d373ff6164937f77c0c
4
+ data.tar.gz: 8e6f39bf6a5a87b0e2585dc5c176db76b35fcd6803567e4b41461d6c919f1735
5
5
  SHA512:
6
- metadata.gz: 6d7c33ecf3b2544fab033a332e303dfd1cb23fa40dfb4adf8201a702be929ad702c96e5246055d59c88fe4c67e74d857590989ad581b61f398be05fd1ebdaac3
7
- data.tar.gz: 88a49d7eedda98eb23455e4042b21ce67fc8972a0509e780e8742937b73705ae9cfa6d14fb236b3a1da1ef478e384cba009f776c1711bccd5c98d104ae20d32e
6
+ metadata.gz: f817ceb11a8839695f205dbb6977b297749dc47439618a3157756609a233c327f54fbc7dd3876d0e386dff1e3d2c7dd7e1966bac9ae6d7af01a326aa243dc229
7
+ data.tar.gz: 12a10aecf2d7de109888343497e9bac4e6be6e4c6ffb478923a13202cec563a25a4b37b74ff3a87ba076f8746cdcbe406bd80baf674e9aeadda0b0c7e35b8d62
@@ -1,3 +1,3 @@
1
1
  %li.whitespace-nowrap
2
- = button_to @href, method: @method, class: style, **@options do
2
+ = button_to @href, method: @method, class: "#{style} cursor-pointer", **@options do
3
3
  = content
data/docs/AGENTS.md CHANGED
@@ -134,7 +134,7 @@ Normalize input with `normalizes` (from Tramway) for attributes like email, phon
134
134
  When you need form-level validation, use Tramway Form `validates` on the form object (ActiveModel/ActiveRecord validation options like `presence: true` work, and `with:` is optional unless a validator requires it). Keep data integrity validations in the model unless the request explicitly needs form-only logic.
135
135
 
136
136
  ### Rule 3
137
- Use Tramway Navbar for navigation
137
+ Use Tramway Navbar for navigation. Put there basic links: Login, Logout.
138
138
 
139
139
  ### Rule 4
140
140
  Use Tramway Flash for user notifications.
@@ -477,7 +477,7 @@ end
477
477
  In specs ALWAYS use factories (FactoryBot gem) to create models and attributes hash. In case there is no factory for the model, create one inside `spec/factories/#{pluralized model_name}.rb`.
478
478
 
479
479
  ### Rule 20
480
- In case you need enumerize for model attribute, make sure to use `enumerize` gem for that. DO NOT use `boolean` or `integer` types for enumerations.
480
+ In case you need enumerize for model attribute, make sure to use `enumerize` gem for that. DO NOT use `boolean` or `integer` types for enumerations. Make sure you made `extend Enumerize` in `ApplicationRecord`.
481
481
 
482
482
  ### Rule 21
483
483
  In case you need something that looks like enumerize but it's a process state, use `aasm` gem for that.
@@ -642,6 +642,9 @@ In case you want to use container on the page, use `tramway_container` helper in
642
642
  id: 'flash-container'
643
643
  ```
644
644
 
645
+ ### Rule 34
646
+ If for some model already has index and show pages via Tramway Entity, and the request explicitly needs state management. Do not create a new controller for that. Instead, create a new component for buttons and use it via `show_header_content` in Tramway Decorator for show page and new columns (Actions) in `list_attributes` for index page. This column should be rendered via the component and contain buttons for state management.
647
+
645
648
  ## Controller Patterns
646
649
 
647
650
  - Keep actions short and explicit with guard clauses.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '3.0.3'
4
+ VERSION = '3.0.3.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme