Skip to content

Commit 42b7bcb

Browse files
committed
Highlight redirect_back_or_to
Resolves: tpope#589
1 parent b6af730 commit 42b7bcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

after/syntax/ruby/rails.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ if s:path =~# '/app/controllers/.*\.rb$'
9494
syn match rubyMacro '\v<%(protect_from_forgery|skip_forgery_protection|http_basic_authenticate_with)>[!?:]@!'
9595
syn match rubyMacro '\v<respond_to>\ze[( ] *[:*]'
9696
syn match rubyResponse '\v<respond_to>\ze +%([&{]|do>)'
97-
syn match rubyResponse '\v<%(render|head|redirect_to|redirect_back|respond_with|send_data|send_file)>[!?:]@!'
97+
syn match rubyResponse '\v<%(render|head|redirect_to|redirect_back|redirect_back_or_to|respond_with|send_data|send_file)>[!?:]@!'
9898
syn match rubyResponse '\v<%(authenticate_or_request_with_http_basic|authenticate_with_http_basic|http_basic_authenticate_or_request_with|request_http_basic_authentication)>[!?:]@!'
9999
endif
100100

101101
let b:rails_path = s:path
102102
if s:path =~# '/app/controllers/.*\.rb$\|/app/mailers/.*\.rb$\|/app/models/.*_mailer\.rb$'
103103
syn match rubyHelper '\v<%(render_to_string)>[!?:]@!'
104-
syn match rubyCallback '\v<%(before_action|append_before_action|prepend_before_action|after_action|append_after_action|prepend_after_action|around_action|append_around_action|prepend_around_action|skip_before_action|skip_after_action|skip_action)>[!?:]@!'
104+
syn match rubyCallback '\v<%(before|append_before|prepend_before|after|append_after|prepend_after|around|append_around|prepend_around|skip_before|skip_after|skip)_action>[!?:]@!'
105105
syn match rubyMacro '\v<%(helper|helper_attr|helper_method|layout)>[!?:]@!'
106106
syn match rubyExceptionMacro '\v<%(rescue_from)>[!?:]@!'
107107
endif

0 commit comments

Comments
 (0)