Sha256: b83df1a1aae2be18b42975d2e36a345b2fb24a1c2f60bc72bebd9b364d461bb9
Contents?: true
Size: 309 Bytes
Versions: 1
Compression:
Stored size: 309 Bytes
Contents
module ApplicationHelper def signed_in? session[:user_id] ? true : false end def current_user return nil unless session[:user_id] User.find(session[:user_id]) rescue nil end def active_nav(name) @active_nav ||= :home @active_nav == name ? 'active red inverted' : '' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
distribot-ui-0.1.0 | app/helpers/application_helper.rb |