The init.rb file can reference the Rails::Configuration object directly
and add after_initialize blocks. That would be the way to do it:
config.after_initialize { Sass::Plugin.update_stylesheets }
Cheers,
Sean
Nathan Weizenbaum wrote:
> This does indeed work. However, there seems to be no way to add it there
> automatically. If we add it when the plugin loads, then the stylesheets
> are created before any Sass configuration is loaded, which causes lots
> of headaches.
>
> - Nathan
>
> Daniel Guettler wrote:
>
>> Maybe I'm missing something but adding:
>>
>> Sass::Plugin.update_stylesheets
>>
>> in any of the /config/initializers/*.rb files generates the css files
>> when I startup my application.
>> Daniel
>>
>> On Dec 11 2007, 3:59 pm, "Mislav Marohnić" <[EMAIL PROTECTED]>
>> wrote:
>>
>>
>>> On Dec 11, 2007 8:19 PM, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
>>>
>>>
>>>> The problem is the whole thing happens with the call to
>>>> Rails::Initializer.run in environment.rb. Plugin config comes after that
>>>> call, and thus after the call to after_initialize. Worse, the plugins
>>>> themselves are loaded /during/ the call, so we can't even make people
>>>> put their config somewhere else in the file.
>>>>
>>>>
>>> I guess I'm still sticking to my recipes.
>>>
>>>
>>
>>
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---