Skip to content

Commit 3c74fd8

Browse files
committed
revert "fix: linting errors"
1 parent bc0de0d commit 3c74fd8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/view_component/base.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,18 @@ def method_missing(method_name, *args) # rubocop:disable Style/MissingRespondToM
239239
rescue => e # rubocop:disable Style/RescueStandardError
240240
e.set_backtrace e.backtrace.tap(&:shift)
241241
if ViewComponent::Base.strict_helpers_enabled
242-
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))
243-
#{e.message}
242+
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))
243+
#{e.message}
244244
245-
You may be trying to call a method provided as a view helper. To use it try decalring it using use_helpers :#{method_name}'?
245+
You may be trying to call a method provided as a view helper. To use it try decalring it using use_helpers :#{method_name}'?
246246
MESSAGE
247-
else
248-
raise e, <<~MESSAGE.chomp if view_context && e.is_a?(NameError) && helpers.respond_to?(method_name)
247+
elsif view_context && e.is_a?(NameError) && helpers.respond_to?(method_name)
248+
raise e, <<~MESSAGE.chomp
249+
end
249250
#{e.message}
250251
251252
You may be trying to call a method provided as a view helper. Did you mean `helpers.#{method_name}'?
252253
MESSAGE
253-
end
254254

255255
raise
256256
end

0 commit comments

Comments
 (0)