跳至内容 跳至搜索
方法
F

实例公共方法

flash()

访问闪存的内容。返回一个 ActionDispatch::Flash::FlashHash.

有关示例用法,请参见 ActionDispatch::Flash.

# File actionpack/lib/action_dispatch/middleware/flash.rb, line 57
def flash
  flash = flash_hash
  return flash if flash
  self.flash = Flash::FlashHash.from_session_value(session["flash"])
end

flash=(flash)

# File actionpack/lib/action_dispatch/middleware/flash.rb, line 63
def flash=(flash)
  set_header Flash::KEY, flash
end