-
Notifications
You must be signed in to change notification settings - Fork 487
Open
Description
Steps to reproduce
I try to make general purpose site section, that may have any content:
# app/components/ui/base/section/view.rb
module Ui
class Base::Section::View < ViewComponent::Base
def initialize
super()
# internal stuff
end
end
end/ app/components/ui/base/section/view.slim
.section
.section__content
= contentWhen I use it as is, it works as expected:
= render Ui::Base::Section::View.new do
h1 Hello WorldThe strange thing happens, when I try to create another component, base on it:
# app/components/ui/base/hero/view.rb
module Ui
class Base::Hero::View < Base::Section::View
def initialize
super()
# internal stuff
end
end
endI add its own template, e.g. hero/view.slim, and try to render it:
= render Ui::Base::Hero::View.new do
h1 Hello WorldThe following error occurs:
undefined method 'upcase' for nil
Expected behavior
Rendered contents of the hero/view.slim template.
System configuration
Rails version:
8.1.2
Ruby version:
4.0.1
Gem version:
4.5.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels