What is the best way to return multiple tags from a Rails Helper?

后端 未结 5 1456
梦如初夏
梦如初夏 2021-02-02 09:19

I want to create a hidden field and create a link in one helper and then output both to my erb.

<%= my_cool_helper \"something\", form %>

5条回答
  •  走了就别回头了
    2021-02-02 09:53

    def output_siblings
      div1 = tag.div 'some content'
      div2 = tag.div 'other content'
    
      div1 + div2
    end
    

    just simplifying some other answers in here.

提交回复
热议问题