Class: TDiary::Request

Inherits:
Rack::Request
  • Object
show all
Includes:
RequestExtension
Defined in:
lib/tdiary/request.rb

Instance Method Summary collapse

Methods included from RequestExtension

#mobile_agent?, #smartphone?

Instance Method Details

#cgi_compatObject

the @cgi object handed to plugins: a facade over this request. Endpoints behind a web server (CGI/FCGI) set tdiary.static_assets in the env to get the base CGICompat, so @cgi.is_a?(RackCGI) is false and plugins keep the static js/theme URLs served by the web server.



10
11
12
13
14
15
16
17
# File 'lib/tdiary/request.rb', line 10

def cgi_compat
	@cgi_compat ||=
		if env['tdiary.static_assets']
			TDiary::CGICompat.new( self )
		else
			::RackCGI.new( self )
		end
end