module ApplicationHelper

Public Instance Methods

avatar_url(user = current_user, size = :thumb) click to toggle source
# File app/helpers/application_helper.rb, line 15
def avatar_url(user = current_user, size = :thumb)
  if !user.avatar?
    'default_profil_picture.svg'
  else
    user.avatar.url(size)
  end
end
nice_display_of_offer_options(user = current_user) click to toggle source
# File app/helpers/application_helper.rb, line 10
def nice_display_of_offer_options(user = current_user)
  return unless user.enterprise || !user_signed_in?
  render partial: 'layouts/partials/offer_options', locals: {current_user: user}
end
nice_display_of_tag_list(offer = @offer) click to toggle source
# File app/helpers/application_helper.rb, line 23
def nice_display_of_tag_list(offer = @offer)
  return unless offer.tag_list
  render partial: 'partials/tag_list', locals: {offer: offer}
end
nice_display_of_user_options(user = current_user) click to toggle source
# File app/helpers/application_helper.rb, line 2
def nice_display_of_user_options(user = current_user)
  if user_signed_in?
    render partial: 'layouts/partials/profile_options', locals: {current_user: user}
  else
    render partial: 'layouts/partials/sign_in_up'
  end
end