lib/attachment_magick.rb in attachment_magick-0.2.0 vs lib/attachment_magick.rb in attachment_magick-0.2.1

- old
+ new

@@ -65,11 +65,14 @@ end def grid_methods self.attachment_magick_default_options[:styles].each do |key, value| self.send :define_singleton_method, "style_#{key.to_s}" do + value[:width] = value[:width] == 0 ? nil : value[:width] + value[:height] = value[:height] == 0 ? nil : value[:height] + metric = "#{value[:width]}x#{value[:height]}" - metric = "#{metric}#" if value[:height] && value[:crop] == true + metric = "#{metric}#{value[:ajust]}" if value[:ajust] return metric end end end \ No newline at end of file