store multiple checkbox values in single column of table

135 views
Skip to first unread message

mack gille

unread,
Aug 5, 2013, 7:09:15 AM8/5/13
to rubyonra...@googlegroups.com
hi all,
i need to store multiple checkbox values in single column of a table.
here is my short code https://github.com/Kumar2013hk/check.git .Please
help me in this regard..

--
Posted via http://www.ruby-forum.com/.

Joel Pearson

unread,
Aug 5, 2013, 9:56:08 AM8/5/13
to rubyonra...@googlegroups.com
If you want to store multiple on/off switches together, then Binary is
your friend.

No, Yes, No, No, Yes, Yes, No
0100110

Colin Law

unread,
Aug 5, 2013, 10:09:27 AM8/5/13
to rubyonra...@googlegroups.com
On 5 August 2013 12:09, mack gille <li...@ruby-forum.com> wrote:
> hi all,
> i need to store multiple checkbox values in single column of a table.
> here is my short code https://github.com/Kumar2013hk/check.git .Please
> help me in this regard..

googling for
rails bitfield
provides a number of hits, though I have no personal experience of the
suggestions.

First, though, don't bother unless you have a good reason. Just have
a column per boolean. Adopt the KISS technique.

Colin

>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8fa65752abf7a38feb11488505a4519e%40ruby-forum.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages