Skip to content
New issue

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

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

Already on GitHub? # to your account

Regression in carrierwave 1.3.0: NameError #2363

Closed
jaredbeck opened this issue Dec 28, 2018 · 1 comment
Closed

Regression in carrierwave 1.3.0: NameError #2363

jaredbeck opened this issue Dec 28, 2018 · 1 comment

Comments

@jaredbeck
Copy link
Contributor

The following works in 1.2.3, and raises a NameError in 1.3.0:

# app/models/redacted.rb
class Redacted
  mount_uploader :cw_redacted_file, ::RedactedUploader
end

# app/views/admin/redacted/index.html.haml, lines 85-86
- unless redacted.cw_redacted_file.file.nil? # line 85
  = link_to 'Redacted', redacted.cw_redacted_file.url # line 86
NameError in Admin::Redacted#index
Showing app/views/admin/redacted/index.html.haml 
where line #86 raised:
undefined method `url' for class `NilClass'
Did you mean?  URI

Why would cw_redacted_file work on line 85 and then not work on line 86? Weird.

@mshibuya
Copy link
Member

Sounds like duplicate of #2361, try with the latest 1.3.1 release.

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

No branches or pull requests

2 participants