On Aug 15, 2011, at 3:32 PM, Arthur Baldwin wrote: > I'm wondering what the best method is for relabeling a field? Should I use > app.en.yml or use something like: > > def name > fullname :string > end > > in another file? > > The actual field name is fullname for the first field in Customers table. > Anyway you know how if you don't use the name "name" the various input > screens drop that field entirely. Just want to know the "best way" to get > them back with the appropriate label.
I think you're looking for the :name option when declaring a field: fields do fullname :string, :name => true end This method can be used to pick any database field as the record's "name", which gets used in titles, headings, and select menus. You *can* also define a name method: def name fullname end but this is less than satisfactory as it will, for instance, make sorting fail on a 'this' column in a table-plus. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
