Should I _expect_ problems using a leading underscore in a sass file
name ? Cause it doesnt create the required css if I do.

I have a partial called _employee.haml which has a content_for call at
the start. I thought 'hey, why not call the sass file for this partial
the same as the haml file, so I did this

-content_for :head do
  =stylesheet_link_tag '_employee', :media=>'all'

I have the required sass file as /public/stylesheets/sass/
_employee.sass

When I try to render a page that makes use of the partial, the
appearance is wrong and I see this in the log

ActionController::RoutingError (no route found to match "/stylesheets/
_employee.css" with {:method=>:get}):
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/routing.rb:1292:in `recognize_path'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/routing.rb:1282:in `recognize'
    c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in
`dispatch'
   ....

If I create a employee.sass and change the content_for to be this

-content_for :head do
  =stylesheet_link_tag 'employee', :media=>'all'

... everything is fine.

So is the problem in sass (I dont think so, because the stack trace
shows sass never got involved). Does the method recognize_path in
routing.rb look like the culprit ?

Thanx - still very new to ruby and ror, sorry if every one but me
knows about this....

L


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to