Module: FlashHelper

Defined in:
lib/app/helpers/flash_helper.rb

Instance Method Summary collapse

Instance Method Details

#classes_for_flash(key) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/app/helpers/flash_helper.rb', line 9

def classes_for_flash(key)
  if %w[error alert].include?(key)
    'red'
  else
    'green'
  end
end

#current_userObject

todo remove me and create a custom administrator authentification



5
6
7
# File 'lib/app/helpers/flash_helper.rb', line 5

def current_user
	OpenStruct.new(email:  "[email protected]")
end