Fixed: view_path option not taken into account #361

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+7 −3
Split
View
@@ -34,8 +34,8 @@ def compile_hash(options={})
extends(settings[:file], settings[:options], &settings[:block])
end if @options.has_key?(:extends)
# Attributes
- @options[:attributes].each_pair do |attribute, options|
- attribute(attribute, options)
+ @options[:attributes].each_pair do |attribute, attr_options|
+ attribute(attribute, attr_options)
end if @options.has_key?(:attributes)
# Node
@options[:node].each do |settings|
View
@@ -76,7 +76,11 @@ def fetch_rails_source(file, options={})
source_format = rendered_format unless rendered_format == :html
context_scope.lookup_context.find(file, [], partial, [], {:formats => [source_format]})
end }
- template = lookup_proc.call(false) rescue lookup_proc.call(true)
+ begin
+ template = lookup_proc.call(false)
+ rescue
+ lookup_proc.call(true) rescue return nil
+ end
template.identifier if template
elsif source_format && context_scope.respond_to?(:view_paths) # Rails 2
template = context_scope.view_paths.find_template(file, source_format, false)