module Polygallery::StrongParamsHelper

Public Class Methods

polygallery_params(title=:gallery, photos_title=:photos) click to toggle source
# File lib/polygallery/strong_params_helper.rb, line 5
def self.polygallery_params(title=:gallery, photos_title=:photos)
  {:"#{title}_attributes" => [:id, :title, :galleryable_id, :galleryable_type,
                                 :_destroy, polyphoto_params(photos_title) ] }
end
polyphoto_params(title=:photos) click to toggle source
# File lib/polygallery/strong_params_helper.rb, line 9
def self.polyphoto_params(title=:photos)
  {:"#{title}_attributes" => [:id, :photo, :photo_remote_url, :photo_to_upload,
                              :title, :caption, :gallery_title, :gallery_id,
                              :galleryable_id, :galleryable_type, :_destroy] }
end

Public Instance Methods

polygallery_params(title=:gallery, photos_title=:photos) click to toggle source
# File lib/polygallery/strong_params_helper.rb, line 14
def polygallery_params(title=:gallery, photos_title=:photos)
  StrongParamsHelper.polygallery_params title, photos_title end
polyphoto_params(title=:photos) click to toggle source
# File lib/polygallery/strong_params_helper.rb, line 16
def polyphoto_params(title=:photos)
  StrongParamsHelper.polyphoto_params title
end