I helped Tim figure it out. Here's a working example:
class Document < ActiveRecord::Base
hobo_model
Region = HoboFields::Types::EnumString.for(:ab, :bc, :mb, :nb, :nl,
:ns, :nt, :nu, :on, :pe, :qc, :sk, :yt, :other)
...
(config/locales/app.en.yml)
en:
document/regions:
ab: "Alberta"
bc: "British Columbia"
...
This is for Hobo 1.3. The corresponding manual page is available, you
just need to know where it is, (the cookbook displays the stable manual).
https://github.com/tablatom/hobo/blob/rails3/hobo_fields/test/rich_types.rdoctest
We can set the name explicitly to avoid the slash:
class Document < ActiveRecord::Base
hobo_model
Region = HoboFields::Types::EnumString.for(:ab, :bc, :mb, :nb, :nl,
:ns, :nt, :nu, :on, :pe, :qc, :sk, :yt, :other, :name => "Region")
...
en:
regions:
ab: "Alberta"
bc: "British Columbia"
...
cheers,
Bryan
--
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.