Consider the following example.

class Project
has_many :tasks
end

class Task
belongs_to :project
end

@project = Project.find(1)

@project.task.find(1)
@project.task.build(params[:task])
@project.task.delete(params[:task_id])

In all these cases @project is needed. actually we need only
project_id for all the above things.

If the below given things are possible the would save us from the
query @project = Project.find(1)


Project.task.find(project_id,task_id)
Project.task.build(project_id,params[:task])
Project.task.delete(project_id,params[:task_id])

If this thing can be added to rails it would be great.

Regards,
Pankaj


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to