Class ApplicationController
In: app/controllers/application.rb
Parent: ActionController::Base

Filters added to this controller apply to all controllers in the application. Likewise, all the methods added will be available for all controllers.

Methods

Public Instance methods

Request from an iPhone or iPod touch? (Mobile Safari user agent)

[Source]

    # File app/controllers/application.rb, line 25
25:   def iphone_user_agent?
26:     request.env["HTTP_USER_AGENT"] && request.env["HTTP_USER_AGENT"][/(Mobile\/.+Safari)/]
27:   end

before_filter :iphone_login_required

[Source]

    # File app/controllers/application.rb, line 20
20:   def rjs
21:        response.headers['content-type'] = 'text/html'
22:   end

[Validate]