Hallo Michael,
wenn du
<%= link_to('Link', :controller => '/project', :action => 'index') %>
schreibst, sollte es funktionieren. Vielleicht nicht schön, aber eine
andere Lösung habe ich nicht gefunden.
Viele Grüße
Gregor
2008/2/26 Michael Voigt <[EMAIL PROTECTED]>:
> Hallo,
>
> Beim anlegen von weiteren resourcen ohne prefix macht er es super.
> <%= link_to('link', images_path) %>
> http://localhost:3000/images
>
> Dies geht, aber leider kann ich nicht für alles eine neue resource anlegen.
>
> Kann ich das irgendwie mit dem routing erschlagen?
>
> Herzliche Grüße,
> Michael
>
> Am 25.02.2008 23:57 Uhr schrieb "Michael Voigt" unter
> <[EMAIL PROTECTED]>:
>
>
>
> > Hallo,
> >
> > ich habe ein kleines Problem mit link_to().
> >
> > Nehmen wir an ich habe 2 Controller einer von beiden mit prefix:
> > map.resources :websites,
> > :controller => 'admin/websites',
> > :path_prefix => '/admin',
> > :name_prefix => 'admin_'
> >
> > Und dann noch einen ganz normalen controller 'projects', der nicht im admin
> > ordner liegt.
> >
> > Ich springe nun über folgenden link auf die liste alle websites im admin:
> > <%= link_to('admin websites', admin_websites_path) %>
> > http://localhost:3000/admin/websites
> >
> > Dies rendert mir die index.html.erb, soweit alles super.
> >
> > Nun möchte ich einen Link zu project/index von der index.html.erb machen.
> > Wenn ich folgenden code in die index.html.erb haue
> >
> > <%= link_to('Link', :controller => 'project', :action => 'index') %>
> >
> > Bekomme ich:
> > http://localhost:3000/admin/project/index
> >
> > Ich möchte aber kein admin vor projects stehen haben, habe ich eine
> > Möglichkeit dies weg zubekommen?
> >
> > Herzliche Grüße,
> > Michael
> >
> > _______________________________________________
> > rubyonrails-ug mailing list
> > [email protected]
> > http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug
>
> _______________________________________________
> rubyonrails-ug mailing list
> [email protected]
> http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug
>
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug