[Ruby] refactoring/drying help
Mike Emery
philodoxx at gmail.com
Thu Oct 11 20:15:14 PDT 2007
That's probably the best way to do it if you're worried about data loss.
It's a bad idea when normalizing your data to include a column that's can be
formed by combining other columns.
On 10/11/07, shane becker <veganstraightedge at gmail.com> wrote:
>
>
> > I don't see why you need a full name attribute in the person table
> > when you already have a first name and a last name.
>
> to clear up the existence of first_name, last_name AND full_name. i'm
> pulling from existing data that isn't separated into first and last.
> it's easy enough to grab the first and last word in a multi-word
> name, but what if someone's name is 'brian k vaughn'? i'd lose the
> stuff in the middle. so maybe i should just store the full_name in
> the db, then have first_name and last_name as model methods.
> _______________________________________________
> Ruby at zenspider.com - Seattle.rb non-commercial list
> http://www.zenspider.com/seattle.rb
> http://www.zenspider.com/mailman/listinfo/ruby
>
--
-Mike
More information about the Ruby
mailing list