Class: TDiary::Request
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- TDiary::Request
- Includes:
- RequestExtension
- Defined in:
- lib/tdiary/request.rb
Instance Method Summary collapse
-
#cgi_compat ⇒ Object
the @cgi object handed to plugins: a facade over this request.
Methods included from RequestExtension
Instance Method Details
#cgi_compat ⇒ Object
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 |