app/models/c80_catoffers/ophoto.rb in c80_catoffers-0.1.0.2 vs app/models/c80_catoffers/ophoto.rb in c80_catoffers-0.1.0.3

- old
+ new

@@ -1,8 +1,18 @@ module C80Catoffers class Ophoto < ActiveRecord::Base belongs_to :offer mount_uploader :image, OphotoUploader + + # выдать картинку указанного размера + def image_thumb(thumb_size) + res = '' + if image.present? + res = image.send("#{thumb_size}") + end + end + + end -end \ No newline at end of file +end