I wonder why are you using ApplicationComponent in the HTML instead of SubheadComponent itself. I noticed GitHub Primer is doing the same thing. Care to explain?
Yes, because SubheadComponentclass does not have the call method defined. When you're passing in a block, Ruby looks for a call method.
Instead of defining call method for each of the components, you can simplify define in your top level class and refer that class.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I wonder why are you using
ApplicationComponent
in the HTML instead ofSubheadComponent
itself. I noticed GitHub Primer is doing the same thing. Care to explain?Yes, because
SubheadComponent
class
does not have thecall
method defined. When you're passing in ablock
, Ruby looks for acall
method.Instead of defining
call
method for each of the components, you can simplify define in your top levelclass
and refer thatclass
.