fixed a bug in template.rb when <form> tag has no method.