Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/active_record/base/data_type_for_manifest.rb
Direct Known Subclasses
Class Method Summary collapse
-
.data_type_for_manifest ⇒ Object
Adds this instance of Base to Manifest.configuration.data_types.
Class Method Details
.data_type_for_manifest ⇒ Object
Adds this instance of ActiveRecord::Base to Manifest.configuration.data_types.
3 4 5 6 7 8 9 10 11 |
# File 'lib/active_record/base/data_type_for_manifest.rb', line 3 def self.data_type_for_manifest nav_name = ActiveSupport::Inflector.pluralize(self.to_s) route = "manifest_#{nav_name.underscore}_path" Manifest.configure do |config| config.data_types << { nav_name: ActiveSupport::Inflector.pluralize(self.to_s), route: route } config.data_types.uniq! end end |