Seems like this is way overkill here.
Why not do something more like:
class Post < ActiveRecord::Base
??? attr_accessor :terms_of_use
On Thu, Dec 16, 2010 at 2:58 PM, Owen Ou <[address removed]>
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.github.com/744165.
This solution seems pretty verbose and I am wondering whether there are better ones out there.
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Owen Ou ([address removed]) from Vancouver Ruby / Rails Meetup Group.
To learn more about Owen Ou, visit his/her member profile: http://www.meetup.com/ruby-112/members/12466466/
To unsubscribe or to update your mailing list settings, click here: http://www.meetup.com/ruby-112/settings/
Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]