Google Groups Home
Help | Sign in
Message from discussion locals and partials
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Ryan McGeary  
View profile
 More options 21 Jun, 19:15
From: "Ryan McGeary" <ryan.mcge...@gmail.com>
Date: Sat, 21 Jun 2008 14:15:46 -0400
Local: Sat 21 Jun 2008 19:15
Subject: Re: locals and partials

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:

> some_page.haml:
> = partial("mypartial", :locals => { :title => "My Title" })

> mypartial.haml:
> %h1= title

> 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.

>> haml (2.0.0)
>> staticmatic (0.9.4)

>> any pointers???

>> thanks a bunch!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google