# sinatra-iphone-views Detects an iPhone/iPod browser and renders templates in views/iphone automatically. Why is that cool? Because iPhone-enabled routes look exactly like any other route. Like so: get '/test' do haml :test end The above will render views/iphone/test.haml from an iPhone, and views/test.haml from anywhere else. Now why that is NOT cool? Because it relies on disabling template caching, and will have a performance impact that may or may not be acceptable for your application. Quite frankly, I haven't benchmarked any differences, but I'm inclined to believe it's not significant not even to a medium sized app. # Installation Make sure you got http://gemcutter.org in your gem sources. Then simply $ sudo gem install sinatra-iphone-views # Usage require 'sinatra' require 'sinatra/iphone_views' And you're off and racing. # Specs Just run $ spec spec/iphone_views_spec.rb
Project
sinatra-iphone-views
Detects an iPhone/iPod browser and renders templates in views/iphone automatically.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
Development
Project Readme