Module: Zena::Use::Urls::ViewAndControllerMethods
- Included in:
- ControllerMethods, ViewMethods
- Defined in:
- lib/zena/use/urls.rb
Overview
Common
Instance Method Summary collapse
Instance Method Details
#host_with_port ⇒ Object
280 281 282 283 284 285 286 287 288 289 |
# File 'lib/zena/use/urls.rb', line 280 def host_with_port @host_with_port ||= begin port = request.port if port.blank? || port.to_s == '80' || port.to_s == '443' current_site.host else "#{current_site.host}:#{port}" end end end |
#http_protocol ⇒ Object
291 292 293 294 295 296 297 298 299 |
# File 'lib/zena/use/urls.rb', line 291 def http_protocol @http_protocol ||= begin if request.protocol =~ /^(.*):\/\/$/ $1 else 'http' end end end |