On 12/9/05, Francois Beausoleil <[EMAIL PROTECTED]> wrote: > Hi ! > > I have an instance where I'd like to use the automatic value quoting > that sanitize conditions provides. Here's the SQL: > SELECT COUNT(*) FROM tournaments > INNER JOIN entries ON entries.tournament_id = tournaments.id > INNER JOIN plays ON plays.entry_id = entries.id > WHERE #{self.class.sanitize_sql([conds.join(' AND '), values])} > > Unfortunately, I get a NoMethodError because sanitize_sql is protected. > > Is there a particular reason why this is protected ?
Usually methods are marked as protected when we don't want to make them part of the public API. Every time someone calls our 'implementation' methods we either break their applications, or lose the option to refactor that code. -- Cheers Koz _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core