> How many types? I only see two types, "forname", "middlename". Are you
> trying to build a baby name to put into a "shopping cart" of some sort?
I'm trying to develop an app where the full proposed baby name is kind
of built up by the user - i envisage some dragging and dropping to
reorder the firstnames - several combinations of "(forname +
middle(optional)) + surname" can be reordered to generate the final full
name and yes, I can only think that forname and middle name will be
necessary. Such a seemingly simple task but when I get to think about it
the options for the model seem endless!
Also, I don't want to end up in ruby typing things like this.
name = Name.find_by_name("some_name") # seems ridiculous - too many
names.
grrr, maybe like this.
Baby
has_many :givennames
- gender, string
- surname, string
GivenName
belongs_to :baby
- value, string
- position, integer
####
So then I write stuff like
firstname = Baby.first.given_name.first
fullname = firstname + " " + Baby.first.surname
I'm not sure this all seems a bit clunky and maybe OTT. Not sure how to
arrange my models and attribs in this case. Is this approach
good/bad/ugly - really welcome some help as I'd like to get the model
right 1st off.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.