Sha256: 9fd18c810f46e71ed76fded9f32c978efbb702d80d78a1ac1be577fa6a7fd776

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

module <%= user_plural_class_name %>Helper
  def current_user
    @current_user
  end

  def profile_pic(user, size = "normal")
    output = ""
    case size
    when "normal" then
      output << image_tag("http://learninglab.sdabocconi.it/invader.php?seed=#{user.id}", :class => 'fb_profile_pic_rendered')
    when "small" then
      output << image_tag("http://learninglab.sdabocconi.it/invader.php?seed=#{user.id}&s=small", :class => 'fb_profile_pic_rendered')
    when "big" then
      output << image_tag("http://learninglab.sdabocconi.it/invader.php?seed=#{user.id}&s=big", :class => 'fb_profile_pic_rendered')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mondo-generators-0.2.0 rails_generators/mondo_authentication/templates/users_helper.rb