Open
Description
I'm trying to add Phlex to existing project. I'm not sure which step I miss. I did this:
bundle add phlex-rails
bundle exec rails generate phlex:install
Then I added file (app/components/my_component.rb
)
class MyComponent < Phlex::HTML
def initialize(name:)
@name = name
end
def view_template
h1 { "Hello, #{@name}" }
end
end
Then in app/views/layouts/application.html.erb
<%= render MyComponent.new(name: "Hello") %>
And I get this error:
undefined method `raw_buffer' for an instance of ActionView::OutputBuffer
Any suggestions how to deal with it? Thanks