lib/surrounded/context/forwarding.rb in surrounded-0.9.3 vs lib/surrounded/context/forwarding.rb in surrounded-0.9.4
- old
+ new
@@ -1,11 +1,11 @@
module Surrounded
module Context
module Forwarding
def forward_trigger(receiver, message, alternate=message)
raise(ArgumentError, %{you may not forward '%{m}`} % {m: message}) if ['__id__','__send__'].include?(message.to_s)
- trigger alternate do
- self.send(receiver).public_send(message)
+ trigger alternate do |*args, &block|
+ self.send(receiver).public_send(message,*args, &block)
end
end
def forward_triggers(receiver, *messages)
messages.each do |message|
\ No newline at end of file