Module: Polygallery::ViewHelpers
- Defined in:
- lib/polygallery/view_helpers.rb
Instance Method Summary collapse
- #fields_for_polygallery(title, f, options = {}) ⇒ Object
- #simple_fields_for_polygallery(title, f, options = {}) ⇒ Object
Instance Method Details
#fields_for_polygallery(title, f, options = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/polygallery/view_helpers.rb', line 4 def fields_for_polygallery(title, f, ={}) = {}.merge() 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 => } end |
#simple_fields_for_polygallery(title, f, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/polygallery/view_helpers.rb', line 11 def simple_fields_for_polygallery(title, f, ={}) = { :label => true, :input_html => {} }.merge() gallery = f.object.send(title) render :partial => 'polygallery/galleries/simple_fields_for', :locals => {:f => f, :gallery => gallery, :options => } end |