#98 ✓resolved
Georg Ledermann

Hidden input tag for preserving order breaks XHTML validation

Reported by Georg Ledermann | July 7th, 2009 @ 08:59 AM

This code from rails_helper.rb creates invalid XHTML:

    # Automatically adds an "order" hidden field in your form to preserve how the data 
    # is being ordered.
    def fields_for(*args, &block)
      if search_obj = args.find { |arg| arg.is_a?(Searchlogic::Search) }
        args.unshift(:search) if args.first == search_obj
        concat(hidden_field_tag("#{args.first}[order]", search_obj.order) + "\n")
        super
      else
        super
      end
    end

The input tag should be put into a DIV or something.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket

Tags

Pages