moonmaster9000/frill

View on GitHub
app/frills/view_context_frill.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ViewContextFrill
  include Frill

  def self.frill? object, context
    object.class_eval do
      define_method :helpers do
        @frill_helper ||= context.respond_to?(:view_context) ? context.view_context : context
      end

      define_method :h do
        helpers
      end
    end

    false
  end
end