Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method url_path_prefix using dragonfly master #58

Closed
slbug opened this issue Mar 26, 2011 · 5 comments
Closed

undefined method url_path_prefix using dragonfly master #58

slbug opened this issue Mar 26, 2011 · 5 comments

Comments

@slbug
Copy link

slbug commented Mar 26, 2011

Seems like it was removed, but i cant find way to configure prefix and suffix now.

@markevans
Copy link
Owner

it was indeed, but I haven't got round to adding in deprecation warnings etc.
it's not been released as a gem so don't expect master to necessary be 100% stable - it's better to use a gem version.
The new way is in the configure block:
c.url_format = '/media/:job/:basename.:format'
etc.

@slbug
Copy link
Author

slbug commented Mar 26, 2011

thanks for response. i've tried it

initializer:

require 'dragonfly'

app = Dragonfly[:images]
app.configure_with(:imagemagick)
app.configure_with(:rails)
app.define_macro(ActiveRecord::Base, :image_accessor)

app.configure do |c|
  c.url_format = "/images/:job/:basename.:format"
end

but nothing changed. it's still /media/:job

@markevans
Copy link
Owner

you also need to have the name available, so give the model a xxxxx_name column (string), where xxxxxx is the image attribute

@slbug
Copy link
Author

slbug commented Mar 27, 2011

Thanks. It's helped with basename and format, but prefix still /media/ instead of /images/

@markevans
Copy link
Owner

try c.server.url_format = '....
I need to fix the way the config works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants