[typo] ticket #13 - add Archive articles by month (I hope this is what it means!)

Tobias Luetke tobias.luetke at gmail.com
Tue Apr 12 17:04:23 EDT 2005


Typo supports this already. 

http://blog.leetsoft.com/articles/2005/
http://blog.leetsoft.com/articles/2005/03/
http://blog.leetsoft.com/articles/2005/03/28/

On Apr 12, 2005 4:21 PM, Stuart Smith
<stuart.smith at smsconsulting.wanadoo.co.uk> wrote:
> I misunderstood the database dependency issues; I just assumed that
> since an ISP/host would run typo against a specific persistent storage
> mechanism then a specific version of archive.rb would be installed on
> the target system. I just saw this as an extension of the multiple SQL
> files to create the initial schema for a specific vendor db.
> 
> It would be interesting to see what others make of the problem regarding
> vendor specific SQL statements. There are companies that make a living
> from 'middleware' to allow the coder to write non-specific SQL (e.g.
> RogueWave had something called dbtools.h that I used a long time ago but
> that was a real 'pain in the ass' to use).
> 
> Thanks
> 
> Stuart
> 
> 
> > > app/models/archive.rb
> > >
> > > class Archive < ActiveRecord::Base
> > >
> > >   has_many :articles
> > >
> > >   def self.find_dates()
> > >     @archives=Article.find_by_sql(["SELECT distinct date_format
> > > (created_at, '%%M %%Y') date from articles ORDER by created_at "])
> > >   end
> > >
> > > end
> > >
> 
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
> 


-- 
Tobi
http://www.snowdevil.ca - Snowboards that don't suck
http://www.hieraki.org   - Open source book authoring
http://blog.leetsoft.com - Technical weblog


More information about the Typo-list mailing list