lib/onebox/layout.rb in onebox-1.2.5 vs lib/onebox/layout.rb in onebox-1.2.6
- old
+ new
@@ -9,11 +9,11 @@
def initialize(name, record, cache)
@cache = cache
@record = Onebox::Helpers.symbolize_keys(record)
# Fix any relative paths
- if record[:image] && record[:image] =~ /^\/[^\/]/
- record[:image] = "#{uri.scheme}://#{uri.host}/#{record[:image]}"
+ if @record[:image] && @record[:image] =~ /^\/[^\/]/
+ @record[:image] = "#{uri.scheme}://#{uri.host}/#{@record[:image]}"
end
@md5 = Digest::MD5.new
@view = View.new(name, record)
@template_name = "_layout"