diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index 9115885..e6b2a0a 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -36,22 +36,13 @@ class AvatarUploader < CarrierWave::Uploader::Base # Create different versions of your uploaded files: version :large do process :resize_to_limit => [800, 800] - - - version :thumb do - process :resize_to_limit => [300, 300] - - - - - end - - - - - - end + + end + version :square do + process :resize_to_fill => [300, 300] + end + # Add a white list of extensions which are allowed to be uploaded. diff --git a/app/views/admin/admins/_form.html.haml b/app/views/admin/admins/_form.html.haml index aee3327..e03a3e0 100644 --- a/app/views/admin/admins/_form.html.haml +++ b/app/views/admin/admins/_form.html.haml @@ -34,7 +34,7 @@ %td.label= f.label :file,"image :" %td = f.file_field :file - =image_tag(f.object.file.large.thumb.url) if f.object.file + =image_tag(f.object.file.square.url) if f.object.file .actions diff --git a/app/views/notes/_note.haml b/app/views/notes/_note.haml index 2e4a9bd..93cd4e7 100644 --- a/app/views/notes/_note.haml +++ b/app/views/notes/_note.haml @@ -4,7 +4,7 @@ .left .user - =image_tag (note.admin.file? ? note.admin.file.large.thumb.url : ""), :class => "avatar" + =image_tag (note.admin.file? ? note.admin.file.square.url : ""), :class => "avatar" =note.admin.username .date=l note.created_at, :format => :short diff --git a/config/environments/production.rb b/config/environments/production.rb index c6f0ff5..ff167a9 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -15,10 +15,10 @@ Survey::Application.configure do config.serve_static_assets = false # Compress JavaScripts and CSS - config.assets.compress = true + config.assets.compress = false # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false + config.assets.compile = true # Generate digests for assets URLs config.assets.digest = true