Small cleanup for the block override that works with recent Mab

This commit is contained in:
Paul van Tilburg 2012-01-31 22:34:26 +01:00
parent 8fd7f45efc
commit 5c364e1d10
1 changed files with 1 additions and 2 deletions

View File

@ -87,8 +87,7 @@ module StopTime::Mab
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.
orig_blk = tag.block
tag.block = proc do
tag.block do |orig_blk|
input :type => 'hidden', :name => '_method', :value => meth
orig_blk.call
end if override