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

Calling request.request_uri from a layout or template returns blank. #112

Closed agarzola closed 10 years ago

agarzola commented 10 years ago

Hi. I’d like to add an .active class to appropriate menu items depending on where they are. For this, I’d like to query the request.request_uri variable to see which page my menu partial is being called from, but this currently returns an empty string.

agarzola commented 10 years ago

I just realized I should really be using request.path. This too returns an empty string.

agarzola commented 10 years ago

Never mind! My conditional was wrong.