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:
parent
eafd4cf4dd
commit
a830adbdc1
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue