Displaying 1 result from an estimated 1 matches for "acts_as_expiration_date".
2006 Jun 08
2
how to add plugin to ActiveRecord
...xt_month_str) - 1
  end
end
However, this is Ruby on Rails, and I''m trying to break all my old 
programming habits like making ugly code, and this looks ugly.  Is there 
a way to make this into some kind of plugin so that all I have to do is 
say:
class Account < ActiveRecord::Base
  acts_as_expiration_date :exp_date
end
and it will automatically do what I want behind the scenes?
Thanks!
Mike
-- 
Posted via http://www.ruby-forum.com/.