Adorable Avatars
Easily add random persisted avatars to users (and not only) in your rails application. This gem is only a simple wrapper for adorable avatars api.
Install
Add this to Gemfile:
gem 'adorable_avatars'
and run bundle install
Usage
In view simply add:
<%= adorable_avatar user.email %>
By default the size is 150px. If you want to specify size of the avatar, provide method with size option:
<%= adorable_avatar user.email, size: 50 %>
You can also set default size in an initializer
AdorableAvatars.setup do |config|
config.default_size = 200
end
| Note: Size can range from 40px to 285px
Adorable avatars create simple wrapper around image_tag, so you can use all options that image_tag accepts
<%= adorable_avatar user.email, size: 50, alt: 'Adorable avatar' %>