1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00

Trying to proxy user-created helpers

This commit is contained in:
Jeff Casimir 2011-07-11 15:21:49 -04:00
parent eafd4cf4dd
commit a830adbdc1

View file

@ -3,7 +3,6 @@ module Draper
include ActionView::Helpers::TagHelper include ActionView::Helpers::TagHelper
include ActionView::Helpers::UrlHelper include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TextHelper include ActionView::Helpers::TextHelper
#include ApplicationHelper #if defined?(ApplicationHelper)
require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/class/attribute'
class_attribute :denied, :allowed class_attribute :denied, :allowed
@ -33,6 +32,10 @@ module Draper
input.respond_to?(:each) ? input.map{|i| new(i)} : new(input) input.respond_to?(:each) ? input.map{|i| new(i)} : new(input)
end end
def helpers
ActionController::Base.helpers
end
private private
def select_methods def select_methods
self.allowed || (source.public_methods - denied) self.allowed || (source.public_methods - denied)