Sha256: e6e014b9820bfd03a47742d6f22b96d760792442ad8fa549147f7875dd7d5b94

Contents?: true

Size: 381 Bytes

Versions: 11

Compression:

Stored size: 381 Bytes

Contents

module ActiveDecorator
  module Helpers
    def method_missing(method, *args, &block)
      super
    #TODO need to make sure who raised the error?
    rescue NoMethodError, NameError => original_error
      begin
        ActiveDecorator::ViewContext.current.send method, *args, &block
      rescue NoMethodError, NameError
        raise original_error
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
active_decorator-0.7.1 lib/active_decorator/helpers.rb
active_decorator-0.7.0 lib/active_decorator/helpers.rb
active_decorator-0.6.0 lib/active_decorator/helpers.rb
lulalala_presenter-0.0.1 lib/active_decorator/helpers.rb
active_decorator-0.5.3 lib/active_decorator/helpers.rb
active_decorator-0.5.2 lib/active_decorator/helpers.rb
active_decorator-0.5.1 lib/active_decorator/helpers.rb
active_decorator-0.5.0 lib/active_decorator/helpers.rb
active_decorator-0.4.0 lib/active_decorator/helpers.rb
active_decorator-0.3.4 lib/active_decorator/helpers.rb
active_decorator-0.3.3 lib/active_decorator/helpers.rb