Class | ActiveSupport::ModelName |
In: |
vendor/rails/activesupport/lib/active_support/core_ext/module/model_naming.rb
|
Parent: | String |
cache_key | [R] | |
partial_path | [R] | |
plural | [R] | |
singular | [R] |
# File vendor/rails/activesupport/lib/active_support/core_ext/module/model_naming.rb, line 5 5: def initialize(name) 6: super 7: @singular = underscore.tr('/', '_').freeze 8: @plural = @singular.pluralize.freeze 9: @cache_key = tableize.freeze 10: @partial_path = "#{@cache_key}/#{demodulize.underscore}".freeze 11: end