Skip to content

Commit 496748f

Browse files
committed
Switch from Phlex 1.x to 2.x
1 parent 400cb7e commit 496748f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class PostsController < ApplicationController
99

1010
before_action :load_post
1111

12-
class Show < ApplicationComponent
12+
class Show < Components::Base
1313
attr_accessor :post
1414

1515
def view_template(&)
@@ -78,7 +78,7 @@ class PostsController < ApplicationController
7878

7979
before_action :load_post
8080

81-
class Show < ApplicationComponent
81+
class Show < Components::Base
8282
attr_accessor :post
8383

8484
def view_template(&)
@@ -120,7 +120,7 @@ class PostsController < ApplicationController
120120

121121
# Your code...
122122

123-
class Show < ApplicationComponent
123+
class Show < Components::Base
124124
attr_accessor :post
125125

126126
def view_template(&)
@@ -186,7 +186,7 @@ First let's extract the `Show` class into `./app/views/posts/show.rb`
186186
```ruby
187187
# ./app/views/posts/show.rb
188188
module Posts
189-
class Show < ApplicationComponent
189+
class Show < Components::Base
190190
attr_accessor :post
191191

192192
def view_template(&)

lib/superview/actions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module Superview
1313
#
1414
# before_action :load_post
1515
#
16-
# class Show < ApplicationComponent
16+
# class Show < Components::Base
1717
# attr_accessor :post
1818
#
1919
# def view_template(&)

lib/superview/components/table_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module Superview::Components
2020
# end
2121
# ```
2222

23-
class TableComponent < ApplicationComponent
23+
class TableComponent < Components::Base
2424
if Phlex.const_defined?(:DeferredRender)
2525
# Phlex 1.0
2626
include Phlex::DeferredRender

lib/superview/helpers/turbo/meta_tags.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Superview
22
module Helpers
33
module Turbo
44
# Renders the metatags for setting up Turbo Drive.
5-
class MetaTags < ApplicationComponent
5+
class MetaTags < Components::Base
66
attr_accessor \
77
:method,
88
:scroll,

0 commit comments

Comments
 (0)