Hi Erol,

On Mon, Oct 11, 2010 at 10:45 AM, Erol Fornoles <[email protected]> wrote:

Your routing suggestion is good, however this
> �...@artist = Artist.find(params[:artist_id])

will throw an exception if params[:artist_id] is not supplied.  You
could avoid that using Artist.find_by_id which should return nil
rather than throwing a RecordNotFound exception.  At the same time, it
is not typical for an index method to be called with parameters.  More
typical to simply supply a list method for that purpose and include it
in your routes.

Best regards,
Bill

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to