jlong / serve

Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps). Serve is meant to be a lightweight version of the Views part of the Rails MVC. This makes Serve an ideal framework for prototyping Rails applications or creating simple websites. Serve has full support for Rails-style partials and layouts.
http://get-serve.com
Other
836 stars 90 forks source link

partial in layout (erb) #60

Closed ghost closed 11 years ago

ghost commented 12 years ago

When i write in view: <%= render :partial => 'content', :layout => '/layouts/_default_en' %> _content.html.erb is compiled, but /ayouts/_default_en.html.erb not. What do i do wrong?

Also I ask question there: http://stackoverflow.com/questions/8248779/how-to-create-1-view-for-2-layouts-in-erb Sorry for my english. =(

jlong commented 12 years ago

Serve doesn't support the layout flag on render for views. Maybe you can just render different partials?

ghost commented 12 years ago

I want to compile two pages: index.htm (only content) and index.html (content in template). It need me for static ajax. Index.html need if javascript disabled. I don't know how it realized without "partial in layout".

ntalbott commented 12 years ago

Were you able to get this working?