Sha256: 750348f4710933bb3ba20c8fff669c73a8a90ba6ebeb54b6f479c74c960cf404
Contents?: true
Size: 757 Bytes
Versions: 15
Compression:
Stored size: 757 Bytes
Contents
module Polygallery module ViewHelpers def fields_for_polygallery(title, f, options={}) options = {}.merge(options) raise "Polygallery #{title} not found for #{f.object.class.name}" unless f.object.class.has_polygallery?(title) gallery = f.object.send(title) render :partial => 'polygallery/galleries/fields_for', :locals => {:f => f, :gallery => gallery, :options => options} end def simple_fields_for_polygallery(title, f, options={}) options = { :label => true, :input_html => {} }.merge(options) gallery = f.object.send(title) render :partial => 'polygallery/galleries/simple_fields_for', :locals => {:f => f, :gallery => gallery, :options => options} end end end
Version data entries
15 entries across 15 versions & 1 rubygems