search for: date_expir

Displaying 3 results from an estimated 3 matches for "date_expir".

Did you mean: date_expires
2006 Apr 22
7
Expiring items
In my database I have a products table that has a bunch of attributes (title, description, etc) including one for date_expires. Is there a best practices method to get the database to erase the expired items? Is that done outside RoR via Cron or something? Else is it better to just have my app filter out anything that is expired but still keep those records in my dbase? -- Posted via http://www.ruby-forum.com/.
2006 Aug 14
2
need a warning for destroy all
I wrote a small controller to find all the expired items and destroy them: @listtodestroy=Product.find(:all, :conditions => [''user_id = ? AND date_expires <= ?'', @user.id, Time.now]) for product in @listtodestroy product.destroy end It works fine but there''s no warning that everything is about to be removed like when I call product.destroy on an id instead of array. Is there a simple way to call the &quo...
2005 Nov 23
0
Another CTI question
...tions before and I have another one based on my migration progress. These are two condensed tables (the actuals being bigger): Content +-------------+ | id | | title | | description | | etc..... | +-------------+ ContentJob +--------------+ | content_id | | location | | date_expired | | etc..... | +--------------+ The above is legacy stuff and I can''t really change it right now as it''s live; my goal is to get Rails to use the existing infrastructure and then later make changes. My AR object is below: class ContentJob < ActiveRecord::Base set...