Hi,
I have many models which do not have the :name field (or not as the first
field), and wondered that the first field never shows up in the table of
the model index page.
I found the reason in
the hobo_bootstrap-2.0.0.pre10/taglibs/index_page.dryml:
<%
if this.first
...
field_names[0] = "this"
...
end
%>
I think overriding the first item in the array is a bug and it should
instead be an "insert before the first field".
Inserting the String "this" before the first field would list all fields as
columns.
So the code would change to:
<%
if this.first
...
field_names.unshift("this")
...
end
%>
Another possibility to extends the current behavior is to check whether the
first field is "name", and only in this case replace the first array item
like
<%
if this.first
...
if field_names[0].to_sym == :name
field_names[0] = "this"
else
field_names.unshift("this")
end
...
end
%>
any ideas on this?
thanks,
ALex.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.