diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 190a8b7..4c0f282 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -35,7 +35,7 @@ after_assign :resize_image end - validates_property :width, of: :logo, in: (0..160) + validates_property :height, of: :logo, in: (0..100) validates_property :format, of: :logo, in: ['jpeg', 'png', 'gif','jpg','bmp'] validates_size_of :logo, maximum: 500.kilobytes @@ -190,8 +190,8 @@ # def resize_image unless logo.nil? - if logo.height != 160 && logo.width != 160 - self.logo = logo.thumb('160x') # resize width and maintain aspect ratio + if logo.height != 100 + self.logo = logo.thumb('x100') # resize height and maintain aspect ratio end end end diff --git a/app/views/layouts/_dmponline_header.html.erb b/app/views/layouts/_dmponline_header.html.erb index b80c58b..65c5036 100644 --- a/app/views/layouts/_dmponline_header.html.erb +++ b/app/views/layouts/_dmponline_header.html.erb @@ -3,11 +3,7 @@