Sha256: 402688a19cc82f7c86697b3de08dbb4a14bb40bf90690ddbe56d2a6a8e1d5e66

Contents?: true

Size: 255 Bytes

Versions: 2

Compression:

Stored size: 255 Bytes

Contents

module Draper
  module ViewContext
    def set_current_view_context
      Thread.current[:current_view_context] ||= self.view_context
    end
    
    def self.included(source)
      source.send(:before_filter, :set_current_view_context)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
draper-0.8.1 lib/draper/view_context.rb
draper-0.8.0 lib/draper/view_context.rb