Re: View error

radhames brito
Sun, 24 Oct 2010 03:47:33 -0000

On Sat, Oct 23, 2010 at 8:04 AM, h0bit
<jsantana.gcc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Hello everybody,
>
> i''m trying to link a new view but it fails. Here is the code:
>
> in the view I have the next link
>
>  <%= link_to
I18n.t(''tog_social.groups.site.view_all_blogs''),
> blogs_group_path(@group) %>
>
> and went i clink on it i have the next error in the browser:
>
> undefined method `blogs_group_path'' for
#<ActionView::Base:0x63267d8>
>
> In the desert_routes i put the route:
>
> with_options(:controller => ''groups'') do |group|
>  group.tag_groups       ''/groups/tag/:tag'',
:action =>
> ''tag''
>  group.blogs               ''/:group_id/blogs'',
:action
> => ''blogs''
> end
>
>
> and i want to know why fail my code. Can anyone help me?
>
> Thanks and apologize me.
>
> Why do you apologize?

anyway the problem is that, it should be like this

group_blogs_path(@group)

whenever something is scoped /nested the parent goes first

--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at