Feature #32938 » 0006-Change-camelcase-rules-to-keep-special-module-or-cla.patch
| config/initializers/inflections.rb | ||
|---|---|---|
|
# inflect.irregular 'person', 'people'
|
||
|
# inflect.uncountable %w( fish sheep )
|
||
|
# end
|
||
|
class RedmineInflector < Zeitwerk::Inflector
|
||
|
def camelize(basename, abspath)
|
||
|
if abspath.match? /\/lib\/redmine\/version.rb/
|
||
|
basename.gsub!('version', 'VERSION')
|
||
|
return basename
|
||
|
end
|
||
|
super
|
||
|
end
|
||
|
end
|
||
|
Rails.autoloaders.each do |autoloader|
|
||
|
autoloader.inflector = RedmineInflector.new
|
||
|
autoloader.inflector.inflect(
|
||
|
"url" => "URL",
|
||
|
"pdf" => "PDF",
|
||
|
"csv" => "CSV",
|
||
|
"imap" => "IMAP",
|
||
|
"pop3" => "POP3",
|
||
|
"redcloth3" => "RedCloth3"
|
||
|
)
|
||
|
end
|
||