Sha256: 32915f59ef3ee7821a96dda8e9dfa31de4d51ec969ceb8b5acb6fb6a61d71c0e

Contents?: true

Size: 426 Bytes

Versions: 4

Compression:

Stored size: 426 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

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
polygallery-0.4.4 lib/polygallery/view_helpers.rb
polygallery-0.4.2 lib/polygallery/view_helpers.rb
polygallery-0.4.1 lib/polygallery/view_helpers.rb
polygallery-0.4.0 lib/polygallery/view_helpers.rb