Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added @virtual_path ivar to #render

  • Loading branch information...
commit ec032c9d1f6b4a43f7a1f8bbea8e00c810163b1f 1 parent 9bad3cf
@ddemaree ddemaree authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  merb-core/lib/merb-core/controller/mixins/render.rb
View
2  merb-core/lib/merb-core/controller/mixins/render.rb
@@ -123,6 +123,8 @@ def render(thing = nil, opts = {})
template_method, template_location =
_template_for(thing, content_type, controller_name, opts[:template])
+ @virtual_path = template_location.sub(Rails.root.join('app/views'),'').gsub(/\.(?:html|erb)/, '').sub(/^\//, '')
+
# Raise an error if there's no template
unless template_method && self.respond_to?(template_method)
template_files = Merb::Template.template_extensions.map { |ext| "#{template_location}.#{ext}" }
Please sign in to comment.
Something went wrong with that request. Please try again.