addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

questions about tableless column

From: Owen O.
Sent on: Thursday, December 16, 2010 2:56 PM
Hi all,

I have a question about ActiveRecord hope any of you can help me a bit. Thanks in advance :).

I have a ActiveRecord model which has a boolean field to indicate whether the use has accepted the license. I don't want to create a database column related to that but I would like it to consume all the validation stuff provided by ActiveRecord. There are lots of solutions on the web but all of them are focusing on tableless model, while my model also have other fields corresponding to table columns. Here is what I come up with: https://gist.githu...­.

This solution seems pretty verbose and I am wondering whether there are better ones out there.

Thanks,
Owen

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy