app: allow hiding the browser banner for one week
This commit is contained in:
parent
299f9df375
commit
3212dfddca
7 changed files with 75 additions and 11 deletions
|
@ -120,4 +120,15 @@ module ApplicationHelper
|
|||
def try_format_datetime(datetime)
|
||||
datetime.present? ? I18n.l(datetime) : ''
|
||||
end
|
||||
|
||||
def dismiss_outdated_browser_banner
|
||||
cookies[:dismissed_outdated_browser_banner] = {
|
||||
value: 'true',
|
||||
expires: 1.week.from_now
|
||||
}
|
||||
end
|
||||
|
||||
def has_dismissed_outdated_browser_banner?
|
||||
cookies[:dismissed_outdated_browser_banner] == 'true'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue