Sha256: 7bd600fa1155b33823fb61f504f9ddba1031ba9793249ed0ff81557504cd55e9

Contents?: true

Size: 488 Bytes

Versions: 22

Compression:

Stored size: 488 Bytes

Contents

module Neo
  module Rails
    module Presenter
      def self.included(base)
        base.class_eval do
          def view_context
            Neo::Rails::Presenter.view_context
          end
        end
      end

      class << self
        def view_context
          Thread.current[:neo_rails_presenter_view_context]
        end

        def view_context=(view_context)
          Thread.current[:neo_rails_presenter_view_context] = view_context
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
neo-rails-0.4.1 lib/neo/rails/presenter.rb
neo-rails-0.4.0 lib/neo/rails/presenter.rb
neo-rails-0.3.2 lib/neo/rails/presenter.rb
neo-rails-0.3.1 lib/neo/rails/presenter.rb
neo-rails-0.3 lib/neo/rails/presenter.rb
neo-rails-0.2.3.1 lib/neo/rails/presenter.rb
neo-rails-0.2.3 lib/neo/rails/presenter.rb
neo-rails-0.2.2 lib/neo/rails/presenter.rb
neo-rails-0.2.1 lib/neo/rails/presenter.rb
neo-rails-0.2.0 lib/neo/rails/presenter.rb
neo-rails-0.1.3 lib/neo/rails/presenter.rb
neo-rails-0.1.2 lib/neo/rails/presenter.rb
neo-rails-0.1.1 lib/neo/rails/presenter.rb
neo-rails-0.1.0 lib/neo/rails/presenter.rb
neo-rails-0.0.8 lib/neo/rails/presenter.rb
neo-rails-0.0.7 lib/neo/rails/presenter.rb
neo-rails-0.0.6 lib/neo/rails/presenter.rb
neo-rails-0.0.5 lib/neo/rails/presenter.rb
neo-rails-0.0.4 lib/neo/rails/presenter.rb
neo-rails-0.0.3 lib/neo/rails/presenter.rb