Sha256: c4a4b21edc7ffed4c77b8640ea856001bce751807efd536fa124b1b7ba140809

Contents?: true

Size: 454 Bytes

Versions: 3

Compression:

Stored size: 454 Bytes

Contents

module Polygallery
  module ViewHelpers

    def fields_for_polygallery(title, f, options={})
      settings = { label: nil, button: nil }.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, settings: settings }
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polygallery-0.4.8 lib/polygallery/view_helpers.rb
polygallery-0.4.7 lib/polygallery/view_helpers.rb
polygallery-0.4.6 lib/polygallery/view_helpers.rb