I like the 'lifecycle' namespace, but I don't like to put the state keys
directly under it, like the proposed:
activerecord.attributes.<model>.lifecycle.<state>

We would have something like:

activerecord:
  attributes:
    user:
      name: Name
      state: State
      lifecycle:
        active: active
        foo: foo
        bar: bar

The 'states' are not 'lifecycles' so I would prefer:

activerecord:
  attributes:
    user:
      name: Name
      state: State
      states:
        active: Active
        foo: Foo
        bar: Bar
      transitions:
        bla:

which IMHO is simpler and straightforward. But adding the lifecycle makes it
looks right:

activerecord:
  attributes:
    user:
      name: Name
      state: State
      lifecycle:
        states:
          active: Active
          foo: Foo
          bar: Bar
        transitions:
          bla:

I vote for this one. In this case I would add the 'lifecycle' to the
transition too. Anybody agree?

ciao
dd

On Wed, Jan 19, 2011 at 7:23 PM, Matt Jones <[email protected]> wrote:

>
> On Jan 19, 2011, at 6:13 PM, Domizio Demichelis wrote:
>
> > Ronny,
> > actually that haven't been modified, they are still in
> "<table_name>.states.<state>" as they were.
> >
> > Anyway we should move that in the activerecord namespace...
> >
> > "activerecord.attributes.<model>.state" is used for the regular naming of
> the 'state' field, so what about
> "activerecord.attributes.<model>.states.<state>"?
> >
> > It looks too similar to the attribute name, so what about
> "activerecord.attributes.<model>.state_labels.<state>"?
>
> activerecord.attributes.<model>.lifecycle.<state> might be better; it's
> guaranteed to not collide with any field names on a hobo_model (since if you
> *do* create a field named 'lifecycle', Very Bad Things happen).
>
> --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]<hobousers%[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