Sha256: 30d96b94e1b038496493638e68c0a138994e4ca9c3253d90fb5227465b4dcedd
Contents?: true
Size: 560 Bytes
Versions: 7
Compression:
Stored size: 560 Bytes
Contents
require 'tao_on_rails/components/base' module TaoOnRails module Components class PageComponent < Base def initialize view, options = {} super @page_id = view.page_id if @options[:class].present? @options[:class] += " tao-page #{@page_id}-page" else @options[:class] = "tao-page #{@page_id}-page" end end def render &block view.content_tag "#{view.page_id}-page", options, &block end def self.component_name :page end end end end
Version data entries
7 entries across 7 versions & 1 rubygems