Skip to content

Instantly share code, notes, and snippets.

@parndt
Created May 30, 2011 04:53
Show Gist options
  • Save parndt/998471 to your computer and use it in GitHub Desktop.
Save parndt/998471 to your computer and use it in GitHub Desktop.
config/application.rb hooks for Dragonfly in Refinery CMS
# Place this in the config block on config/application.rb of your Rails application.
# Override where dragonfly keeps your images and its url format
config.to_prepare do
::Dragonfly[:images].configure do |c|
c.datastore.root_path = Rails.root.join('public', 'assets', 'images').to_s
c.url_format = '/assets/images/:job/:basename.:format'
end
end
# Override where dragonfly keeps your files and its url format
config.to_prepare do
::Dragonfly[:resources].configure do |c|
c.datastore.root_path = Rails.root.join('public', 'assets', 'resources').to_s
c.url_format = '/assets/resources/:job/:basename.:format'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment