Sha256: 32e1557737023e0a765332613a5abe4607873d66f43be6190499f7fa1ef7d3a8
Contents?: true
Size: 992 Bytes
Versions: 7
Compression:
Stored size: 992 Bytes
Contents
require File.join(File.dirname(__FILE__), 'file_base') module Mack module Rendering # :nodoc: module Type # :nodoc: # Pretty much the same thing as Mack::Rendering::Type::Action, except the template is relative to the app/views directory, # and not the app/views/#{controller name} directory like action. class Template < Mack::Rendering::Type::FileBase # See Mack::Rendering::Type::FileBase render_file for more information. # # The path to the file is built like such: # app/views/#{template (show, index, etc...)}.#{format (html, xml, js, etc...)}.#{extension defined in the engine} # Example: # <%= render(:template, "users/show") %> # => app/views/users/show.html.erb def render t_file = Mack::Paths.views("#{self._render_value}.#{self._options[:format]}") render_file(t_file, :template) end end # Template end # Type end # Rendering end # Mack
Version data entries
7 entries across 7 versions & 1 rubygems