url/path generate wrong path if given a string #745

nilclass opened this Issue Feb 17, 2012 · 1 comment

2 participants



class Foo < ActiveRecord::Base
  has_attached_file :bar, :styles => { :thumb => ['100x100', :png] }

foo = Foo.create!(:bar => fixture_file_upload("my-image.jpg"))

foo.bar.url(:thumb) #=> /system/bar/1/thumb/my-image.png (CORRECT)
foo.bar.url('thumb') #=> /system/bar/1/thumb/my-image.jpg (INCORRECT)

The same happens for path()

@sikachu sikachu was assigned Feb 17, 2012
thoughtbot, inc. member

Yeah, I found out there's a bug in the #extension of the interpolation. Thanks for reporting.

@sikachu sikachu closed this in 9ad074a Feb 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment