mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
Don't re-define local methods
This commit is contained in:
parent
d50aefe2f8
commit
d591716c2a
2 changed files with 6 additions and 4 deletions
|
@ -49,9 +49,11 @@ module Draper
|
|||
|
||||
def build_methods
|
||||
select_methods.each do |method|
|
||||
(class << self; self; end).class_eval do
|
||||
define_method method do |*args, &block|
|
||||
source.send method, *args, &block
|
||||
unless self.respond_to(method)
|
||||
(class << self; self; end).class_eval do
|
||||
define_method method do |*args, &block|
|
||||
source.send method, *args, &block
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Draper
|
||||
VERSION = "0.4.0"
|
||||
VERSION = "0.4.1"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue