Sha256: c7e691565a221e7381efe3bab9d788b4d85c00b89e8b304e16c460040178cbd5

Contents?: true

Size: 408 Bytes

Versions: 15

Compression:

Stored size: 408 Bytes

Contents

module Draper
  # Include this module in your decorators to get direct access to the helpers
  # so that you can stop typing `h.` everywhere, at the cost of mixing in a
  # bazillion methods.
  module LazyHelpers

    # Sends missing methods to the {HelperProxy}.
    def method_missing(method, *args, &block)
      helpers.send(method, *args, &block)
    rescue NoMethodError
      super
    end

  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
draper-3.0.1 lib/draper/lazy_helpers.rb
draper-3.0.0 lib/draper/lazy_helpers.rb
draper-3.0.0.pre1 lib/draper/lazy_helpers.rb
draper_new-3.0.0 lib/draper/lazy_helpers.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/draper-2.1.0/lib/draper/lazy_helpers.rb
draper-2.1.0 lib/draper/lazy_helpers.rb
draper-2.0.0 lib/draper/lazy_helpers.rb
draper-1.4.0 lib/draper/lazy_helpers.rb
draper-1.3.1 lib/draper/lazy_helpers.rb
draper-1.3.0 lib/draper/lazy_helpers.rb
draper-1.2.1 lib/draper/lazy_helpers.rb
draper-1.2.0 lib/draper/lazy_helpers.rb
jamesgolick-draper-1.1.1a lib/draper/lazy_helpers.rb
draper-1.1.0 lib/draper/lazy_helpers.rb
draper-1.0.0 lib/draper/lazy_helpers.rb