Sha256: f726b5f5301b8c041f68e86ac60dba758e2c32508f12653f451312102f0e1f99
Contents?: true
Size: 1.26 KB
Versions: 8
Compression:
Stored size: 1.26 KB
Contents
require 'dragonfly' # Configuration app = Dragonfly::App[:<%= app_name %>] app.configure_with(Dragonfly::RMagickConfiguration) app.configure do |c| c.log = Rails.logger c.datastore.configure do |d| d.root_path = "#{Rails.root}/public/system/dragonfly/#{Rails.env}" end c.url_handler.configure do |u| u.secret = '<%= random_secret %>' u.path_prefix = '/<%= path_prefix %>' end end # Extend ActiveRecord # This allows you to use e.g. # <%= accessor_prefix %>_accessor :my_attribute # in your models. ActiveRecord::Base.extend Dragonfly::ActiveRecordExtensions ActiveRecord::Base.register_dragonfly_app(:<%= accessor_prefix %>, Dragonfly::App[:<%= app_name %>]) # Add the Dragonfly App to the middleware stack ActionController::Dispatcher.middleware.insert_after ActionController::Failsafe, Dragonfly::Middleware, :<%= app_name %> # # UNCOMMENT THIS IF YOU WANT TO CACHE REQUESTS WITH Rack::Cache, and add the line # # config.gem 'rack-cache', :lib => 'rack/cache' # # to environment.rb # require 'rack/cache' # ActionController::Dispatcher.middleware.insert_before Dragonfly::Middleware, Rack::Cache, { # :verbose => true, # :metastore => "file:#{Rails.root}/tmp/dragonfly/cache/meta", # :entitystore => "file:#{Rails.root}/tmp/dragonfly/cache/body" # }
Version data entries
8 entries across 8 versions & 1 rubygems