asciinema.org/app/helpers/application_helper.rb
2012-03-03 08:52:10 +01:00

19 lines
352 B
Ruby

module ApplicationHelper
def twitter_auth_path
"/auth/twitter"
end
def github_auth_path
"/auth/github"
end
def default_avatar_url
image_path "default_avatar.png"
end
def avatar_img(user)
image_tag user.avatar_url || default_avatar_url,
:title => user.nickname, :alt => user.nickname, :class => "avatar"
end
end