Module: FrenchToast::Helper

Defined in:
app/helpers/french_toast/helper.rb

Instance Method Summary collapse

Instance Method Details

#french_toastObject



3
4
5
# File 'app/helpers/french_toast/helper.rb', line 3

def french_toast
  render "application/french_toast_template"
end

#french_toast_contentObject



18
19
20
# File 'app/helpers/french_toast/helper.rb', line 18

def french_toast_content
  french_toast_notification.data
end

#french_toast_content?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/helpers/french_toast/helper.rb', line 14

def french_toast_content?
  french_toast_notification.data?
end

#french_toast_notificationObject



7
8
9
10
11
12
# File 'app/helpers/french_toast/helper.rb', line 7

def french_toast_notification
  @french_toast_notification ||=
    FrenchToast::LastNotification.find_or_create_by(
      session: cookies[:key],
    ).tap(&:destroy)
end