tramway 0.6.1.4 → 1.0

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -6
  3. data/app/components/tailwind_component.rb +1 -1
  4. data/app/components/tailwinds/base_component.rb +1 -1
  5. data/app/components/tailwinds/containers/narrow_component.rb +1 -1
  6. data/app/components/tailwinds/form/label_component.rb +1 -1
  7. data/app/components/tailwinds/navbar_component.html.haml +2 -2
  8. data/app/components/tailwinds/pagination/base.rb +1 -1
  9. data/app/components/tailwinds/pagination/gap_component.rb +1 -1
  10. data/app/components/tailwinds/table/cell_component.rb +1 -1
  11. data/app/components/tailwinds/table/header_component.rb +1 -1
  12. data/app/components/tailwinds/table/row/preview_component.rb +1 -1
  13. data/app/components/tailwinds/table/row_component.html.haml +1 -1
  14. data/app/components/tailwinds/table/row_component.rb +1 -1
  15. data/app/components/tailwinds/table_component.rb +1 -1
  16. data/app/components/tramway/base_component.rb +15 -0
  17. data/app/components/tramway/entity_component.html.haml +1 -0
  18. data/app/components/tramway/entity_component.rb +28 -0
  19. data/app/controllers/tramway/entities_controller.rb +4 -0
  20. data/app/helpers/tramway/application_helper.rb +2 -0
  21. data/app/views/tramway/entities/_list.html.haml +6 -6
  22. data/app/views/tramway/entities/show.html.haml +15 -0
  23. data/config/routes.rb +1 -1
  24. data/config/tailwind.config.js +2 -0
  25. data/lib/tramway/base_decorator.rb +5 -1
  26. data/lib/tramway/configs/entities/route.rb +1 -2
  27. data/lib/tramway/configs/entity.rb +31 -16
  28. data/lib/tramway/helpers/navbar_helper.rb +6 -6
  29. data/lib/tramway/navbar.rb +8 -6
  30. data/lib/tramway/version.rb +1 -1
  31. metadata +6 -4
  32. data/app/components/tramway/component/base.rb +0 -13
  33. data/app/views/tramway/entities/_entity.html.haml +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec528ac8b5a4e453d42fabc91d5c2f1582306f35f967778e08ec2bcd81ce3baf
4
- data.tar.gz: d23709dc4ac56fdded982a018907944cbdd414ea4d4a1fab650ea9db24154a8b
3
+ metadata.gz: df69b76e870abe067b6088b43e5a9731fcad1f07083aeb4c7c58d903421096f3
4
+ data.tar.gz: 480513c2fe10f2c6caa3a1cdcc42b532f897b03d2df20862f4384e2a68c1c9f3
5
5
  SHA512:
6
- metadata.gz: 6833594b499a896b3e7c0e2f8a1c5dfc3e5c3410fd2da2f20fc736dcd59f5ffc86198030ae7c1e779cc93af4617e660781b26c6b50f2f8be2499b0220b83c08e
7
- data.tar.gz: cacc7d5d5575a686cc7fb084becd1756841428cbafd4974d024dd8246be643109bbd599dc114b98c242c14413f8daa4a2f7b560fab273f305b855811307e1ffa
6
+ metadata.gz: 7b7625417d873f2e99317a03bb70c99869c2416aa35161d53fb82375e199d3916303b8fb702dc0ab697b46d7fdc5c7df2e5447195080daf8f3ba6566dbe2b486
7
+ data.tar.gz: 49a048f27dde057100b4e6be9b9073e6c65dc299e45ab8fbf1b41e929380ab186589fabf29695765b5586e755830437ad58f7f961f4d2ced52e354b8583a401d
data/README.md CHANGED
@@ -18,11 +18,13 @@ Unite Ruby on Rails brilliance. Streamline development with Tramway.
18
18
 
19
19
  Tramway is actively verified against the following Ruby and Rails versions.
20
20
 
21
- | Ruby \ Rails | 7.1 | 7.2 | 8.0 | 8.1 |
22
- | ------------- | --- | --- | --- | --- |
23
- | 3.2 | ✅ | ✅ | ✅ | ✅ |
24
- | 3.3 | ✅ | ✅ | ✅ | ✅ |
25
- | 3.4 | ✅ | ✅ | ✅ | ✅ |
21
+ | Ruby \ Rails | 7.1* | 7.2 | 8.0 | 8.1 |
22
+ | ------------- | ---- | --- | --- | --- |
23
+ | 3.2 | ✅ | ✅ | ✅ | ✅ |
24
+ | 3.3 | ✅ | ✅ | ✅ | ✅ |
25
+ | 3.4 | ✅ | ✅ | ✅ | ✅ |
26
+
27
+ \* Rails 7.1 receives only residual support because it no longer receives updates from the Rails core team. See the [announcement](https://rubyonrails.org/2025/10/29/new-rails-releases-and-end-of-support-announcement) for details.
26
28
 
27
29
  ## Installation
28
30
  Add this line to your application's Gemfile:
@@ -71,7 +73,7 @@ end
71
73
 
72
74
  ```ruby
73
75
  class UserDecorator < Tramway::BaseDecorator
74
- def self.list_attributes
76
+ def self.index_attributes
75
77
  [:id, :email, :created_at]
76
78
  end
77
79
  end
@@ -174,6 +176,37 @@ end
174
176
  In this example, the `Campaign` entity will display only records returned by the `active` scope on its index page, while all
175
177
  other pages continue to show every record unless another scope is specified.
176
178
 
179
+ **show page**
180
+
181
+ To render a show page for an entity, declare a `:show` action inside the `pages` array in
182
+ `config/initializers/tramway.rb`. Tramway will generate the route and render a table using the attributes returned by the
183
+ decorator's `self.show_attributes` method.
184
+
185
+ ```ruby
186
+ Tramway.configure do |config|
187
+ config.entities = [
188
+ {
189
+ name: :campaign,
190
+ pages: [
191
+ { action: :index },
192
+ { action: :show }
193
+ ]
194
+ }
195
+ ]
196
+ end
197
+ ```
198
+
199
+ ```ruby
200
+ class CampaignDecorator < Tramway::BaseDecorator
201
+ def self.show_attributes
202
+ %i[name status starts_at]
203
+ end
204
+ end
205
+ ```
206
+
207
+ With this configuration in place, visiting the show page displays a two-column table where the left column contains the
208
+ localized attribute names and the right column renders their values.
209
+
177
210
  **route_helper**
178
211
 
179
212
  To get routes Tramway generated just Tramway::Engine.
@@ -3,7 +3,7 @@
3
3
  require 'view_component'
4
4
 
5
5
  # Base TailwindComponent. Contains base features for all tailwind components
6
- class TailwindComponent < Tramway::Component::Base
6
+ class TailwindComponent < Tramway::BaseComponent
7
7
  option :input
8
8
  option :attribute
9
9
  option :value, optional: true
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tailwinds
4
4
  # Shared base component for Tailwinds components
5
- class BaseComponent < Tramway::Component::Base
5
+ class BaseComponent < Tramway::BaseComponent
6
6
  end
7
7
  end
@@ -3,7 +3,7 @@
3
3
  module Tailwinds
4
4
  module Containers
5
5
  # Default page container in Tramway
6
- class NarrowComponent < Tramway::Component::Base
6
+ class NarrowComponent < Tramway::BaseComponent
7
7
  option :id, optional: true, default: proc { SecureRandom.uuid }
8
8
  end
9
9
  end
@@ -3,7 +3,7 @@
3
3
  module Tailwinds
4
4
  module Form
5
5
  # Form label for all tailwind-styled forms
6
- class LabelComponent < Tramway::Component::Base
6
+ class LabelComponent < Tramway::BaseComponent
7
7
  option :for
8
8
  end
9
9
  end
@@ -7,7 +7,7 @@
7
7
  .text-xl.text-white.font-bold.dark:text-white
8
8
  = @title[:text]
9
9
  - if @left_items.present?
10
- %ul.block.flex.flex-row.items-center.space-x-4.ml-4
10
+ %ul.flex-row.items-center.space-x-4.ml-4.hidden.md:flex
11
11
  - @left_items.each do |item|
12
12
  = item
13
13
 
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
  - if @right_items.present?
19
- %ul.block.sm:flex.items-center.space-x-4
19
+ %ul.items-center.space-x-4.hidden.md:flex
20
20
  - @right_items.each do |item|
21
21
  = item
22
22
 
@@ -3,7 +3,7 @@
3
3
  module Tailwinds
4
4
  module Pagination
5
5
  # Base component for rendering a Kaminari pagination
6
- class Base < Tramway::Component::Base
6
+ class Base < Tramway::BaseComponent
7
7
  option :current_page
8
8
  option :url
9
9
  option :remote
@@ -3,7 +3,7 @@
3
3
  module Tailwinds
4
4
  module Pagination
5
5
  # Kaminari gap component for rendering a gap in a pagination
6
- class GapComponent < Tramway::Component::Base
6
+ class GapComponent < Tramway::BaseComponent
7
7
  end
8
8
  end
9
9
  end
@@ -3,7 +3,7 @@
3
3
  module Tailwinds
4
4
  module Table
5
5
  # Component for rendering a cell in a table
6
- class CellComponent < Tramway::Component::Base
6
+ class CellComponent < Tramway::BaseComponent
7
7
  end
8
8
  end
9
9
  end
@@ -3,7 +3,7 @@
3
3
  module Tailwinds
4
4
  module Table
5
5
  # Component for rendering a header in a table
6
- class HeaderComponent < Tramway::Component::Base
6
+ class HeaderComponent < Tramway::BaseComponent
7
7
  option :headers, optional: true, default: -> { [] }
8
8
  option :columns, optional: true, default: -> { 3 }
9
9
 
@@ -4,7 +4,7 @@ module Tailwinds
4
4
  module Table
5
5
  module Row
6
6
  # Row component for rendering a row in a table
7
- class PreviewComponent < Tramway::Component::Base
7
+ class PreviewComponent < Tramway::BaseComponent
8
8
  end
9
9
  end
10
10
  end
@@ -1,7 +1,7 @@
1
1
  - if cells.any?
2
2
  = row_tag class: desktop_row_classes(cells.count), **options do
3
3
  - cells.each do |(_, value)|
4
- .div-table-cell.px-6.py-4.font-medium.text-gray-900.whitespace-nowrap.dark:text-white.text-xs.sm:text-base
4
+ .div-table-cell.px-6.py-4.font-medium.text-gray-900.dark:text-white.text-xs.sm:text-base
5
5
  = value
6
6
 
7
7
  - else
@@ -3,7 +3,7 @@
3
3
  module Tailwinds
4
4
  module Table
5
5
  # Component for rendering a row in a table
6
- class RowComponent < Tramway::Component::Base
6
+ class RowComponent < Tramway::BaseComponent
7
7
  option :cells, optional: true, default: -> { [] }
8
8
  option :href, optional: true
9
9
  option :options, optional: true, default: -> { {} }
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Tailwinds
4
4
  # Table component for rendering a table
5
- class TableComponent < Tramway::Component::Base
5
+ class TableComponent < Tramway::BaseComponent
6
6
  option :options, optional: true, default: -> { {} }
7
7
  end
8
8
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tramway/helpers/component_helper'
4
+ require 'tramway/helpers/decorate_helper'
5
+ require 'tramway/helpers/views_helper'
6
+
7
+ module Tramway
8
+ # You can use this class as a base for all your components
9
+ class BaseComponent < ViewComponent::Base
10
+ extend Dry::Initializer[undefined: false]
11
+ include Tramway::Helpers::ComponentHelper
12
+ include Tramway::Helpers::DecorateHelper
13
+ include Tramway::Helpers::ViewsHelper
14
+ end
15
+ end
@@ -0,0 +1 @@
1
+ = tramway_row cells:, href:
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tramway
4
+ # Component for displaying an entity row in a list
5
+ #
6
+ class EntityComponent < Tramway::BaseComponent
7
+ option :item
8
+ option :entity
9
+
10
+ def decorated_item
11
+ tramway_decorate item, namespace: entity.namespace
12
+ end
13
+
14
+ def href
15
+ if entity.pages.find { _1.action == 'show' }.present?
16
+ Tramway::Engine.routes.url_helpers.public_send entity.routes.show, decorated_item.id
17
+ else
18
+ decorated_item.show_path
19
+ end
20
+ end
21
+
22
+ def cells
23
+ decorated_item.class.index_attributes.reduce({}) do |hash, attribute|
24
+ hash.merge! attribute => decorated_item.public_send(attribute)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -22,6 +22,10 @@ module Tramway
22
22
  @namespace = entity.route&.namespace
23
23
  end
24
24
 
25
+ def show
26
+ @entity = tramway_decorate model_class.find(params[:id]), namespace: entity.route&.namespace
27
+ end
28
+
25
29
  private
26
30
 
27
31
  def model_class
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'tramway/helpers/component_helper'
4
+ require 'tramway/helpers/views_helper'
4
5
  require 'kaminari/helpers/tag'
5
6
 
6
7
  module Tramway
@@ -8,6 +9,7 @@ module Tramway
8
9
  module ApplicationHelper
9
10
  include Tramway::Decorators::ClassHelper
10
11
  include Tramway::Helpers::ComponentHelper
12
+ include Tramway::Helpers::ViewsHelper
11
13
 
12
14
  def page_title
13
15
  @model_class.model_name.human.pluralize # rubocop:disable Rails/HelperInstanceVariable
@@ -1,5 +1,5 @@
1
1
  - decorator = Tramway::Decorators::ClassHelper.decorator_class_name(@model_class, @namespace)
2
- - list_attributes = decorator.constantize.list_attributes
2
+ - index_attributes = decorator.constantize.index_attributes
3
3
 
4
4
  .mt-8.w-full
5
5
  - content_for :title, page_title
@@ -13,15 +13,15 @@
13
13
  .flex.justify-end.mt-2
14
14
  = decorator.constantize.index_header_content.call(@entities) if decorator.constantize.index_header_content.present?
15
15
 
16
- - if list_attributes.empty?
16
+ - if index_attributes.empty?
17
17
  %p.text-center.mt-10
18
- You should fill class-level method `self.list_attributes` inside your
18
+ You should fill class-level method `self.index_attributes` inside your
19
19
  = decorator
20
20
  - else
21
- = component 'tailwinds/table' do
22
- = component 'tailwinds/table/header', headers: list_attributes.map { |attribute| @model_class.human_attribute_name(attribute) }
21
+ = tramway_table do
22
+ = tramway_header headers: index_attributes.map { |attribute| @model_class.human_attribute_name(attribute) }
23
23
  - @entities.each do |item|
24
- = render 'tramway/entities/entity', entity: item
24
+ = component 'tramway/entity', entity: @entity, item: item
25
25
 
26
26
  - if Tramway.config.pagination[:enabled]
27
27
  .flex.mt-4
@@ -0,0 +1,15 @@
1
+ = tramway_container do
2
+ %h1.text-2xl.font-bold.mb-4
3
+ = @entity.title
4
+
5
+ - if @entity.show_attributes.empty?
6
+ %p.text-center.mt-10
7
+ You should fill object-level method `show_attributes` inside your
8
+ = @entity.class.name
9
+ = tramway_table do
10
+ - @entity.show_attributes.each do |attribute|
11
+ = tramway_row do
12
+ = tramway_cell do
13
+ = @model_class.human_attribute_name(attribute)
14
+ = tramway_cell do
15
+ = @entity.public_send(attribute)
data/config/routes.rb CHANGED
@@ -7,7 +7,7 @@ Tramway::Engine.routes.draw do
7
7
 
8
8
  define_resource = proc do
9
9
  resources resource_name.pluralize.to_sym,
10
- only: [:index],
10
+ only: entity.pages.map(&:action),
11
11
  controller: '/tramway/entities',
12
12
  defaults: { entity: entity }
13
13
  end
@@ -2,6 +2,8 @@ module.exports = {
2
2
  safelist: [
3
3
  // === Navbar ===
4
4
  'ml-4',
5
+ 'text-white',
6
+ 'md:flex',
5
7
 
6
8
  // === Custom table layout utilities ===
7
9
  'div-table',
@@ -48,7 +48,7 @@ module Tramway
48
48
  end
49
49
  end
50
50
 
51
- def list_attributes
51
+ def index_attributes
52
52
  []
53
53
  end
54
54
 
@@ -67,6 +67,10 @@ module Tramway
67
67
 
68
68
  def show_path = nil
69
69
 
70
+ def show_attributes
71
+ []
72
+ end
73
+
70
74
  # :reek:ManualDispatch { enabled: false } because there is the idea to manual dispatch
71
75
  def method_missing(method_name, *, &)
72
76
  url_helpers = Rails.application.routes.url_helpers
@@ -6,11 +6,10 @@ module Tramway
6
6
  # Route struct describes rules for route management
7
7
  #
8
8
  class Route < Dry::Struct
9
- attribute? :namespace, Types::Coercible::String
10
9
  attribute? :route_method, Types::Coercible::String
11
10
 
12
11
  def helper_method_by(underscored_name)
13
- "#{[namespace, route_method || underscored_name].compact.join('_')}_path"
12
+ "#{route_method || underscored_name}_path"
14
13
  end
15
14
  end
16
15
  end
@@ -10,24 +10,26 @@ module Tramway
10
10
  attribute :name, Types::Coercible::String
11
11
  attribute? :pages, Types::Array.of(Tramway::Configs::Entities::Page).default([].freeze)
12
12
  attribute? :route, Tramway::Configs::Entities::Route
13
+ attribute? :namespace, Types::Coercible::String
13
14
 
14
15
  # Route Struct contains implemented in Tramway CRUD and helpful routes for the entity
15
- RouteStruct = Struct.new(:index)
16
+ RouteStruct = Struct.new(:index, :show)
16
17
 
17
18
  # HumanName Struct contains human names forms for the entity
18
19
  HumanNameStruct = Struct.new(:single, :plural)
19
20
 
20
21
  def routes
21
- RouteStruct.new(route_helper_method)
22
+ RouteStruct.new(*route_helper_methods)
22
23
  end
23
24
 
24
25
  def human_name
25
- single, plural = if model_class.present?
26
- model_name = model_class.model_name.human
27
- [model_name, pluralized(model_name)]
28
- else
29
- [name.capitalize, name.pluralize.capitalize]
30
- end
26
+ if model_class.present?
27
+ model_name = model_class.model_name.human
28
+
29
+ [model_name, pluralized(model_name)]
30
+ else
31
+ [name.capitalize, name.pluralize.capitalize]
32
+ end => single, plural
31
33
 
32
34
  HumanNameStruct.new(single, plural)
33
35
  end
@@ -50,16 +52,29 @@ module Tramway
50
52
  nil
51
53
  end
52
54
 
53
- def route_helper_method
54
- underscored_name = name.parameterize.pluralize.underscore
55
+ def route_helper_methods
56
+ %i[index show].map do |action|
57
+ page(action).present? ? send("#{action}_helper_method") : nil
58
+ end.compact
59
+ end
60
+
61
+ def build_helper_method(base_name, route: nil, namespace: nil, plural: false)
62
+ if plural
63
+ base_name.to_s.parameterize.underscore.pluralize
64
+ else
65
+ base_name.to_s.parameterize.underscore
66
+ end => underscored
55
67
 
56
- method_name = if set_page?(:index) || route.blank?
57
- "#{underscored_name}_path"
58
- else
59
- route.helper_method_by(underscored_name)
60
- end
68
+ method_name = route.present? ? route.helper_method_by(underscored) : "#{underscored}_path"
69
+ namespace.present? ? "#{namespace}_#{method_name}" : method_name
70
+ end
71
+
72
+ def show_helper_method
73
+ build_helper_method(name, route:, namespace:, plural: false)
74
+ end
61
75
 
62
- route_helper_engine.routes.url_helpers.public_send(method_name)
76
+ def index_helper_method
77
+ build_helper_method(name, route:, namespace:, plural: true)
63
78
  end
64
79
 
65
80
  def route_helper_engine
@@ -25,12 +25,12 @@ module Tramway
25
25
  def assign_navbar_items(options)
26
26
  navbar_items = @navbar.items
27
27
  navbar_items.each do |(key, value)|
28
- key_to_merge = case key
29
- when :left, :right
30
- :"#{key}_items"
31
- else
32
- key
33
- end
28
+ case key
29
+ when :left, :right
30
+ :"#{key}_items"
31
+ else
32
+ key
33
+ end => key_to_merge
34
34
 
35
35
  options.merge! key_to_merge => value
36
36
  end
@@ -38,11 +38,11 @@ module Tramway
38
38
  def item(text_or_url, url = nil, **, &)
39
39
  raise 'You cannot provide an argument and a code block at the same time' if provided_url_and_block?(url, &)
40
40
 
41
- rendered_item = if url.present?
42
- render_ignoring_block(text_or_url, url, **)
43
- else
44
- render_using_block(text_or_url, **, &)
45
- end
41
+ if url.present?
42
+ render_ignoring_block(text_or_url, url, **)
43
+ else
44
+ render_using_block(text_or_url, **, &)
45
+ end => rendered_item
46
46
 
47
47
  @items[@filling] << rendered_item
48
48
  end
@@ -53,7 +53,9 @@ module Tramway
53
53
  filling_side :left
54
54
 
55
55
  entities.each do |entity|
56
- item entity.human_name.plural, entity.routes.index
56
+ next if entity.routes.index.blank?
57
+
58
+ item entity.human_name.plural, Tramway::Engine.routes.url_helpers.public_send(entity.routes.index)
57
59
  end
58
60
 
59
61
  reset_filling
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '0.6.1.4'
4
+ VERSION = '1.0'
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: 0.6.1.4
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-10-29 00:00:00.000000000 Z
12
+ date: 2025-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: anyway_config
@@ -205,7 +205,9 @@ files:
205
205
  - app/components/tailwinds/table/row_component.rb
206
206
  - app/components/tailwinds/table_component.html.haml
207
207
  - app/components/tailwinds/table_component.rb
208
- - app/components/tramway/component/base.rb
208
+ - app/components/tramway/base_component.rb
209
+ - app/components/tramway/entity_component.html.haml
210
+ - app/components/tramway/entity_component.rb
209
211
  - app/controllers/tramway/entities_controller.rb
210
212
  - app/helpers/tramway/application_helper.rb
211
213
  - app/views/kaminari/_first_page.html.haml
@@ -215,9 +217,9 @@ files:
215
217
  - app/views/kaminari/_page.html.haml
216
218
  - app/views/kaminari/_paginator.html.haml
217
219
  - app/views/kaminari/_prev_page.html.haml
218
- - app/views/tramway/entities/_entity.html.haml
219
220
  - app/views/tramway/entities/_list.html.haml
220
221
  - app/views/tramway/entities/index.html.haml
222
+ - app/views/tramway/entities/show.html.haml
221
223
  - app/views/tramway/layouts/application.html.haml
222
224
  - config/routes.rb
223
225
  - config/tailwind.config.js
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'tramway/helpers/component_helper'
4
-
5
- module Tramway
6
- module Component
7
- # You can use this class as a base for all your components
8
- class Base < ViewComponent::Base
9
- extend Dry::Initializer[undefined: false]
10
- include Tramway::Helpers::ComponentHelper
11
- end
12
- end
13
- end
@@ -1,3 +0,0 @@
1
- - decorator = decorator_class_name(entity, @namespace)
2
- - decorated_object = decorator.constantize.decorate(entity)
3
- = component 'tailwinds/table/row', cells: decorator.constantize.list_attributes.reduce({}) { |hash, attribute| hash.merge! attribute => decorated_object.public_send(attribute) }, href: decorated_object.show_path