Open blelump opened 8 years ago
That is why you'll see that I use a mixture of both html_blocks and instance methods on a element.
I introduced html_blocks to try to decouple HTML rendering from an element itself. This I stand by agree that it lacks the ability to call super. I.e if you define an element with the same context again you can still access it via super. I can than change rename_html_context to just alias_html :old_name, :new_name
Hi @fran-worley !
I wonder what was the reason of introducing
html_blocks
instead of using methods. Blocks are flexible for sure, but if you want to override a block, you have to either copy/paste the whole block from superclass and add additional logic, or userename_html_context
, e.g:In my opinion, both of these methods above arent such convenient as using simply:
Perhaps I'm missing something? So far, when I'm dealing with
input_column
orinput_label
, most cases cover prepending or appending some content into that blocks, because Bootstrap builder is well prepared :+1: .