Sha256: 5b14032e57219784a8390344959b793bee62c4062e741ab6aa1101a3bd6769bd

Contents?: true

Size: 415 Bytes

Versions: 8

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

# A monkey-patch for Rails controllers/mailers that auto-decorates ivars
# that are passed to views.
module Gifted
  module Monkey
    module AbstractController
      module Rendering
        def view_assigns
          hash = super
          hash.each_value do |v|
            Gifted::Decorator.instance.decorate v
          end
          hash
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gifted-1.3.0 lib/gifted/monkey/abstract_controller/rendering.rb
gifted-1.2.0 lib/gifted/monkey/abstract_controller/rendering.rb
gifted-1.1.1 lib/gifted/monkey/abstract_controller/rendering.rb
gifted-1.1.0 lib/gifted/monkey/abstract_controller/rendering.rb
gifted-1.0.0 lib/gifted/monkey/abstract_controller/rendering.rb
gifted-0.2.1 lib/gifted/monkey/abstract_controller/rendering.rb
gifted-0.2.0 lib/gifted/monkey/abstract_controller/rendering.rb
gifted-0.1.0 lib/gifted/monkey/abstract_controller/rendering.rb