Mike Rose wrote:
>> @albums=Album.find(:all, :conditions => [:artist_id =>
>> params[:find_id]])
> 
> Good practice for it to read like this
> 
> @albums = Album.find(:all, :conditions => "where artist_id = '#{params
> [:find_id}'")

Nope.  Your "good practice" is in fact more typing and more literal SQL 
for what as far as I can see is no good reason at all.  Take advantage 
of Rails' syntactic sugar and stick with the first version.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to