Sha256: 49185588b03c37a441b417cad765fa98ad020e8a51c76d495c5417547c2eae8d
Contents?: true
Size: 725 Bytes
Versions: 16
Compression:
Stored size: 725 Bytes
Contents
module Lookbook class PageController < ActionController::Base helper Lookbook::ComponentHelper helper Lookbook::PageHelper helper Lookbook::OutputHelper Lookbook.config.page_paths.each do |path| prepend_view_path Rails.root.join(path) end def render_page(page, locals = {}) @page = page @pages = Lookbook.pages @next_page = @pages.find_next(@page) @previous_page = @pages.find_previous(@page) content = render_to_string inline: @page.content, locals: { page: @page, next_page: @next_page, previous_page: @previous_page, pages: @pages } @page.markdown? ? Lookbook::Markdown.render(content) : content end end end
Version data entries
16 entries across 16 versions & 1 rubygems