Colin Law wrote in post #1027667:
> That works of course, but then you may have the complication of adding
> all the setters and accessors so you can say things like
> widget.tb = true
> do_something if widget.tb
> and so on.
> Once again it depends upon the details of the OPs requirement.

Yep. I didn't say it might be a simpler solution, but the question was 
"Can anyone help me to come up with an efficient way to do this in Rails 
3.0.10?" That the question I was answering anyway. I think we can all 
agree that a bit-field would be the most efficient. Integer comparison, 
especially if the field is indexed should provide excellent query 
efficiency.

But, as others have mentioned, there are gems to make this more complex 
solution easier to manage.

-- 
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.

Reply via email to