mercredi 14 décembre 2016

Rails - Model with attributes, which are not stored in the database

The whole project is build like that: I've got an api which provides data and saves data. Than another Application which converts the data of the data api into "nice and clean" data. and than a frontend, which takes the nice and clean data.

In the Middle part, I got the Model Field. It has multiple Attributes like: id, area, etc. those attributes are also in the schema.rb. Now I also have attributes like: field_nr which are not in the schema.rb. But taken from the api, converted and then printed as json. Now I have to read from the field model the attribute field_nr, which is not in the schema.rb/database. How can I read those attributes?

Thanks for your help & just ask if something is unclear

Aucun commentaire:

Enregistrer un commentaire