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
ApplicationComponentin the HTML instead ofSubheadComponentitself. I noticed GitHub Primer is doing the same thing. Care to explain?Yes, because
SubheadComponentclassdoes not have thecallmethod defined. When you're passing in ablock, Ruby looks for acallmethod.Instead of defining
callmethod for each of the components, you can simplify define in your top levelclassand refer thatclass.