benpickles.com - Saying stuff about stuff.

Example domain paragraphs

Phlex already works with Sinatra (and everything else) but its normal usage leaves you without access to Sinatra’s standard helper methods. That’s why I created phlex-sinatra which lets you use Sinatra’s url() helper from within Phlex (along with the rest of the usual helper methods available in a Sinatra action).

To enable the integration use the phlex method in your Sinatra action and pass an instance of the Phlex view (instead of using .call to get its output):

get '/foo' do phlex MyView . new end You can now use Sinatra’s url() helper method directly and its other methods ( params , request , etc) via the helpers proxy:

Links to benpickles.com (3)