hi there,
I'm trying to get partials with locals working. but somehow I am too
stupid to implement it...
i followed the exact instructions on the staticmatic-website:
this in my current file:
= partial('mypartial', :locals => { :title => 'My Title' })
than this under partials/mypartial.haml:
%h1 title
=> this always prints out "title" (and not "My Title")
i even tried:
%h1= title or %h1= @title, which seems to make more sense to me, but
still no luck.
After trying your scenario, I found that there seems to be a problem with staticmatic 0.9.4, haml 2.0.0, and using partials. Try this: $ sudo gem uninstall staticmatic $ sudo gem install -v0.9.3 staticmatic $ sudo gem install -v1.8.2 haml $ sudo gem uninstall -v2.0.0 haml
This will leave you with staticmatic 0.9.3 and haml 1.8.2, which should allow your scenario to work:
I haven't yet investigated why the conflict between staticmatic 0.9.4 and haml 2.0.0 exists, even though staticmatic 0.9.4 is dependent on haml >= 2.0.0.
On Sat, Jun 21, 2008 at 8:43 AM, liku <lfan...@gmail.com> wrote:
> hi there, > I'm trying to get partials with locals working. but somehow I am too > stupid to implement it... > i followed the exact instructions on the staticmatic-website:
> this in my current file: > = partial('mypartial', :locals => { :title => 'My Title' })
> than this under partials/mypartial.haml: > %h1 title
> => this always prints out "title" (and not "My Title")
> i even tried:
> %h1= title or %h1= @title, which seems to make more sense to me, but > still no luck.
> I haven't yet investigated why the conflict between staticmatic > 0.9.4 and haml 2.0.0 exists, even though staticmatic 0.9.4 is > dependent on haml >=2.0.0.
> -Ryan
> On Sat, Jun 21, 2008 at 8:43 AM, liku <lfan...@gmail.com> wrote:
> hi there, > I'm trying to get partials with locals working. but somehow I am too > stupid to implement it... > i followed the exact instructions on the staticmatic-website:
> this in my current file: > = partial('mypartial', :locals => { :title => 'My Title' })
> than this under partials/mypartial.haml: > %h1 title
> => this always prints out "title" (and not "My Title")
> i even tried:
> %h1= title or %h1= @title, which seems to make more sense to me, but > still no luck.
Stephen, Just ignore that warning for now. I think that's caused by that version of staticmatic using a deprecated feature of Haml. It doesn't affect anything.
On Sat, Jun 21, 2008 at 10:41 AM, Stephen Lumenta <lfan...@gmail.com> wrote: > thanks for checking it out, it works now. > I get a new error though, which might clarify my previous problems.
> DEPRECATION WARNING: > The Haml :locals option is deprecated and will be removed in version 2.0. > Use the locals option for Haml::Engine#render instead.
> thanks!
> Am 21.06.2008 um 16:04 schrieb Ryan McGeary:
> After trying your scenario, I found that there seems to be a problem with > staticmatic 0.9.4, haml 2.0.0, and using partials. Try this: > $ sudo gem uninstall staticmatic > $ sudo gem install -v0.9.3 staticmatic > $ sudo gem install -v1.8.2 haml > $ sudo gem uninstall -v2.0.0 haml
> This will leave you with staticmatic 0.9.3 and haml 1.8.2, which should > allow your scenario to work:
> I haven't yet investigated why the conflict between staticmatic 0.9.4 and > haml 2.0.0 exists, even though staticmatic 0.9.4 is dependent on haml >= > 2.0.0.
> -Ryan
> On Sat, Jun 21, 2008 at 8:43 AM, liku <lfan...@gmail.com> wrote:
>> hi there, >> I'm trying to get partials with locals working. but somehow I am too >> stupid to implement it... >> i followed the exact instructions on the staticmatic-website:
>> this in my current file: >> = partial('mypartial', :locals => { :title => 'My Title' })
>> than this under partials/mypartial.haml: >> %h1 title
>> => this always prints out "title" (and not "My Title")
>> i even tried:
>> %h1= title or %h1= @title, which seems to make more sense to me, but >> still no luck.
> Stephen, > Just ignore that warning for now. I think that's caused by that version of > staticmatic using a deprecated feature of Haml. It doesn't affect anything.
> -Ryan
> On Sat, Jun 21, 2008 at 10:41 AM, Stephen Lumenta <lfan...@gmail.com> > wrote:
>> thanks for checking it out, it works now. >> I get a new error though, which might clarify my previous problems.
>> DEPRECATION WARNING: >> The Haml :locals option is deprecated and will be removed in version 2.0. >> Use the locals option for Haml::Engine#render instead.
>> thanks!
>> Am 21.06.2008 um 16:04 schrieb Ryan McGeary:
>> After trying your scenario, I found that there seems to be a problem with >> staticmatic 0.9.4, haml 2.0.0, and using partials. Try this: >> $ sudo gem uninstall staticmatic >> $ sudo gem install -v0.9.3 staticmatic >> $ sudo gem install -v1.8.2 haml >> $ sudo gem uninstall -v2.0.0 haml
>> This will leave you with staticmatic 0.9.3 and haml 1.8.2, which should >> allow your scenario to work:
>> I haven't yet investigated why the conflict between staticmatic 0.9.4 and >> haml 2.0.0 exists, even though staticmatic 0.9.4 is dependent on haml >= >> 2.0.0.
>> -Ryan
>> On Sat, Jun 21, 2008 at 8:43 AM, liku <lfan...@gmail.com> wrote:
>>> hi there, >>> I'm trying to get partials with locals working. but somehow I am too >>> stupid to implement it... >>> i followed the exact instructions on the staticmatic-website:
>>> this in my current file: >>> = partial('mypartial', :locals => { :title => 'My Title' })
>>> than this under partials/mypartial.haml: >>> %h1 title
>>> => this always prints out "title" (and not "My Title")
>>> i even tried:
>>> %h1= title or %h1= @title, which seems to make more sense to me, but >>> still no luck.