Sha256: ffcf29a4eb27625e1930fa5e25b548ae8fa54594fb8b0c548f93905b32bb974a
Contents?: true
Size: 616 Bytes
Versions: 3
Compression:
Stored size: 616 Bytes
Contents
require 'polygallery' module Polygallery module SimpleFormHelper def self.simple_fields_for_polygallery(fb, title=:gallery, *args, &block) ( '<div class="polygallery-fields">' << fb.simple_fields_for(title, *args, &block) << '</div>' ).html_safe end def simple_fields_for_polygallery(fb, title=:gallery, *args, &block) new_block = block_given? ? block : ->(fb2) { render partial: 'polygallery/galleries/simple_fields_for', locals: { f: fb2 } } SimpleFormHelper.simple_fields_for_polygallery( fb, title, *args, &new_block) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
polygallery-0.4.4 | lib/polygallery/simple_form_helper.rb |
polygallery-0.4.2 | lib/polygallery/simple_form_helper.rb |
polygallery-0.4.1 | lib/polygallery/simple_form_helper.rb |