From 800dd3106f31053eeac2bfb619d936c53a60d2f3 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 16 Jun 2013 15:17:13 +0200 Subject: [PATCH] Adapt StopTime::Mab#mab_done to follow Mab 0.0.3 API changes --- stoptime.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stoptime.rb b/stoptime.rb index 20fda21..eef0707 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -88,13 +88,13 @@ module StopTime::Mab SUPPORTED = [:get, :post] def mab_done(tag) - return super unless tag.name == :form + return super unless tag._name == :form - meth = tag.attributes[:method] - tag.attributes[:method] = 'post' if override = !SUPPORTED.include?(meth) + meth = tag._attributes[:method] + tag._attributes[:method] = 'post' if override = !SUPPORTED.include?(meth) # Inject a hidden input element with the proper method to the tag block # if the form method is unsupported. - tag.block do |orig_blk| + tag._block do |orig_blk| input :type => 'hidden', :name => '_method', :value => meth orig_blk.call end if override