Skip to content

Commit

Permalink
revert "fix: linting errors"
Browse files Browse the repository at this point in the history
  • Loading branch information
reeganviljoen committed Feb 12, 2024
1 parent bc0de0d commit 3c74fd8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,18 @@ def method_missing(method_name, *args) # rubocop:disable Style/MissingRespondToM
rescue => e # rubocop:disable Style/RescueStandardError
e.set_backtrace e.backtrace.tap(&:shift)
if ViewComponent::Base.strict_helpers_enabled
raise e, <<~MESSAGE.chomp if view_context && e.is_a?(NameError) && (__vc_original_view_context.respond_to?(method_name)|| controller.view_context.respond_to?(method_name))
#{e.message}
raise e, <<~MESSAGE.chomp if view_context && e.is_a?(NameError) && (__vc_original_view_context.respond_to?(method_name) || controller.view_context.respond_to?(method_name))
#{e.message}
You may be trying to call a method provided as a view helper. To use it try decalring it using use_helpers :#{method_name}'?
You may be trying to call a method provided as a view helper. To use it try decalring it using use_helpers :#{method_name}'?
MESSAGE
else
raise e, <<~MESSAGE.chomp if view_context && e.is_a?(NameError) && helpers.respond_to?(method_name)
elsif view_context && e.is_a?(NameError) && helpers.respond_to?(method_name)
raise e, <<~MESSAGE.chomp
end
#{e.message}
You may be trying to call a method provided as a view helper. Did you mean `helpers.#{method_name}'?
MESSAGE
end

raise
end
Expand Down

0 comments on commit 3c74fd8

Please sign in to comment.