Sha256: fe3d92ef3eef5deb5e1c93193fe79fb2472208cb5172a0a668a2bd45d8a1c5fa
Contents?: true
Size: 745 Bytes
Versions: 5
Compression:
Stored size: 745 Bytes
Contents
module Radiant module ViewPathsExtension def self.included(base) base.class_eval %{ cattr_accessor :view_paths self.view_paths = [ActionController::Base.template_root].compact alias full_template_path_without_paths full_template_path alias full_template_path full_template_path_with_paths } end def full_template_path_with_paths (template_path, extension) view_paths.reverse_each do |path| full_path = File.join(path, "#{template_path}.#{extension}") return full_path if File.exists?(full_path) end full_template_path_without_paths(template_path, extension) end end end ActionView::Base.class_eval { include Radiant::ViewPathsExtension }
Version data entries
5 entries across 5 versions & 1 rubygems