OK I see what you're saying. That's much simpler and more future
proof. Thanks again!

On Feb 20, 11:43 am, Andrew Porter <[email protected]> wrote:
> yaphi wrote:
> > that's exactly what I want...didn't know about update_all! Thanks I'll
> > try it when I get back tonight.
>
> That sucks.
>
> You can only have one featured row in your table.
>
> Why would you identify this row by marking all your rows one way or
> another (you will need to index this column (at some point) also) when
> all you need to store (somewhere) is the id of the current featured row
> ?   This is an heavyweight solution to a flyweight problem.
>
> Create a control/settings table/model that has an attribute
> "current_featured_project_id" and access it via that (as shown already).
> You might find other single settings values etc.. that you can add to
> this table later.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to