Sha256: 2b86c398cc82f6e6d9b7c01c86f8a52e37c8795cc398947e44328622daf0ceb5

Contents?: true

Size: 340 Bytes

Versions: 19

Compression:

Stored size: 340 Bytes

Contents

module Artwork
  module Controller
    def self.included(controller)
      controller.class_eval do
        around_filter :initialize_artwork_env
        helper View
      end
    end

    private

    def initialize_artwork_env
      Artwork.configure_for request
      yield
    ensure
      Artwork.reset_configuration
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
artwork-1.0.0 lib/artwork/controller.rb
artwork-0.7.3 lib/artwork/controller.rb
artwork-0.7.2 lib/artwork/controller.rb
artwork-0.7.1 lib/artwork/controller.rb
artwork-0.7.0 lib/artwork/controller.rb
artwork-0.6.1 lib/artwork/controller.rb
artwork-0.6.0 lib/artwork/controller.rb
artwork-0.5.0 lib/artwork/controller.rb
artwork-0.4.2 lib/artwork/controller.rb
artwork-0.4.1 lib/artwork/controller.rb
artwork-0.4.0 lib/artwork/controller.rb
artwork-0.3.2 lib/artwork/controller.rb
artwork-0.3.1 lib/artwork/controller.rb
artwork-0.3.0 lib/artwork/controller.rb
artwork-0.2.1 lib/artwork/controller.rb
artwork-0.2.0 lib/artwork/controller.rb
artwork-0.1.1 lib/artwork/controller.rb
artwork-0.1.0 lib/artwork/controller.rb
artwork-0.0.1 lib/artwork/controller.rb