Sha256: 33849d0af4412722d78aa67ef39f732b10b57e31846a1d7398d079c010025a7e

Contents?: true

Size: 608 Bytes

Versions: 7

Compression:

Stored size: 608 Bytes

Contents

require 'dragonfly'

# Configure
Dragonfly.app.configure do
  plugin :imagemagick

  secret "<%= generate_secret %>"

  url_format "/media/:job/:name"

  datastore :file,
    <%= hash_key(:root_path) %> Rails.root.join('public/system/dragonfly', Rails.env),
    <%= hash_key(:server_root) %> Rails.root.join('public')
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

7 entries across 7 versions & 1 rubygems

Version Path
dragonfly-1.1.0 lib/rails/generators/dragonfly/templates/initializer.rb.erb
dragonfly-1.0.12 lib/rails/generators/dragonfly/templates/initializer.rb.erb
dragonfly-1.0.11 lib/rails/generators/dragonfly/templates/initializer.rb.erb
dragonfly-1.0.10 lib/rails/generators/dragonfly/templates/initializer.rb.erb
dragonfly-1.0.9 lib/rails/generators/dragonfly/templates/initializer.rb.erb
dragonfly-1.0.8 lib/rails/generators/dragonfly/templates/initializer.rb.erb
dragonfly-1.0.7 lib/rails/generators/dragonfly/templates/initializer.rb.erb