Sha256: b82c3b47aad58739ce602514e19cf9f91fa76658e0c2ac2cef3654e6eebef9e3
Contents?: true
Size: 1.2 KB
Versions: 2
Compression:
Stored size: 1.2 KB
Contents
require 'singleton' class PagesController < ApplicationController class IntegrationsResolver < ActionView::Resolver include Singleton # Follow convention when using this! # Actually, you, dear user, really # should have no reason for changing # the code here at all since it will be # autogenerated for you for testing purposes def find_templates(name, prefix, partial, details) if partial identifier = "#{prefix}-#{name}" p_name = name.split "/" p_name.push("_" + p_name.pop) f_path = File.join( File.expand_path("../../../../assets/html", File.dirname(__FILE__)), p_name.join("/") ) throw "#{name}--#{prefix}--#{partial}--#{details}--#{f_path}" unless File.exist?( f_path + ".html.haml") source = File.read f_path + ".html.haml" handler = ActionView::Template.registered_template_handler("haml") details = { :format => Mime[:html] , :updated_at => 1.seconds.ago , :virtual_path => f_path } [ActionView::Template::new( source, identifier, handler, details )] else [] end end end append_view_path IntegrationsResolver.instance def index; end end
Version data entries
2 entries across 2 versions & 1 rubygems