Skip to content

Commit 3061809

Browse files
committed
use PRISM_PARSER in rails/add_application_record
1 parent d3f3069 commit 3061809

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rails/add_application_record.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
Synvert::Rewriter.new 'rails', 'add_application_record' do
4-
configure(parser: Synvert::PARSER_PARSER)
4+
configure(parser: Synvert::PRISM_PARSER)
55

66
description <<~EOS
77
It adds ApplicationRecord
@@ -37,8 +37,8 @@ class ApplicationRecord < ActiveRecord::Base
3737
# =>
3838
# class Post < ApplicationRecord
3939
# end
40-
with_node node_type: 'class', name: { not: 'ApplicationRecord' }, parent_class: 'ActiveRecord::Base' do
41-
replace :parent_class, with: 'ApplicationRecord'
40+
with_node node_type: 'class_node', name: { not: 'ApplicationRecord' }, superclass: 'ActiveRecord::Base' do
41+
replace :superclass, with: 'ApplicationRecord'
4242
end
4343
end
4444
end

0 commit comments

Comments
 (0)