модуль ActionDispatch::Flash::RequestMethods
Публичные методы экземпляра
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 47 def flash flash = flash_hash return flash if flash self.flash = Flash::FlashHash.from_session_value(session["flash"]) end
Получить содержимое флэша. Используйте flash["notice"] для чтения уведомления, помещённого в флэш, или flash["notice"] = "hello" для добавления нового.
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 53 def flash=(flash) set_header Flash::KEY, flash end
© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.