File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -239,18 +239,18 @@ def method_missing(method_name, *args) # rubocop:disable Style/MissingRespondToM
239
239
rescue => e # rubocop:disable Style/RescueStandardError
240
240
e . set_backtrace e . backtrace . tap ( &:shift )
241
241
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 }
244
244
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 } '?
246
246
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
249
250
#{ e . message }
250
251
251
252
You may be trying to call a method provided as a view helper. Did you mean `helpers.#{ method_name } '?
252
253
MESSAGE
253
- end
254
254
255
255
raise
256
256
end
You can’t perform that action at this time.
0 commit comments