Synvert
example
code:ruby
Synvert::Rewriter.new 'rails', 'convert_head_response' do
if_gem 'actionpack', '>= 5.0'
within_file Synvert::RAILS_CONTROLLER_FILES do
# render nothing: true
# =>
# head :ok
replace :message, with: 'head'
replace :arguments, with: ':ok'
end
# render nothing: true, status: :created
# =>
# head :created
replace_with '{{message}} {{arguments.0.status_source}}'
end
end
end