Class: FamilyGallery::MultiplePicturesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/family_gallery/multiple_pictures_controller.rb

Instance Method Summary collapse

Methods included from BaseFamilyGalleryController

#current_ability, #current_user

Instance Method Details

#createObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/family_gallery/multiple_pictures_controller.rb', line 7

def create
  picture_params[:files].each do |file|
    picture = FamilyGallery::Picture.new
    picture.groups << @group
    picture.image = file
    picture.save!
  end

  redirect_to @group
end

#newObject



4
5
# File 'app/controllers/family_gallery/multiple_pictures_controller.rb', line 4

def new
end