Skip to content

Commit

Permalink
Highlight HTTP basic auth controller methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Jan 16, 2022
1 parent 63c240f commit de73f6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion after/syntax/ruby/rails.vim
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ endif

if s:path =~# '/app/controllers/.*\.rb$'
syn keyword rubyHelper params request response session headers cookies flash
syn keyword rubyMacro protect_from_forgery skip_forgery_protection
syn keyword rubyMacro protect_from_forgery skip_forgery_protection http_basic_authenticate_with
syn match rubyMacro '\<respond_to\>\ze[( ] *[:*]'
syn match rubyResponse '\<respond_to\>\ze[( ] *\%([&{]\|do\>\)'
syn keyword rubyResponse render head redirect_to redirect_back respond_with send_data send_file
syn keyword rubyResponse authenticate_or_request_with_http_basic authenticate_with_http_basic http_basic_authenticate_or_request_with request_http_basic_authentication
endif

let b:rails_path = s:path
Expand Down

0 comments on commit de73f6d

Please sign in to comment.