Sha256: bbb72780f77ab4fcd43c02fe9fa91c619d8251d588cb5974ac807870008de8b2

Contents?: true

Size: 746 Bytes

Versions: 3

Compression:

Stored size: 746 Bytes

Contents

require 'dragonfly'

# Configure
Dragonfly.app.configure do
  plugin :imagemagick

  protect_from_dos_attacks true
  secret "7fb765cbc9f1d92d5d1a56a43193d34d4f9b54dced3e62cb4e42f25d2500dd0f"

  convert_command  = `which convert`.strip.presence || "/usr/local/bin/convert"
  identify_command = `which identify`.strip.presence || "/usr/local/bin/identify"

  url_format '/uploads/assets/:job/:basename.:format'

  datastore Smithy::Asset.dragonfly_datastore
end

# Logger
Dragonfly.logger = Rails.logger

# Mount as middleware
Rails.application.middleware.use Dragonfly::Middleware

# Add model functionality
if defined?(ActiveRecord::Base)
  ActiveRecord::Base.extend Dragonfly::Model
  ActiveRecord::Base.extend Dragonfly::Model::Validations
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
smithycms-0.4.2 config/initializers/dragonfly.rb
smithycms-0.4.1 config/initializers/dragonfly.rb
smithycms-0.4.0 config/initializers/dragonfly.rb