Skip to content

Commit c63cfc8

Browse files
authored
Merge pull request rails#38609 from eileencodes/fix-error-in-deprecation
Fix error in deprecation
2 parents d877729 + 13e28f5 commit c63cfc8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

activerecord/lib/active_record/database_configurations/database_config.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@ class DatabaseConfigurations
66
# UrlConfig respectively. It will never return a DatabaseConfig object,
77
# as this is the parent class for the types of database configuration objects.
88
class DatabaseConfig # :nodoc:
9-
attr_reader :env_name, :name, :spec_name
10-
deprecate spec_name: "please use name instead"
9+
attr_reader :env_name, :name
1110

1211
attr_accessor :owner_name
1312

1413
def initialize(env_name, name)
1514
@env_name = env_name
1615
@name = name
17-
@spec_name = name
1816
end
1917

18+
def spec_name
19+
@name
20+
end
21+
deprecate spec_name: "please use name instead"
22+
2023
def config
2124
raise NotImplementedError
2225
end

0 commit comments

Comments
 (0)