Sha256: 3df3b4b1ca3e733302ec1b148624f7ff92bb263edb13115785cd6bf0462c23ba
Contents?: true
Size: 758 Bytes
Versions: 13
Compression:
Stored size: 758 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
13 entries across 13 versions & 1 rubygems