Sha256: e505bf6687e187669e3c2411590a244cb67486cf127930fccba3e936fc587589

Contents?: true

Size: 635 Bytes

Versions: 4

Compression:

Stored size: 635 Bytes

Contents

class Property
  class Photo < RGallery::Photo
    def path
      File.join folder, super
    end

    # mogrify -path fullpathto/temp2 -resize 60x60% -quality 60 -format jpg *.png

    # this will take all png files in your current directory (temp), 
    # resize to 60% (of largest dimension and keep aspect ratio), 
    # set jpg quality to 60 and convert to jpg.
    def thumb
      File.join folder, 'thumbs', file_path
    end

    def folder
      'responsive-gallery/images'
    end

    def title
      'property title'
    end

    def alt
      'property alt'
    end
    
    def self.extension
      :jpg
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails-gallery-0.3.3 spec/rgallery/property_photo.rb
rails-gallery-0.3.2 spec/rgallery/property_photo.rb
rails-gallery-0.3.1 spec/rgallery/property_photo.rb
rails-gallery-0.3.0 spec/rgallery/property_photo.rb