I
I
IvanN7772016-11-30 21:23:27
Ruby on Rails
IvanN777, 2016-11-30 21:23:27

Is it possible to make helper wraper duplicate content?

module CategoriesHelper

  def wrap_page_of_category(&block)

    content_tag :div, class: "container-fluid" do
      content_tag :div, class: "row" do
        content_tag :div, class: "page-of-categories offset-ms-1 col-ms-7 col-t-8" do
          content_tag :div, class: "ramka" do
            yield
          end
        end
      end
    end

  content_tag :div, class: "ramka" do
            yield
  end

  end
end

Draws the content of the last block

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Polushkin, 2016-12-08
@dmitry-polushkin

Wrap everything in an array, and may you be happy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question