module Card::Env::Serializable

These methods are all handled in serialization and are thus preserved for the integrate_with_delay phase

Attributes

main_name[R]
params[R]

Public Instance Methods

ajax() click to toggle source
# File lib/card/env/serializable.rb, line 24
def ajax
  request&.xhr? || params[:simulate_xhr]
end
Also aliased as: ajax?
ajax?()
Alias for: ajax
host() click to toggle source
# File lib/card/env/serializable.rb, line 16
def host
  request&.host
end
html() click to toggle source
# File lib/card/env/serializable.rb, line 29
def html
  !controller || params[:format].in?([nil, "html"])
end
Also aliased as: html?
html?()
Alias for: html
ip() click to toggle source
# File lib/card/env/serializable.rb, line 8
def ip
  request&.remote_ip
end
origin() click to toggle source
# File lib/card/env/serializable.rb, line 20
def origin
  Cardio.config.deck_origin || "#{protocol}#{request&.host_with_port}"
end
protocol() click to toggle source
# File lib/card/env/serializable.rb, line 12
def protocol
  request&.protocol
end