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

Bug revise of monkey patch without Rails gem #130

Closed
wants to merge 1 commit into from
Closed

Bug revise of monkey patch without Rails gem #130

wants to merge 1 commit into from

Conversation

kaidotdev
Copy link

such as rails-html-sanitizer gem uses Rails constant without rails gem
ref. https://github.com/rails/rails-html-sanitizer/blob/master/lib/rails/html/sanitizer.rb#L1

@jcarres-mdsol
Copy link
Collaborator

Good.
I think you need to:

  • Create something like:
def running_inside_rails?
   defined?(Rails) && defined?(Rails.application)
end
  • Use that method in the two lines you have modified
  • Pass the tests
  • Update minor version and changelog

@jcarres-mdsol
Copy link
Collaborator

I'm closing this, we are going to revisit this section of the code soon

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

Successfully merging this pull request may close these issues.

2 participants