1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00

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

View file

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