Module: MorseControllerHelpers::FlashHelpers

Included in:
MorseControllerHelpers
Defined in:
lib/morse_controller_helpers/flash_helpers.rb

Overview

module FlashHelpers

Instance Method Summary collapse

Instance Method Details

#flash_404_errorObject



28
29
30
# File 'lib/morse_controller_helpers/flash_helpers.rb', line 28

def flash_404_error
  flash[:error] = 'Unable to locate record.'
end

#flash_create_noObject



8
9
10
# File 'lib/morse_controller_helpers/flash_helpers.rb', line 8

def flash_create_no
  flash[:warning] = 'Failed to create, please check the form for errors.'
end

#flash_create_yesObject



4
5
6
# File 'lib/morse_controller_helpers/flash_helpers.rb', line 4

def flash_create_yes
  flash[:success] = "#{klass_humanized} succesfully created."
end

#flash_destroy_noObject



16
17
18
# File 'lib/morse_controller_helpers/flash_helpers.rb', line 16

def flash_destroy_no
  flash[:warning] = "#{klass_humanized} failed to delete."
end

#flash_destroy_yesObject



12
13
14
# File 'lib/morse_controller_helpers/flash_helpers.rb', line 12

def flash_destroy_yes
  flash[:notice] = "#{klass_humanized} succesfully deleted."
end

#flash_update_noObject



24
25
26
# File 'lib/morse_controller_helpers/flash_helpers.rb', line 24

def flash_update_no
  flash[:warning] = 'Failed to update, please check the form for errors.'
end

#flash_update_yesObject



20
21
22
# File 'lib/morse_controller_helpers/flash_helpers.rb', line 20

def flash_update_yes
  flash[:notice] = "#{klass_humanized} succesfully updated."
end