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

[CarrierWave 1.0.0] user.avatar.url returned an incorrect result #2087

Closed
tumayun opened this issue Dec 27, 2016 · 3 comments
Closed

[CarrierWave 1.0.0] user.avatar.url returned an incorrect result #2087

tumayun opened this issue Dec 27, 2016 · 3 comments

Comments

@tumayun
Copy link

tumayun commented Dec 27, 2016

user.avatar.url returned an incorrect result.

1.0.0

[1] pry(#<RSpec::ExampleGroups::V1AdminAdministratorsController::GETIndex>)> CarrierWave::VERSION
=> "1.0.0"
[2] pry(#<RSpec::ExampleGroups::V1AdminAdministratorsController::GETIndex>)> user.avatar.url
=> "http://morespace-staging-public.img-cn-beijing.aliyuncs.com/pic/defaultAvatar.png"
[3] pry(#<RSpec::ExampleGroups::V1AdminAdministratorsController::GETIndex>)> user.avatar
=> #<ImageUploader:0x007ffe5aefc058
 @model=
  #<User:0x007ffe5edf6470
   id: 10,
   username: "username6",
   level: 0,
   avatar: "95d79248-4d80-4a3d-a67a-5cdcb451021f-1470388855.png",
   status: "active",
   bio: nil,
   lowercase_username: "username6",
   created_at: Tue, 27 Dec 2016 18:16:13 CST +08:00,
   updated_at: Tue, 27 Dec 2016 18:16:13 CST +08:00,
   push_id: "Xht87NwzQ19FqSYCAR5kmF9M1482833773.739795">,
 @mounted_as=:avatar,
 @storage=#<CarrierWave::Storage::Aliyun:0x007ffe5ed458f0 @uploader=#<ImageUploader:0x007ffe5aefc058 ...>>>

0.11.2

[1] pry(#<RSpec::ExampleGroups::V1AdminAdministratorsController::GETIndex>)> CarrierWave::VERSION
=> "0.11.2"
[2] pry(#<RSpec::ExampleGroups::V1AdminAdministratorsController::GETIndex>)> user.avatar.url
=> "http://morespace-dev-public.oss-cn-beijing.aliyuncs.com/morespace_test/user/avatar/95d79248-4d80-4a3d-a67a-5cdcb451021f-1470388855.png"
[3] pry(#<RSpec::ExampleGroups::V1AdminAdministratorsController::GETIndex>)> user.avatar
=> #<ImageUploader:0x007ffa9143ed68
 @file=
  #<CarrierWave::Storage::AliyunFile:0x007ffa8bcd81f0
   @base=#<CarrierWave::Storage::Aliyun:0x007ffa9142d3b0 @uploader=#<ImageUploader:0x007ffa9143ed68 ...>>,
   @path="morespace_test/user/avatar/95d79248-4d80-4a3d-a67a-5cdcb451021f-1470388855.png",
   @uploader=#<ImageUploader:0x007ffa9143ed68 ...>>,
 @model=
  #<User:0x007ffa8bbb9e18
   id: 10,
   username: "username6",
   level: 0,
   avatar: "95d79248-4d80-4a3d-a67a-5cdcb451021f-1470388855.png",
   status: "active",
   bio: nil,
   lowercase_username: "username6",
   created_at: Tue, 27 Dec 2016 18:23:01 CST +08:00,
   updated_at: Tue, 27 Dec 2016 18:23:01 CST +08:00,
   push_id: "kCSscMPi3HA5j8qqZVJjymnJ1482834181.204291">,
 @mounted_as=:avatar,
 @storage=#<CarrierWave::Storage::Aliyun:0x007ffa9142d3b0 @uploader=#<ImageUploader:0x007ffa9143ed68 ...>>,
 @versions={}>
@mshibuya
Copy link
Member

Can you paste your uploader code?

@connorshea
Copy link
Contributor

I assume this is the same/similar to #2029

@mshibuya
Copy link
Member

mshibuya commented May 1, 2019

Merging into #2029.

@mshibuya mshibuya closed this as completed May 1, 2019
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

3 participants