Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
slight code reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelenak committed Feb 2, 2009
1 parent d18bb4e commit 5cf6fea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/oembed_links/template_resolver.rb
Expand Up @@ -72,6 +72,7 @@ def self.resolve_template_path(path)
#
# The evaluated result of the template will be returned.
def self.eval_template_for_path(path, url, data, response)
rendered_response = nil
if defined?(ApplicationController) && defined?(ActionController)
if !defined?(ActionController::TestRequest) ||
!defined?(ActionController::TestResponse)
Expand All @@ -84,7 +85,9 @@ def self.eval_template_for_path(path, url, data, response)
path,
200,
true,
{ :data => data, :url => url, :response => response }).body
{ :data => data,
:url => url,
:response => response }).body
end
if rendered_response.nil? && actual_path = resolve_template_path(path)
contents = File.read(actual_path)
Expand Down

0 comments on commit 5cf6fea

Please sign in to comment.