cirandas.net

ref: master

plugins/exchange/lib/exchange_plugin/image_helper.rb


1
2
3
4
5
6
7
8
9
module ExchangePlugin::ImageHelper

  # image that can be aligned, centered, and resized with aspect ratio
  def profile_link_with_image profile, size=:portrait
    link = link_to '', profile.url, :class => "inner", :style => "background-image: url(#{profile_icon profile, size})"
    content_tag 'div', link, :class => "profile-image #{size}"
  end

end