You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I didn't find any information about getter for property, that will be populated based on another field, but not through html form. For example, I have models:
# == Schema Information## Table name: users## id :integer not null, primary key# phone :string#classUser < ActiveRecord::Baseend
and
# == Schema Information## Table name: orders## id :integer not null, primary key# user_id :integer#classOrder < ActiveRecord::Basebelongs_to:userend
So i want to set User to the Order model. I can get User model only based on phone field from html form. I tried to do like here:
Hello! I didn't find any information about getter for property, that will be populated based on another field, but not through html form. For example, I have models:
and
So i want to set
User
to theOrder
model. I can getUser
model only based onphone
field from html form. I tried to do like here:But it doesn't work. Also I tried to do it through populator - nothing is happend too.
I found solution, but I think it is not so good:
The text was updated successfully, but these errors were encountered: