Small cleanup for the block override that works with recent Mab
This commit is contained in:
parent
d81480a2d0
commit
9173b74850
1 changed files with 1 additions and 2 deletions
|
@ -87,8 +87,7 @@ module StopTime::Mab
|
||||||
tag.attributes[:method] = 'post' if override = !SUPPORTED.include?(meth)
|
tag.attributes[:method] = 'post' if override = !SUPPORTED.include?(meth)
|
||||||
# Inject a hidden input element with the proper method to the tag block
|
# Inject a hidden input element with the proper method to the tag block
|
||||||
# if the form method is unsupported.
|
# if the form method is unsupported.
|
||||||
orig_blk = tag.block
|
tag.block do |orig_blk|
|
||||||
tag.block = proc do
|
|
||||||
input :type => 'hidden', :name => '_method', :value => meth
|
input :type => 'hidden', :name => '_method', :value => meth
|
||||||
orig_blk.call
|
orig_blk.call
|
||||||
end if override
|
end if override
|
||||||
|
|
Loading…
Reference in a new issue