Sha256: 5a56af69cb06535675a1891f39c8fce25ec40d981eecf53326cb4b1a2b396892

Contents?: true

Size: 399 Bytes

Versions: 1

Compression:

Stored size: 399 Bytes

Contents


  def show_content( key, title = nil, &block  )
    content = SimpleContent.where( key: key ).first

    if @debug_content
      content = nil
    end

    if content.nil?
      pos = output_buffer.length
      yield
      fragment = output_buffer.slice( pos..-1 )
      content = SimpleContent.create( key: key, body: fragment, title: title )
    else
      safe_concat content.body
    end
  end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
happy_seed-0.0.21 lib/generators/happy_seed/simple_cms/templates/application_helper.rb