
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
-
-
Ben Johnson July 12th, 2009 @ 09:53 PM
- State changed from new to resolved
Thanks, this has been applied.
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.
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.