Method: Olivander::ApplicationHelper#collection_component_builder_for
- Defined in:
- app/helpers/olivander/application_helper.rb
#collection_component_builder_for(klass, collection, *args, &block) ⇒ Object
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'app/helpers/olivander/application_helper.rb', line 213 def collection_component_builder_for(klass, collection, *args, &block) builder = klass::Builder.new(self, &block) = args. [:builder] = builder render klass.new(collection, *(args + [])) do |component| if builder.header_tools.present? component.with_header_tools do builder.header_tools.call end end if builder..present? component. do builder..call end end end end |