sozialhelden / wheelmap-classic

:wheelchair: Legacy "classic" wheelmap.org (deprecated)
http://www.wheelmap.org
GNU Affero General Public License v3.0
47 stars 16 forks source link

[Active_Admin]: Cannot commit a photo => WARNING: Can't mass-assign protected #415

Open 1000miles opened 7 years ago

1000miles commented 7 years ago

User story:

00000160

Server Output:

I, [2016-10-04T15:28:50.522583 #23292]  INFO -- : Started POST "/admin/photos" for x.x.x.x at 2016-10-04 15:28:50 +0200
I, [2016-10-04T15:28:50.526117 #23292]  INFO -- : Processing by Admin::PhotosController#create as HTML
I, [2016-10-04T15:28:50.526271 #23292]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxxx=", "photo"=>{"poi_id"=>"12", "user_id"=>"12", "image"=>#<ActionDispatch::Http::UploadedFile:0x007fa4b34cd308 @tempfile=#<Tempfile:/tmp/RackMultipart20161004-23292-k86u3u>, @original_filename="asq_logo_grey.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"photo[image]\"; filename=\"asq_logo_grey.png\"\r\nContent-Type: image/png\r\n">, "caption"=>"", "taken_at(3i)"=>"", "taken_at(2i)"=>"", "taken_at(1i)"=>"", "taken_at(4i)"=>"", "taken_at(5i)"=>""}, "commit"=>"Photo anlegen"}
I, [2016-10-04T15:28:50.528916 #20450]  INFO -- :   Rendered shared/_header.html.haml (9.7ms)
I, [2016-10-04T15:28:50.529879 #20450]  INFO -- : Read fragment views/zh_TW/shared/_footer.html.haml'}/43b65f43b89a4b37c7ffe42f2943a81f (0.4ms)
I, [2016-10-04T15:28:50.530022 #20450]  INFO -- :   Rendered shared/_footer.html.haml (0.8ms)
I, [2016-10-04T15:28:50.530386 #20450]  INFO -- :   Rendered shared/_google_tracking.html.haml (0.2ms)
I, [2016-10-04T15:28:50.530784 #20450]  INFO -- :   Rendered shared/_social_embed.html.haml (0.2ms)
I, [2016-10-04T15:28:50.531176 #20450]  INFO -- : Filter chain halted as :load_region rendered or redirected
I, [2016-10-04T15:28:50.531427 #20450]  INFO -- : Completed 404 Not Found in 24ms (Views: 21.9ms | ActiveRecord: 0.1ms)
W, [2016-10-04T15:28:50.538145 #23292]  WARN -- : WARNING: Can't mass-assign protected attributes for Photo: poi_id, user_id, caption
    lib/rack_i18n_locale_switcher.rb:32:in `call'
    librato-rack (0.6.0) lib/librato/rack.rb:94:in `process_request'
    librato-rack (0.6.0) lib/librato/rack.rb:64:in `call'
1000miles commented 7 years ago

Since this is also waiting for grooming with @Svenyo and @karolinamakaruk regarding the admin dashboard we put this ticket on hold as well.

cc @holgerd