test/dummy/config/initializers/attachs.rb in attachs-0.4.5 vs test/dummy/config/initializers/attachs.rb in attachs-4.0.0.0
- old
+ new
@@ -1,25 +1,11 @@
Attachs.configure do |config|
- config.global_styles = [:small, :medium, :big]
- config.global_convert_options = '-quality 75'
- config.styles = {
- small: '120x120!',
- medium: '300x250#',
- big: '1024x768',
- big_contain: '160x130',
- small_contain: '140x110',
- big_cover: '160x130#',
- small_cover: '140x110#',
- big_force: '160x130!',
- small_force: '140x110!'
- }
- config.convert_options = {
- big_contain: '-trim',
- big_cover: '-trim',
- big_force: '-trim'
- }
- config.interpolations = {
- month: lambda { |attachment| attachment.updated_at.month }
- }
+ config.convert_options = '-strip -quality 82'
+ config.region = 'us-east-1'
+ config.bucket = "attachs.#{Rails.env}"
+
+ config.add_interpolation :name do |record|
+ record.name
+ end
end