Problems in rails with non-existent validations

0

Well the problem that I present is that when adding the gem carrierwave-google-storage I am presenting problems throughout the app executing validations (which do not exist) throughout the application and are incongruent

Example:

{
  "user": {
   "first_name": "nombre",
   "user_address_attributes":[
    {"name": "calle falsa123"}
   ]
 }
}

Answer:

"errors": {
 "user_address_attributes.user":[
  {
    "error": "blank"
  }
 ]
}

and so for all the fields that I have.

PS: "these fields are optional and do not have validations"

    
asked by mariovzc 12.07.2018 в 17:16
source

1 answer

0

The problem was that one of the gems we used was not compatible with the rails version and it broke the whole project, the solution was to specify the version of the gem in the gemfile.

Gem: apipie

Before: gem 'apipie-rails'

After: gem 'apipie-rails', '~> 0.4.0'

    
answered by 23.07.2018 / 15:29
source