Sha256: 769d6dbf3e817c5102d22a14e26932688e37d5b98b293610a53adf7e0c4cb7dc

Contents?: true

Size: 626 Bytes

Versions: 2

Compression:

Stored size: 626 Bytes

Contents

module Polygallery::StrongParams
  extend ActiveSupport::Concern

  included do
  end

  def self.polygallery_params(association='photos')
    [:id, :title, :galleryable_id, :galleryable_type,
     :_destroy, {:photos_attributes => polyphoto_params(association) } ]
  end
  def self.polyphoto_params(association='photos')
    [:id, :photo, :title, :caption, :gallery_title,
     :galleryable_id, :galleryable_type, :_destroy]
  end
  def polygallery_params(association='photos')
    self.class.polygallery_params association end
  def polyphoto_params(association='photos')
    self.class.polyphoto_params association end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
polygallery-0.3.6 app/controllers/concerns/polygallery/strong_params.rb
polygallery-0.3.5 app/controllers/concerns/polygallery/strong_params.rb