Multi level block method is generating issue

后端 未结 2 1206
不知归路
不知归路 2021-01-03 14:26

I have a class

class DataListBuilder
    include ActionView::Helpers::TagHelper
    include ActionView::Helpers::CaptureHelper
    include ActionView::Helper         


        
2条回答
  •  轮回少年
    2021-01-03 15:27

    options_column is a "block view", I'd remove the = in <%= l.options_column do |c| %>, that's for sure. Then, I'd use concat in options_column instead of returning it directly as a string.

    Anyway, the simple solution is here (I've used it, no problems at all):

    https://github.com/markevans/block_helpers

提交回复
热议问题