Sha256: 456cabe9a91d9da427e55079901e3adf8e98057860a6ff5e15c6fac3679be2e4
Contents?: true
Size: 1.11 KB
Versions: 33
Compression:
Stored size: 1.11 KB
Contents
module Softwear module Auth module Helper def profile_picture_of(user = nil, options = {}) options[:class] ||= '' options[:class] += ' media-object img-rounded profile-pic img img-responsive' options[:alt] ||= "#{user.try(:full_name) || '(Unknown)'}'s Avatar" options[:title] ||= user.try(:full_name) || 'Someone' image_tag user.try(:profile_picture_url) || 'avatar/masarie.jpg', options end def auth_server_error_banner return unless Softwear::Auth::Model.auth_server_down? content_tag :div, class: 'alert alert-danger' do content_tag :strong do (Softwear::Auth::Model.auth_server_went_down_at || Time.now).strftime( "WARNING: The authentication server is unreachable as of %I:%M%p. "\ "Some site features might not function properly." ) end end end end module EmailsHelper def backtrace_is_from_app?(line) !(line.include?('/gems/') || /^kernel\// =~ line || line.include?('/vendor_ruby/')) end extend self end end end
Version data entries
33 entries across 33 versions & 1 rubygems