diff --git a/app/models/user.rb b/app/models/user.rb index 7967d3d..7f9395b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -36,7 +36,7 @@ class User < ActiveRecord::Base def self.from_omniauth(auth) where(name: auth.uid).first_or_create do |user| user.name = auth.uid - user.avatar = Identicon.data_url_for auth.uid + user.avatar = Paperclip.io_adapters.for(Identicon.data_url_for auth.uid) user.generate_key! end end diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb new file mode 100644 index 0000000..14431ce --- /dev/null +++ b/config/initializers/paperclip.rb @@ -0,0 +1 @@ +Paperclip::DataUriAdapter.register