Commit 9d9f94aea249149dcac71feb3e8158fdc7f36b43
1 parent
3f79e19c
Exists in
master
and in
29 other branches
Set author of uploaded_files
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
... | ... | @@ -189,7 +189,7 @@ class CmsController < MyProfileController |
189 | 189 | end |
190 | 190 | if request.post? && params[:uploaded_files] |
191 | 191 | params[:uploaded_files].each do |file| |
192 | - @uploaded_files << UploadedFile.create(:uploaded_data => file, :profile => profile, :parent => @parent, :last_changed_by => user) unless file == '' | |
192 | + @uploaded_files << UploadedFile.create(:uploaded_data => file, :profile => profile, :parent => @parent, :author => user, :last_changed_by => user) unless file == '' | |
193 | 193 | end |
194 | 194 | @errors = @uploaded_files.select { |f| f.errors.any? } |
195 | 195 | if @errors.any? | ... | ... |