Trying to proxy user-created helpers
This commit is contained in:
parent
eafd4cf4dd
commit
a830adbdc1
|
@ -3,7 +3,6 @@ module Draper
|
|||
include ActionView::Helpers::TagHelper
|
||||
include ActionView::Helpers::UrlHelper
|
||||
include ActionView::Helpers::TextHelper
|
||||
#include ApplicationHelper #if defined?(ApplicationHelper)
|
||||
|
||||
require 'active_support/core_ext/class/attribute'
|
||||
class_attribute :denied, :allowed
|
||||
|
@ -33,6 +32,10 @@ module Draper
|
|||
input.respond_to?(:each) ? input.map{|i| new(i)} : new(input)
|
||||
end
|
||||
|
||||
def helpers
|
||||
ActionController::Base.helpers
|
||||
end
|
||||
|
||||
private
|
||||
def select_methods
|
||||
self.allowed || (source.public_methods - denied)
|
||||
|
|
Loading…
Reference in New Issue