Permalink
Browse files

[fixes #280] use source_format when looking up partials

  • Loading branch information...
1 parent 960f1db commit 45136801102cce3ba15c4db89188adb4126fd902 @databyte databyte committed Jul 2, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 fixtures/ashared/views_rails_3/users/phone_number.xml.rabl
  2. +1 −1 lib/rabl/partials.rb
View
1 fixtures/ashared/views_rails_3/users/phone_number.xml.rabl
View
2 lib/rabl/partials.rb
@@ -71,7 +71,7 @@ def fetch_rails_source(file, options={})
if ActionPack::VERSION::MAJOR == 3 && ActionPack::VERSION::MINOR < 2
context_scope.lookup_context.find(file, [], partial)
else # Rails 3.2 and higher
- context_scope.lookup_context.find(file, [], partial, [], {:formats => [:json]})
+ context_scope.lookup_context.find(file, [], partial, [], {:formats => [source_format]})
end }
template = lookup_proc.call(false) rescue lookup_proc.call(true)
template.identifier if template

0 comments on commit 4513680

Please sign in to comment.