1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix a stylistic nitpick in #19501

We don't need to use `String#+` or create all the intermediate strings
to break a string into multiple lines. We can just write a c-style
multiline string literal. This is by no means a hotpath, but this is
clearer to me anyway.
This commit is contained in:
Sean Griffin 2015-10-29 09:42:24 -06:00
parent 42b9f3eb52
commit b8832c1b54

View file

@ -175,9 +175,9 @@ module ActiveRecord
end
rescue NameError
raise SubclassNotFound,
"The single-table inheritance mechanism failed to locate the subclass: '#{type_name}'. " +
"This error is raised because the column '#{inheritance_column}' is reserved for storing the class in case of inheritance. " +
"Please rename this column if you didn't intend it to be used for storing the inheritance class " +
"The single-table inheritance mechanism failed to locate the subclass: '#{type_name}'. " \
"This error is raised because the column '#{inheritance_column}' is reserved for storing the class in case of inheritance. " \
"Please rename this column if you didn't intend it to be used for storing the inheritance class " \
"or overwrite #{name}.inheritance_column to use another column for that information."
end
unless subclass == self || descendants.include?(subclass)