Module: Polygallery::StrongParams
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/polygallery/strong_params.rb
Class Method Summary collapse
- .polygallery_params(association = 'photos') ⇒ Object
- .polyphoto_params(association = 'photos') ⇒ Object
Instance Method Summary collapse
- #polygallery_params(association = 'photos') ⇒ Object
- #polyphoto_params(association = 'photos') ⇒ Object
Class Method Details
.polygallery_params(association = 'photos') ⇒ Object
7 8 9 10 |
# File 'app/controllers/concerns/polygallery/strong_params.rb', line 7 def self.polygallery_params(association='photos') [:id, :title, :galleryable_id, :galleryable_type, :_destroy, {:photos_attributes => polyphoto_params(association) } ] end |
.polyphoto_params(association = 'photos') ⇒ Object
11 12 13 14 |
# File 'app/controllers/concerns/polygallery/strong_params.rb', line 11 def self.polyphoto_params(association='photos') [:id, :photo, :title, :caption, :gallery_title, :galleryable_id, :galleryable_type, :_destroy] end |
Instance Method Details
#polygallery_params(association = 'photos') ⇒ Object
15 16 |
# File 'app/controllers/concerns/polygallery/strong_params.rb', line 15 def polygallery_params(association='photos') self.class.polygallery_params association end |
#polyphoto_params(association = 'photos') ⇒ Object
17 18 |
# File 'app/controllers/concerns/polygallery/strong_params.rb', line 17 def polyphoto_params(association='photos') self.class.polyphoto_params association end |