Skip to content

Instantly share code, notes, and snippets.

module App::Controllers::MobileSupport
def self.included(base)
base.send :before_filter, :redirect_to_appropriate_site
base.send :helper_method, :iphone_request?
base.send :helper_method, :touch_request?
end
def redirect_to_appropriate_site
if on_touch_site? and requesting_full_site?
#!/usr/bin/ruby
#
# I deliberately didn't DRY /usr/local references into a variable as this
# script will not "just work" if you change the destination directory. However
# please feel free to fork it and make that possible.
#
# If you do fork, please ensure you add a comment here that explains what the
# changes are intended to do and how well you tested them.
#
# 30th March 2010: