Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Just because Rails is defined does not mean Rails.env is #1739

Closed
betesh opened this issue Dec 23, 2014 · 1 comment
Closed

Just because Rails is defined does not mean Rails.env is #1739

betesh opened this issue Dec 23, 2014 · 1 comment
Assignees

Comments

@betesh
Copy link
Contributor

betesh commented Dec 23, 2014

Bug on https://github.com/thoughtbot/paperclip/blob/v4.2.1/lib/paperclip/storage/s3.rb#L291

See rails/rails-html-sanitizer#25 and rails/rails-html-sanitizer#26

jyurek pushed a commit that referenced this issue Jan 5, 2015
jyurek pushed a commit that referenced this issue Jan 6, 2015
As referenced in #1739

Just because the `Rails` constant is defined, it doesn't mean we're
actually in a Rails app. Since there are people who use Paperclip
outside of Rails, and there's no reason we shouldn't be able to run in
those situations. This commit checks for `Rails.env` instead of just
checking for `Rails` and assuming `Rails.env` works.
jyurek pushed a commit that referenced this issue Jan 6, 2015
As referenced in #1739

Just because the `Rails` constant is defined, it doesn't mean we're
actually in a Rails app. Since there are people who use Paperclip
outside of Rails, and there's no reason we shouldn't be able to run in
those situations. This commit checks for `Rails.env` instead of just
checking for `Rails` and assuming `Rails.env` works.
jyurek pushed a commit that referenced this issue Jan 6, 2015
As referenced in #1739

Just because the `Rails` constant is defined, it doesn't mean we're
actually in a Rails app. Since there are people who use Paperclip
outside of Rails, and there's no reason we shouldn't be able to run in
those situations. This commit checks for `Rails.env` instead of just
checking for `Rails` and assuming `Rails.env` works.
@jyurek
Copy link

jyurek commented Jan 6, 2015

Merged a fix for this. Thanks for the report!

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

No branches or pull requests

3 participants