I see the code ''column.human_name'' in the scaffold generator.
I''d like to
modify it, to have it remove the leading table group designation, but I am
unable to find where it is defined? This is my modification:
def humanize(underscored_name)
a = underscored_name.to_s
if a.index(''_'') == 2 then
b = a[a.index(''_'')+1.. -1]
else
b = a
end
b.!gsub(/^_/, '' '').capitalize
end
Related question:
When I override the ''human_name'' method for my custom
''table_scaffold.rb'',
where should I put it. Should it go at the top if the file?
-Larry
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails