Thanks! It worked just fine for the Customers tab...but when I click on the 
names listed on the first page that comes up after clicking on the Customers 
tab, then I should see the edit button, and two fields (fullname and address) 
but only address is visible.  In all my playing around, maybe I messed up 
something in the process...any ideas?  The fullname field is visible whenever I 
click the "New" or "Edit" buttons and is properly labeled with "Fullname".


Arthur



________________________________
From: Matt Jones <[email protected]>
To: [email protected]
Sent: Monday, August 15, 2011 2:34 PM
Subject: Re: [Hobo Users] Field Relabeling


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.

-- 
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.

Reply via email to