Modify StopTime#Mab#mab_done to transform underscores to dashes in classes

This commit is contained in:
Paul van Tilburg 2013-06-16 20:25:12 +02:00
parent 2c4fb79c23
commit b7b660ffc5
1 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,12 @@ module StopTime::Mab
SUPPORTED = [:get, :post]
def mab_done(tag)
# Transform underscores into dashs in class names
if tag._attributes.has_key?(:class) and tag._attributes[:class].present?
tag._attributes[:class] = tag._attributes[:class].gsub('_', '-')
end
# The followin method processing is only for form tags.
return super unless tag._name == :form
meth = tag._attributes[:method]