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:
parent
57617ba0d4
commit
057ab4e86f
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue