items are now done and pictures resize on serverside automagically

This commit is contained in:
Senad Uka
2015-04-12 11:11:26 +02:00
parent 8197104040
commit ea2837bd00
5 changed files with 39 additions and 15 deletions

View File

@@ -2,4 +2,13 @@ class MultiMediaDescription < ActiveRecord::Base
belongs_to :item
belongs_to :media_type
def attributes
super.merge('resized_url' => self.resized_url)
end
def resized_url
url.gsub('/upload/v','/upload/c_lpad,h_170,w_226/v')
end
end