Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slim view helpers and layouts #38

Open
gustin opened this issue Jun 29, 2011 · 3 comments
Open

Slim view helpers and layouts #38

gustin opened this issue Jun 29, 2011 · 3 comments

Comments

@gustin
Copy link

gustin commented Jun 29, 2011

Thanks for the work on serve, it is helping us prototype apps.

We are using Slim templates and seem to be having some problems.

The default view helpers don't seem to work, it appears the helpers are parsed before slim is parsed so slim interrupts them and adds quotes around the tags.

If we have a layout that is in slim and yield to a slim file it won't compile the yielded file correctly. If the layout is in erb and we yield to a slim file it works though.

Any ideas?

thanks,
gustin

@jlong
Copy link
Owner

jlong commented Jun 29, 2011

Slim support is fairly new, so there are probably some issues with it. I'll need to look into this.

One thing, you might try this with the prerelease version of Serve:

gem install --pre serve

I have reworked a couple of things which may impact the issues that you are struggling with. No guarantees, but it might be a little better.

Thanks for reporting this.

@rmanalan
Copy link

Just to add to that, the Slim support doesn't currently handle capture blocks like so:

= content_for :title do 
  | Crazy Bat Ape

You'll get an error like this:

Capture not supported for `slim' template (Slim::Template)

@ntalbott
Copy link
Contributor

ntalbott commented Apr 6, 2012

@gustin, was your issue with slim resolved?

@manalang, that's true, capture is currently only supported for erb templates. You might be able to use the new pipelining to do the capturing in erb before passing to the slim engine, or we'd accept a Pull Request to add direct support for capturing in slim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants