Method: Puffer.map_component
- Defined in:
- lib/puffer.rb
.map_component(*args) ⇒ Object
Maps field.type to component class
ex:
Puffer.map_component :ckeditor, :rich, :text, :to => CkeditorComponent
this declaration maps even text fields to use CkeditorComponent for rendering
73 74 75 76 |
# File 'lib/puffer.rb', line 73 def self.map_component *args to = args.[:to] args.each { |type| _component_mappings[type.to_sym] = to } end |