[Rails] Re: Re: RCSS problems

Łukasz Piestrzeniewicz bragi.ragnarson at gmail.com
Sun Mar 5 15:15:36 GMT 2006


On 05/03/06, Raphael Schmid <raphael at schwarzschmid.de> wrote:
> Czezch Łukasz,
> ActionController::Routing::Routes.draw do |map|
>   map.connect '', :controller => "login"
> #  map.connect 'stylesheets/:rcss', :controller => 'rcss'
>   map.connect ':controller/service.wsdl', :action => 'wsdl'

----

>   map.connect ':controller/:action/:id'
> #  map.connect 'rcss/:rcss', :controller => 'rcss'
>   map.rcss 'rcss/:rcss', :controller => 'rcss'
> #  map.connect 'stylesheets/:rcss', :controller => 'rcss', :action =>
> 'render_rcss'

---

> As you can see, I've been playing around with the routes quite a bit,
> to no avail. Tell me if there is anything else that can be done.

I have marked important part. The line

map.connect ':controller/:action/:id'

describes the most generic route. It caches everything what has not
been caught yet. If you put another rule below this line it will not
be reached at all. My suggestion is to use following setup and try
again:

ActionController::Routing::Routes.draw do |map|
 map.connect '', :controller => "login"
 map.connect 'rcss/:rcss', :controller => 'rcss', :action => 'render_rcss'
 map.connect ':controller/service.wsdl', :action => 'wsdl'
 map.connect ':controller/:action/:id'
 map.rcss 'rcss/:rcss', :controller => 'rcss'
end

As a sidenote: in Rcss subversion repository you will find
engine-based version or Rcss. It is tested and working but it lacks
documentation. Contact me if you are interested.

--
Łukasz Piestrzeniewicz
http://ragnarson.blogspot.com


More information about the Rails mailing list