Sha256: 90c4c13d70e59bb8e5c8b45ed840f2c489bec3c244f255d3b58202adf4a3b69d

Contents?: true

Size: 574 Bytes

Versions: 13

Compression:

Stored size: 574 Bytes

Contents

format :html do
  # when *head is rendered in the main body of a page, we escape the HTML
  # otherwise (most typically in the head tag, of course), we render the
  # HTML unescaped
  view :core, cache: :never do
    escape_in_main do
      nest root.card, view: :head
      # note that the head tag for each card is different
      # (different title, different style rules, etc)
      # so we don't cache the core of *head, but we _do_ cache some
      # views within each head (see all/head.rb)
    end
  end

  def escape_in_main
    main? ? (h yield) : yield
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
card-1.96.8 mod/basic_formats/set/self/head.rb
card-1.96.7 mod/basic_formats/set/self/head.rb
card-1.96.6 mod/basic_formats/set/self/head.rb
card-1.96.5 mod/basic_formats/set/self/head.rb
card-1.96.4 mod/basic_formats/set/self/head.rb
card-1.96.3 mod/basic_formats/set/self/head.rb
card-1.96.2 mod/basic_formats/set/self/head.rb
card-1.96.1 mod/basic_formats/set/self/head.rb
card-1.96.0 mod/basic_formats/set/self/head.rb
card-1.95.3 mod/basic_formats/set/self/head.rb
card-1.95.2 mod/basic_formats/set/self/head.rb
card-1.95.1 mod/basic_formats/set/self/head.rb
card-1.95.0 mod/basic_formats/set/self/head.rb