You guys are right. It would be too much work that would only work 
(accurately) if the three models had strictly one relationship. We could 
find ways to ensure a greater accuracy but it wouldn't be worth it. And 
like John said, it has the potential to be greatly misused and open a can 
of security worms. I'll just stick to what I'm doing now. Thanks :)

On Monday, June 4, 2012 1:10:50 PM UTC-4, Michael Boutros wrote:
>
> Hello all,
>
> I'm working on a Rails app and I have resources nested three deep - let's 
> call them user, project, and issues. The route helpers now look like 
> user_project_issue_path(@user, @project, @issue). Would it make sense for 
> Rails to guess the @user <https://github.com/user> and 
> @project<https://github.com/project> relations 
> from @issue <https://github.com/issue>? It just feels like a lot of 
> redundant and non-DRY code. I'm willing to write the code myself (or die 
> trying), but I just wanted to make sure this isn't by design.
>
> - Michael Boutros
>

On Monday, June 4, 2012 1:10:50 PM UTC-4, Michael Boutros wrote:
>
> Hello all,
>
> I'm working on a Rails app and I have resources nested three deep - let's 
> call them user, project, and issues. The route helpers now look like 
> user_project_issue_path(@user, @project, @issue). Would it make sense for 
> Rails to guess the @user <https://github.com/user> and 
> @project<https://github.com/project> relations 
> from @issue <https://github.com/issue>? It just feels like a lot of 
> redundant and non-DRY code. I'm willing to write the code myself (or die 
> trying), but I just wanted to make sure this isn't by design.
>
> - Michael Boutros
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/kAwh0oTe4qUJ.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to