openfarmcc / OpenFarm

A free and open database for farming and gardening knowledge. You can grow anything!
https://OpenFarm.cc
MIT License
1.57k stars 242 forks source link

Console errors when saving Garden #838

Open roryaronson opened 8 years ago

roryaronson commented 8 years ago

Going to my profile I hit the Edit Garden button, made no edits, and then hit the Save Garden button. This showed up in the console:

application-74dcfc5….js:5 PUT https://openfarm.cc/api/v1/gardens/54bdb28562393300033c0400 500 (Internal Server Error)(anonymous function) @ application-74dcfc5….js:5f @ application-74dcfc5….js:4a @ application-74dcfc5….js:4(anonymous function) @ application-74dcfc5….js:5$eval @ application-74dcfc5….js:5$digest @ application-74dcfc5….js:5$apply @ application-74dcfc5….js:5(anonymous function) @ application-74dcfc5….js:6dispatch @ application-74dcfc5….js:2m.handle @ application-74dcfc5….js:2
application-74dcfc5….js:18 error saving garden Object {status: "500", error: "Internal Server Error"}error: "Internal Server Error"status: "500"__proto__: Object(anonymous function) @ application-74dcfc5….js:18(anonymous function) @ application-74dcfc5….js:4(anonymous function) @ application-74dcfc5….js:5$eval @ application-74dcfc5….js:5$digest @ application-74dcfc5….js:5$apply @ application-74dcfc5….js:5l @ application-74dcfc5….js:4v @ application-74dcfc5….js:4x.onreadystatechange @ application-74dcfc5….js:5
application-74dcfc5….js:18 undefined
application-74dcfc5….js:5 TypeError: Cannot read property 'map' of undefined
    at Object.pushToAlerts (application-74dcfc5….js:18)
    at application-74dcfc5….js:18
    at application-74dcfc5….js:4
    at application-74dcfc5….js:5
    at c.$eval (application-74dcfc5….js:5)
    at c.$digest (application-74dcfc5….js:5)
    at c.$apply (application-74dcfc5….js:5)
    at l (application-74dcfc5….js:4)
    at v (application-74dcfc5….js:4)
    at XMLHttpRequest.x.onreadystatechange (application-74dcfc5….js:5)
simonv3 commented 8 years ago

And I get this e-mail:

A NoMethodError occurred in gardens#update:

  undefined method `each' for true:TrueClass
  app/mutations/gardens/update_garden.rb:34:in `execute'

-------------------------------
Request:
-------------------------------

  * URL        : https://openfarm.cc/api/v1/gardens/57982e8b76469e000300007a
  * HTTP Method: PUT
  * IP address : 115.42.205.238
  * Parameters : {"data"=>{"type"=>"gardens", "id"=>"57982e8b76469e000300007a", "attributes"=>{"name"=>"Koganti's Balcony", "location"=>"Outside", "type"=>"Outside", "average_sun"=>"Partial Sun", "soil_type"=>"Potting", "ph"=>7.5, "is_private"=>true, "user"=>{"_id"=>"<redacted>", "admin"=>false, "agree"=>true, "display_name"=>"<redacted>", "email"=>"<redacted>", "favorited_guide_ids"=>[], "help_list"=>false, "is_private"=>false, "level"=>0, "mailing_list"=>false, "sash_id"=>"57982df676469e0003000078"}, "id"=>"57982e8b76469e000300007a", "relationships"=>nil, "garden_crops"=>[{"garden"=>"57982e8b76469e000300007a", "guide"=>{"id"=>"5621271e316639000300003c", "name"=>"Abifung Bridget's Tomato", "crop_id"=>"54bda00e3961370003150400", "crop"=>{"name"=>"Tomato", "slug"=>"tomato", "binomial_name"=>"Solanum lycopersicum", "common_names"=>["Tomato", "Tomate"], "description"=>"The species originated in South America, while its use as a food developed in Mexico. It's a hugely popular plant in many cuisines in the world.", "sun_requirements"=>"Full Sun", "sowing_method"=>"by seed", "spread"=>nil, "row_spacing"=>nil, "height"=>nil, "processing_pictures"=>0, "guides_count"=>19, "main_image_path"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "taxon"=>nil, "id"=>"54bda00e3961370003150400", "relationships"=>{"pictures"=>{"links"=>{"related"=>"/api/v1/crops/54bda00e3961370003150400/pictures"}, "data"=>[{"type"=>"pictures", "id"=>"54ffce343134350003880200"}]}}, "links"=>{"self"=>{"api"=>"/api/v1/crops/54bda00e3961370003150400", "website"=>"/crops/54bda00e3961370003150400"}}, "pictures"=>[{"id"=>"54ffce343134350003880200", "image_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.?1426050603", "small_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "thumbnail_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "medium_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "large_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "canopy_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603"}]}}, "crop"=>nil, "sowed"=>"2016-07-27", "stage"=>"Planted", "quantity"=>0, "history"=>[], "id"=>"5798313b76469e0003000087", "links"=>{"self"=>{"api"=>"/api/v1/gardens/57982e8b76469e000300007a/garden_crops/5798313b76469e0003000087"}}, "hide"=>false}, {"garden"=>"57982e8b76469e000300007a", "guide"=>{"id"=>"57982fda49b9d1000300006d", "name"=>"Phani R C Chowdary Koganti's Tomato", "crop_id"=>"54bda00e3961370003150400", "crop"=>{"name"=>"Tomato", "slug"=>"tomato", "binomial_name"=>"Solanum lycopersicum", "common_names"=>["Tomato", "Tomate"], "description"=>"The species originated in South America, while its use as a food developed in Mexico. It's a hugely popular plant in many cuisines in the world.", "sun_requirements"=>"Full Sun", "sowing_method"=>"by seed", "spread"=>nil, "row_spacing"=>nil, "height"=>nil, "processing_pictures"=>0, "guides_count"=>19, "main_image_path"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "taxon"=>nil, "id"=>"54bda00e3961370003150400", "relationships"=>{"pictures"=>{"links"=>{"related"=>"/api/v1/crops/54bda00e3961370003150400/pictures"}, "data"=>[{"type"=>"pictures", "id"=>"54ffce343134350003880200"}]}}, "links"=>{"self"=>{"api"=>"/api/v1/crops/54bda00e3961370003150400", "website"=>"/crops/54bda00e3961370003150400"}}, "pictures"=>[{"id"=>"54ffce343134350003880200", "image_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.?1426050603", "small_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "thumbnail_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "medium_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "large_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "canopy_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603"}]}}, "crop"=>nil, "sowed"=>"2016-09-15", "stage"=>"Planted", "quantity"=>0, "history"=>[{"_id"=>"57db2acf1bc4980003000018", "action"=>"create", "association_chain"=>[{"name"=>"Garden", "id"=>"57982e8b76469e000300007a"}, {"name"=>"garden_crops", "id"=>"57db2acf1bc4980003000019"}], "created_at"=>"2016-09-15T23:12:15.547Z", "modified"=>{"stage"=>"Planted", "sowed"=>"2016-09-15T00:00:00.000Z"}, "modifier_id"=>nil, "original"=>{}, "scope"=>"garden", "updated_at"=>"2016-09-15T23:12:15.547Z", "version"=>1}], "id"=>"57db2acf1bc4980003000019", "links"=>{"self"=>{"api"=>"/api/v1/gardens/57982e8b76469e000300007a/garden_crops/57db2acf1bc4980003000019"}}, "hide"=>false}], "pictures"=>[], "editing_crops"=>false, "editing"=>false, "links"=>nil}, "images"=>[]}, "format"=>"json", "controller"=>"api/v1/gardens", "action"=>"update", "id"=>"57982e8b76469e000300007a", "garden"=>{}}
  * Timestamp  : 2016-10-04 01:55:26 UTC
  * Server : 74957b52-f647-4078-bbb2-66c3c95b75ec
  * Rails root : /app
  * Process: 3

-------------------------------
Session:
-------------------------------

  * session id: [FILTERED]
  * data: {"session_id"=>"3ff491b6e28d7e5bb9f26ed5c71aa848",
   "warden.user.user.key"=>
    [["57982d7376469e0003000076"], "$2a$10$Y4/kvgDXlRRIsnC91pcsAe"],
   "_csrf_token"=>"XW+REyMHVV49kCr23rt7YRMIfL1uZ0A3A/9OgkL15bs="}

-------------------------------
Environment:
-------------------------------

  * CONTENT_LENGTH                                 : 5302
  * CONTENT_TYPE                                   : application/json;charset=utf-8
  * GATEWAY_INTERFACE                              : CGI/1.2
  * HTTP_ACCEPT                                    : application/json, text/plain, */*
  * HTTP_ACCEPT_ENCODING                           : gzip, deflate
  * HTTP_ACCEPT_LANGUAGE                           : en-US,en;q=0.5
  * HTTP_CACHE_CONTROL                             : no-cache
  * HTTP_CONNECTION                                : close
  * HTTP_CONNECT_TIME                              : 0
  * HTTP_COOKIE                                    : _ga=GA1.2.1601257239.1475463031; _OpenFarm_session=Rm4vUCtlckk3OEE3RXlRdUhHQnZORUhNZ1VsdE80cVQ2TEdGK2t5cStKaUQyVUYvMnhuZVR5cE4vNWc1dlhDY0RQbmdrOGNMRVgrVmptRHBzWmgwazl4RTBac1AveDJwZUZpanZIMWxkN3RiVVJCbVp1WW4vcEI3dTl3ZS9wTFZKcTBZRExTTFRWSE90T2tnSzhuRmdxbGVURVk5MVZMa2k0YWV0Z2x0eDZjNW1jYll1a2UyYkhoWWY4UVBXYmtwM1dUTWxIOXZwZmVkbDd1dzV4ZU5zWjhXTUd0NmUyREtqdkJ1djFBc2hldE5hditRVzFYNXZxcEE3aEc4SW1OeVJuYzJ4aFZoaDRPRlpXai92OHpaeUVNTUdhSUtIalhhRkdaSVFEa3VQamRwMUFWUDllaGtmS0g5YUVQcGU3QVItLTBSNUw1aFJpbXVJVVorU24xMXVROFE9PQ%3D%3D--e562167accd44d93dbe92af61c65276694a5303d; _gat=1
  * HTTP_DNT                                       : 1
  * HTTP_HOST                                      : openfarm.cc
  * HTTP_REFERER                                   : https://openfarm.cc/en/users/57982d7376469e0003000076
  * HTTP_TOTAL_ROUTE_TIME                          : 0
  * HTTP_USER_AGENT                                : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
  * HTTP_VERSION                                   : HTTP/1.1
  * HTTP_VIA                                       : 1.1 vegur
  * HTTP_X_CSRF_TOKEN                              : ysonZ2CnH15Bxdvhk4ix+LRukFzBeX80p4hp9b/JuUOXpbZ0Q6BKAHxV8RdNM8qZp2bs4a8ePwOkdyd3/Txc+A==
  * HTTP_X_FORWARDED_FOR                           : 115.42.205.238
  * HTTP_X_FORWARDED_PORT                          : 443
  * HTTP_X_FORWARDED_PROTO                         : https
  * HTTP_X_REQUESTED_WITH                          : XMLHttpRequest
  * HTTP_X_REQUEST_ID                              : e9b0b560-f5b3-400f-8c3c-fed740840517
  * HTTP_X_REQUEST_START                           : 1475546126530
  * ORIGINAL_FULLPATH                              : /api/v1/gardens/57982e8b76469e000300007a
  * ORIGINAL_SCRIPT_NAME                           : 
  * PATH_INFO                                      : /api/v1/gardens/57982e8b76469e000300007a
  * QUERY_STRING                                   : 
  * RAW_POST_DATA                                  : [FILTERED]
  * REMOTE_ADDR                                    : 10.13.217.57
  * REQUEST_METHOD                                 : PUT
  * REQUEST_PATH                                   : /api/v1/gardens/57982e8b76469e000300007a
  * REQUEST_URI                                    : /api/v1/gardens/57982e8b76469e000300007a
  * ROUTES_70229099999600_SCRIPT_NAME              : 
  * SCRIPT_NAME                                    : 
  * SERVER_NAME                                    : openfarm.cc
  * SERVER_PORT                                    : 80
  * SERVER_PROTOCOL                                : HTTP/1.1
  * SERVER_SOFTWARE                                : thin 1.7.0 codename Dunder Mifflin
  * action_controller.instance                     : #<Api::V1::GardensController:0x007fbefdd9d5c8>
  * action_dispatch.backtrace_cleaner              : #<Rails::BacktraceCleaner:0x007fbefbf70820>
  * action_dispatch.cookies                        : #<ActionDispatch::Cookies::CookieJar:0x007fbefdd3aab8>
  * action_dispatch.cookies_digest                 : 
  * action_dispatch.cookies_serializer             : 
  * action_dispatch.encrypted_cookie_salt          : encrypted cookie
  * action_dispatch.encrypted_signed_cookie_salt   : signed encrypted cookie
  * action_dispatch.http_auth_salt                 : http authentication
  * action_dispatch.key_generator                  : #<ActiveSupport::CachingKeyGenerator:0x007fbefbf701b8>
  * action_dispatch.logger                         : #<RailsStdoutLogging::StdoutLogger:0x007fbef905a158>
  * action_dispatch.parameter_filter               : [:password]
  * action_dispatch.redirect_filter                : []
  * action_dispatch.remote_ip                      : 115.42.205.238
  * action_dispatch.request.content_type           : application/json
  * action_dispatch.request.formats                : [#<Mime::Type:0x007fbef8a4b258 @synonyms=["text/x-json", "application/jsonrequest"], @symbol=:json, @string="application/json", @hash=2167894618838448889>]
  * action_dispatch.request.parameters             : {"data"=>{"type"=>"gardens", "id"=>"57982e8b76469e000300007a", "attributes"=>{"name"=>"Koganti's Balcony", "location"=>"Outside", "type"=>"Outside", "average_sun"=>"Partial Sun", "soil_type"=>"Potting", "ph"=>7.5, "is_private"=>true, "user"=>{"_id"=>"<redacted>", "admin"=>false, "agree"=>true, "display_name"=>"<redacted>", "email"=>"<redacted>", "favorited_guide_ids"=>[], "help_list"=>false, "is_private"=>false, "level"=>0, "mailing_list"=>false, "sash_id"=>"57982df676469e0003000078"}, "id"=>"57982e8b76469e000300007a", "relationships"=>nil, "garden_crops"=>[{"garden"=>"57982e8b76469e000300007a", "guide"=>{"id"=>"5621271e316639000300003c", "name"=>"Abifung Bridget's Tomato", "crop_id"=>"54bda00e3961370003150400", "crop"=>{"name"=>"Tomato", "slug"=>"tomato", "binomial_name"=>"Solanum lycopersicum", "common_names"=>["Tomato", "Tomate"], "description"=>"The species originated in South America, while its use as a food developed in Mexico. It's a hugely popular plant in many cuisines in the world.", "sun_requirements"=>"Full Sun", "sowing_method"=>"by seed", "spread"=>nil, "row_spacing"=>nil, "height"=>nil, "processing_pictures"=>0, "guides_count"=>19, "main_image_path"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "taxon"=>nil, "id"=>"54bda00e3961370003150400", "relationships"=>{"pictures"=>{"links"=>{"related"=>"/api/v1/crops/54bda00e3961370003150400/pictures"}, "data"=>[{"type"=>"pictures", "id"=>"54ffce343134350003880200"}]}}, "links"=>{"self"=>{"api"=>"/api/v1/crops/54bda00e3961370003150400", "website"=>"/crops/54bda00e3961370003150400"}}, "pictures"=>[{"id"=>"54ffce343134350003880200", "image_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.?1426050603", "small_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "thumbnail_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "medium_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "large_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "canopy_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603"}]}}, "crop"=>nil, "sowed"=>"2016-07-27", "stage"=>"Planted", "quantity"=>0, "history"=>[], "id"=>"5798313b76469e0003000087", "links"=>{"self"=>{"api"=>"/api/v1/gardens/57982e8b76469e000300007a/garden_crops/5798313b76469e0003000087"}}, "hide"=>false}, {"garden"=>"57982e8b76469e000300007a", "guide"=>{"id"=>"57982fda49b9d1000300006d", "name"=>"Phani R C Chowdary Koganti's Tomato", "crop_id"=>"54bda00e3961370003150400", "crop"=>{"name"=>"Tomato", "slug"=>"tomato", "binomial_name"=>"Solanum lycopersicum", "common_names"=>["Tomato", "Tomate"], "description"=>"The species originated in South America, while its use as a food developed in Mexico. It's a hugely popular plant in many cuisines in the world.", "sun_requirements"=>"Full Sun", "sowing_method"=>"by seed", "spread"=>nil, "row_spacing"=>nil, "height"=>nil, "processing_pictures"=>0, "guides_count"=>19, "main_image_path"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "taxon"=>nil, "id"=>"54bda00e3961370003150400", "relationships"=>{"pictures"=>{"links"=>{"related"=>"/api/v1/crops/54bda00e3961370003150400/pictures"}, "data"=>[{"type"=>"pictures", "id"=>"54ffce343134350003880200"}]}}, "links"=>{"self"=>{"api"=>"/api/v1/crops/54bda00e3961370003150400", "website"=>"/crops/54bda00e3961370003150400"}}, "pictures"=>[{"id"=>"54ffce343134350003880200", "image_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.?1426050603", "small_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "thumbnail_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "medium_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "large_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "canopy_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603"}]}}, "crop"=>nil, "sowed"=>"2016-09-15", "stage"=>"Planted", "quantity"=>0, "history"=>[{"_id"=>"57db2acf1bc4980003000018", "action"=>"create", "association_chain"=>[{"name"=>"Garden", "id"=>"57982e8b76469e000300007a"}, {"name"=>"garden_crops", "id"=>"57db2acf1bc4980003000019"}], "created_at"=>"2016-09-15T23:12:15.547Z", "modified"=>{"stage"=>"Planted", "sowed"=>"2016-09-15T00:00:00.000Z"}, "modifier_id"=>nil, "original"=>{}, "scope"=>"garden", "updated_at"=>"2016-09-15T23:12:15.547Z", "version"=>1}], "id"=>"57db2acf1bc4980003000019", "links"=>{"self"=>{"api"=>"/api/v1/gardens/57982e8b76469e000300007a/garden_crops/57db2acf1bc4980003000019"}}, "hide"=>false}], "pictures"=>[], "editing_crops"=>false, "editing"=>false, "links"=>nil}, "images"=>[]}, "format"=>"json", "controller"=>"api/v1/gardens", "action"=>"update", "id"=>"57982e8b76469e000300007a", "garden"=>{}}
  * action_dispatch.request.path_parameters        : {:format=>"json", :controller=>"api/v1/gardens", :action=>"update", :id=>"57982e8b76469e000300007a"}
  * action_dispatch.request.query_parameters       : {}
  * action_dispatch.request.request_parameters     : {"data"=>{"type"=>"gardens", "id"=>"57982e8b76469e000300007a", "attributes"=>{"name"=>"Koganti's Balcony", "location"=>"Outside", "type"=>"Outside", "average_sun"=>"Partial Sun", "soil_type"=>"Potting", "ph"=>7.5, "is_private"=>true, "user"=>{"_id"=>"<redacted>", "admin"=>false, "agree"=>true, "display_name"=>"<redacted>", "email"=>"<redacted>", "favorited_guide_ids"=>[], "help_list"=>false, "is_private"=>false, "level"=>0, "mailing_list"=>false, "sash_id"=>"57982df676469e0003000078"}, "id"=>"57982e8b76469e000300007a", "relationships"=>nil, "garden_crops"=>[{"garden"=>"57982e8b76469e000300007a", "guide"=>{"id"=>"5621271e316639000300003c", "name"=>"Abifung Bridget's Tomato", "crop_id"=>"54bda00e3961370003150400", "crop"=>{"name"=>"Tomato", "slug"=>"tomato", "binomial_name"=>"Solanum lycopersicum", "common_names"=>["Tomato", "Tomate"], "description"=>"The species originated in South America, while its use as a food developed in Mexico. It's a hugely popular plant in many cuisines in the world.", "sun_requirements"=>"Full Sun", "sowing_method"=>"by seed", "spread"=>nil, "row_spacing"=>nil, "height"=>nil, "processing_pictures"=>0, "guides_count"=>19, "main_image_path"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "taxon"=>nil, "id"=>"54bda00e3961370003150400", "relationships"=>{"pictures"=>{"links"=>{"related"=>"/api/v1/crops/54bda00e3961370003150400/pictures"}, "data"=>[{"type"=>"pictures", "id"=>"54ffce343134350003880200"}]}}, "links"=>{"self"=>{"api"=>"/api/v1/crops/54bda00e3961370003150400", "website"=>"/crops/54bda00e3961370003150400"}}, "pictures"=>[{"id"=>"54ffce343134350003880200", "image_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.?1426050603", "small_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "thumbnail_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "medium_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "large_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "canopy_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603"}]}}, "crop"=>nil, "sowed"=>"2016-07-27", "stage"=>"Planted", "quantity"=>0, "history"=>[], "id"=>"5798313b76469e0003000087", "links"=>{"self"=>{"api"=>"/api/v1/gardens/57982e8b76469e000300007a/garden_crops/5798313b76469e0003000087"}}, "hide"=>false}, {"garden"=>"57982e8b76469e000300007a", "guide"=>{"id"=>"57982fda49b9d1000300006d", "name"=>"Phani R C Chowdary Koganti's Tomato", "crop_id"=>"54bda00e3961370003150400", "crop"=>{"name"=>"Tomato", "slug"=>"tomato", "binomial_name"=>"Solanum lycopersicum", "common_names"=>["Tomato", "Tomate"], "description"=>"The species originated in South America, while its use as a food developed in Mexico. It's a hugely popular plant in many cuisines in the world.", "sun_requirements"=>"Full Sun", "sowing_method"=>"by seed", "spread"=>nil, "row_spacing"=>nil, "height"=>nil, "processing_pictures"=>0, "guides_count"=>19, "main_image_path"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "taxon"=>nil, "id"=>"54bda00e3961370003150400", "relationships"=>{"pictures"=>{"links"=>{"related"=>"/api/v1/crops/54bda00e3961370003150400/pictures"}, "data"=>[{"type"=>"pictures", "id"=>"54ffce343134350003880200"}]}}, "links"=>{"self"=>{"api"=>"/api/v1/crops/54bda00e3961370003150400", "website"=>"/crops/54bda00e3961370003150400"}}, "pictures"=>[{"id"=>"54ffce343134350003880200", "image_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.?1426050603", "small_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "thumbnail_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "medium_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "large_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603", "canopy_url"=>"https://s3.amazonaws.com/openfarm-project/production/media/pictures/attachments/54ffce343134350003880200.jpg?1426050603"}]}}, "crop"=>nil, "sowed"=>"2016-09-15", "stage"=>"Planted", "quantity"=>0, "history"=>[{"_id"=>"57db2acf1bc4980003000018", "action"=>"create", "association_chain"=>[{"name"=>"Garden", "id"=>"57982e8b76469e000300007a"}, {"name"=>"garden_crops", "id"=>"57db2acf1bc4980003000019"}], "created_at"=>"2016-09-15T23:12:15.547Z", "modified"=>{"stage"=>"Planted", "sowed"=>"2016-09-15T00:00:00.000Z"}, "modifier_id"=>nil, "original"=>{}, "scope"=>"garden", "updated_at"=>"2016-09-15T23:12:15.547Z", "version"=>1}], "id"=>"57db2acf1bc4980003000019", "links"=>{"self"=>{"api"=>"/api/v1/gardens/57982e8b76469e000300007a/garden_crops/57db2acf1bc4980003000019"}}, "hide"=>false}], "pictures"=>[], "editing_crops"=>false, "editing"=>false, "links"=>nil}, "images"=>[]}, "garden"=>{}}
  * action_dispatch.request.unsigned_session_cookie: {"session_id"=>"3ff491b6e28d7e5bb9f26ed5c71aa848", "warden.user.user.key"=>[["57982d7376469e0003000076"], "$2a$10$Y4/kvgDXlRRIsnC91pcsAe"], "_csrf_token"=>"XW+REyMHVV49kCr23rt7YRMIfL1uZ0A3A/9OgkL15bs="}
  * action_dispatch.request_id                     : e9b0b560-f5b3-400f-8c3c-fed740840517
  * action_dispatch.routes                         : #<ActionDispatch::Routing::RouteSet:0x007fbef91de2e0>
  * action_dispatch.secret_key_base                : 9a2bfa66386c5ba78c543bc6410072bac89433debea7ea2c969264d9e1b18ef3d3deec8c7b7237c9f2f4c47eef10d0a848b3f4097e3ad516c4faf8c7c2cfab8e
  * action_dispatch.secret_token                   : 
  * action_dispatch.show_detailed_exceptions       : false
  * action_dispatch.show_exceptions                : true
  * action_dispatch.signed_cookie_salt             : signed cookie
  * async.callback                                 : #<Method: Thin::Connection#post_process>
  * async.close                                    : #<EventMachine::DefaultDeferrable:0x007fbefdeaf6a0>
  * rack-timeout.info                              : #<struct Rack::Timeout::RequestDetails id="e9b0b560-f5b3-400f-8c3c-fed740840517", wait=0.3369128056102295, service=0.00248510017991066, timeout=15, state=:active>
  * rack.attack.throttle_data                      : {"req/ip"=>{:count=>1, :period=>300, :limit=>300}}
  * rack.cors                                      : #<Rack::Cors::Result:0x007fbefdeaef70>
  * rack.errors                                    : #<IO:0x007fbef5da5528>
  * rack.input                                     : #<StringIO:0x007fbefe0e0460>
  * rack.multiprocess                              : false
  * rack.multithread                               : false
  * rack.request.cookie_hash                       : {"_ga"=>"GA1.2.1601257239.1475463031", "_OpenFarm_session"=>"Rm4vUCtlckk3OEE3RXlRdUhHQnZORUhNZ1VsdE80cVQ2TEdGK2t5cStKaUQyVUYvMnhuZVR5cE4vNWc1dlhDY0RQbmdrOGNMRVgrVmptRHBzWmgwazl4RTBac1AveDJwZUZpanZIMWxkN3RiVVJCbVp1WW4vcEI3dTl3ZS9wTFZKcTBZRExTTFRWSE90T2tnSzhuRmdxbGVURVk5MVZMa2k0YWV0Z2x0eDZjNW1jYll1a2UyYkhoWWY4UVBXYmtwM1dUTWxIOXZwZmVkbDd1dzV4ZU5zWjhXTUd0NmUyREtqdkJ1djFBc2hldE5hditRVzFYNXZxcEE3aEc4SW1OeVJuYzJ4aFZoaDRPRlpXai92OHpaeUVNTUdhSUtIalhhRkdaSVFEa3VQamRwMUFWUDllaGtmS0g5YUVQcGU3QVItLTBSNUw1aFJpbXVJVVorU24xMXVROFE9PQ==--e562167accd44d93dbe92af61c65276694a5303d", "_gat"=>"1"}
  * rack.request.cookie_string                     : _ga=GA1.2.1601257239.1475463031; _OpenFarm_session=Rm4vUCtlckk3OEE3RXlRdUhHQnZORUhNZ1VsdE80cVQ2TEdGK2t5cStKaUQyVUYvMnhuZVR5cE4vNWc1dlhDY0RQbmdrOGNMRVgrVmptRHBzWmgwazl4RTBac1AveDJwZUZpanZIMWxkN3RiVVJCbVp1WW4vcEI3dTl3ZS9wTFZKcTBZRExTTFRWSE90T2tnSzhuRmdxbGVURVk5MVZMa2k0YWV0Z2x0eDZjNW1jYll1a2UyYkhoWWY4UVBXYmtwM1dUTWxIOXZwZmVkbDd1dzV4ZU5zWjhXTUd0NmUyREtqdkJ1djFBc2hldE5hditRVzFYNXZxcEE3aEc4SW1OeVJuYzJ4aFZoaDRPRlpXai92OHpaeUVNTUdhSUtIalhhRkdaSVFEa3VQamRwMUFWUDllaGtmS0g5YUVQcGU3QVItLTBSNUw1aFJpbXVJVVorU24xMXVROFE9PQ%3D%3D--e562167accd44d93dbe92af61c65276694a5303d; _gat=1
  * rack.request.query_hash                        : {}
  * rack.request.query_string                      : 
  * rack.run_once                                  : false
  * rack.session                                   : #<ActionDispatch::Request::Session:0x007fbefdead7d8>
  * rack.session.options                           : #<ActionDispatch::Request::Session::Options:0x007fbefdead788>
  * rack.url_scheme                                : http
  * rack.version                                   : [1, 0]
  * warden                                         : Warden::Proxy:70229140010320 @config={:default_scope=>:user, :scope_defaults=>{}, :default_strategies=>{:user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0x007fbefbf59940>}

-------------------------------
Backtrace:
-------------------------------

  app/mutations/gardens/update_garden.rb:34:in `execute'
  app/controllers/api/v1/gardens_controller.rb:33:in `update'