Having a problem with a Paperclip upload in Rails 4 - failing on ForbiddenAttributesError (strong parameters validation). Have the latest paperclip gem and latest rails 4 g
It looks like your first one should have worked. This is what I use for my projects.
class GalleriesController < ApplicationController
def new
@gallery = Gallery.new
end
def create
@user.galleries.new(gallery_params)
end
private
#note cover_image is the name of paperclips attachment filetype(s)
def gallery_params
params.require(:gallery).permit(:cover_image)
end
end