Set view_context if it's nil.

This should take care of #244, but also in general, anywhere
that we haven't primed the context yet.
This commit is contained in:
Steve Klabnik 2012-08-11 15:45:35 -07:00
parent 57617ba0d4
commit 057ab4e86f
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
module Draper
module ViewContext
def self.current
Thread.current[:current_view_context]
Thread.current[:current_view_context] || view_context
end
def self.current=(input)