Module: Polygallery::StrongParams

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/concerns/polygallery/strong_params.rb

Instance Method Summary collapse

Instance Method Details

#polygallery_params(association = 'photos') ⇒ Object



7
8
9
10
11
12
# File 'app/controllers/concerns/polygallery/strong_params.rb', line 7

def polygallery_params(association='photos')
  [:id, :title, :galleryable_id, :galleryable_type,
   :_destroy, {:"#{association}_attributes" => 
      [:id, :photo, :title, :caption, :gallery_title,
       :galleryable_id, :galleryable_type, :_destroy]}]
end