[Rails] Re: no sql in the controller guideline

2009-05-05 Thread Tyler MacDonald
PP Junty rails-mailing-l...@andreas-s.net wrote: Nothing that looks at all like SQL should go into a controller, view, or helper. it really came as a surprise to me as Rails itself seems to go against such practice by its AR 'conditions' option, which most of the times contains SQL code.

[Rails] Re: Ruby + Postgres = Bad Idea or Good Idea?

2009-04-17 Thread Tyler MacDonald
Bill Sim rails-mailing-l...@andreas-s.net wrote: This sounds ridiculous to me, but if I'm missing something, I would love to hear some opinions. Is there an issue with support for Ruby+Postgres? Not that I've found... I've got a fairly large database schema, partially defined in ruby,

[Rails] raw SQL in migrations

2009-04-17 Thread Tyler MacDonald
I've taken to using this when I just want a migration to be a big wad of sql; runsplit.rb in my lib/ directory: class Runsplit ActiveRecord::Migration def self.runsplit(sql) transaction do sql.split(';').each do |stmt| execute(stmt) if (stmt.strip! stmt.length0) end

Fwd: Re: [Rails] Message Queue for Rails?

2009-03-27 Thread Tyler MacDonald
http://home.gna.org/xmpp4r/ Use your favourite jabber/XMPP server and you immediately have a messaging system with authenticated entities, status updates, queueing of messages when a server is unavailable, etc. And even better, you can add your servers as contacts in your favourite chat client