Skip to content

Commit

Permalink
Search for the Rails module in the root namespace (#1894)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeneixe committed Nov 3, 2023
1 parent 9d1ecad commit f9be01a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Expand Up @@ -10,6 +10,10 @@ nav_order: 5

## main

* Fix bug where the `Rails` module wasn't being searched from the root namespace.

*Zenéixe*

* Fix bug where `#with_request_url`, set the incorrect `request.fullpath`.

*Nachiket Pusalkar*
Expand Down
2 changes: 1 addition & 1 deletion lib/view_component/base.rb
Expand Up @@ -219,7 +219,7 @@ def helpers
@__vc_helpers ||= __vc_original_view_context || controller.view_context
end

if Rails.env.development? || Rails.env.test?
if ::Rails.env.development? || ::Rails.env.test?
def method_missing(method_name, *args) # rubocop:disable Style/MissingRespondToMissing
super
rescue => e # rubocop:disable Style/RescueStandardError
Expand Down

0 comments on commit f9be01a

Please sign in to comment.