Skip to content

Instantly share code, notes, and snippets.

@parndt
Created May 30, 2011 04:53
Show Gist options
  • Select an option

  • Save parndt/998471 to your computer and use it in GitHub Desktop.

Select an option

Save parndt/998471 to your computer and use it in GitHub Desktop.

Revisions

  1. parndt created this gist May 30, 2011.
    17 changes: 17 additions & 0 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    # 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