big-sunset-95620
04/12/2023, 6:18 PMlemon-wall-20836
04/12/2023, 6:23 PMbig-sunset-95620
04/12/2023, 6:23 PMbig-sunset-95620
04/12/2023, 6:24 PMbig-sunset-95620
04/12/2023, 6:24 PMbig-sunset-95620
04/12/2023, 6:24 PMlemon-wall-20836
04/12/2023, 6:24 PMbig-sunset-95620
04/12/2023, 6:26 PMlemon-wall-20836
04/12/2023, 6:26 PMlemon-wall-20836
04/12/2023, 6:27 PMlemon-wall-20836
04/12/2023, 6:27 PMbig-sunset-95620
04/12/2023, 6:27 PMbig-sunset-95620
04/12/2023, 6:28 PMlemon-wall-20836
04/12/2023, 6:28 PMlemon-wall-20836
04/12/2023, 6:29 PMbig-sunset-95620
04/12/2023, 6:29 PMlemon-wall-20836
04/12/2023, 6:29 PMlemon-wall-20836
04/12/2023, 6:30 PMbig-sunset-95620
04/12/2023, 6:30 PMbig-sunset-95620
04/12/2023, 6:30 PMbig-sunset-95620
04/12/2023, 6:31 PMbig-sunset-95620
04/12/2023, 6:32 PMbig-sunset-95620
04/12/2023, 6:33 PMloud-jewelry-99127
04/12/2023, 6:33 PMfield :user, as: :text
on the resource, you should have it too, right?loud-jewelry-99127
04/12/2023, 6:36 PMuser:references
instead user:belongs_to
on the generator works as expected, meanwhile I'm creating a issue and trying to fix that generation issue.big-sunset-95620
04/12/2023, 6:38 PMloud-jewelry-99127
04/12/2023, 6:38 PMbelongs_to
is one of many field types that Avo supports, it purpose is to be used on belongs_to
associations, check https://docs.avohq.io/2.0/associations/belongs_to.htmlbig-sunset-95620
04/12/2023, 6:38 PMlemon-wall-20836
04/12/2023, 6:40 PMbig-sunset-95620
04/12/2023, 6:41 PMloud-jewelry-99127
04/12/2023, 6:46 PMreferences
and belongs_to
are valid commands. You did everything right. To fix the form and the resource you should make sure that the user field in BlogArticleResource
looks similar to field :user, as: :belongs_to
On next model generations, until we fix it, i would suggest to use references
just to assure that Avo resource generator generates the fields correctly.big-sunset-95620
04/12/2023, 6:48 PMbig-sunset-95620
04/12/2023, 6:50 PMbig-sunset-95620
04/12/2023, 6:52 PMloud-jewelry-99127
04/12/2023, 6:52 PMbig-sunset-95620
04/12/2023, 6:52 PMbig-sunset-95620
04/12/2023, 6:53 PMloud-jewelry-99127
04/12/2023, 6:54 PMloud-jewelry-99127
04/12/2023, 6:54 PMbig-sunset-95620
04/12/2023, 6:55 PMloud-jewelry-99127
04/12/2023, 7:00 PMdefault: -> { current_user.id }
big-sunset-95620
04/12/2023, 7:01 PMloud-jewelry-99127
04/12/2023, 7:02 PMloud-jewelry-99127
04/12/2023, 7:03 PMloud-jewelry-99127
04/12/2023, 7:05 PMbig-sunset-95620
04/12/2023, 7:06 PMbig-sunset-95620
04/12/2023, 7:06 PMloud-jewelry-99127
04/12/2023, 7:06 PMbig-sunset-95620
04/14/2023, 7:21 PMbig-sunset-95620
04/14/2023, 7:22 PMbig-sunset-95620
04/14/2023, 7:24 PMlemon-wall-20836
04/15/2023, 5:16 AMlemon-wall-20836
04/15/2023, 5:16 AMlemon-wall-20836
04/15/2023, 5:16 AMlemon-wall-20836
04/15/2023, 5:20 AMlemon-wall-20836
04/15/2023, 5:20 AMlemon-wall-20836
04/15/2023, 5:20 AM