D
D
Denis Sayfutdinov2019-03-01 16:40:44
MongoDB
Denis Sayfutdinov, 2019-03-01 16:40:44

Adding additional parameters to those passed from the form?

I have parameters -> name and domain passed from the form and I need to send some other data with them, for example timezone (params.require(:project).permit(:name, :domain).merge!(timezone: timezone)). At the same time, it is necessary to describe the timezone in the model. it is not in the table. When adding field :timezone, you need to add include Mongoid::Document and here it appears: ru.mongoid.errors.messages.unknown_attribute.resolution.
Can you tell me what could be the reason? How to solve this problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question