classical problem. to be resolved: User.files.find(params[:id])
assuming, that params[:id] contains the file id. But however in detail, the main "trick" is to use User.files.find(...) instead of Files.find(...) since that will create an SQL query that checks not only for the file id, but for the user_id column too. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

