Sha256: a81980fe29b3467d0c5dee122564697859cd8ac920d3402b99b7147c980faf09

Contents?: true

Size: 382 Bytes

Versions: 5

Compression:

Stored size: 382 Bytes

Contents

module Inverter
  class Middleware
    def initialize(app)
      @app = app
    end

    def call(env)
      # workaround this method so no need to call it if:
      #  - not GET request
      #  - not action request (assets or public files)

      if ! Inverter.disable_middleware
        Inverter.model_class.sync_with_templates!
      end

      @app.call(env)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inverter-0.5.1 lib/inverter/middleware.rb
inverter-0.5.0 lib/inverter/middleware.rb
inverter-0.4.7 lib/inverter/middleware.rb
inverter-0.4.6 lib/inverter/middleware.rb
inverter-0.4.5 lib/inverter/middleware.rb