Re: Update a model instance with a database function.

2021-12-24 Thread Jeremy Evans
On Fri, Dec 24, 2021 at 9:47 AM Sébastien Lamy wrote: > Hi! > > I have a model "Adherent" correspondint to a table "adherents" in my > Postgres database. In this table, when I create a row from my app, I want > to set the "creator_id" column to same value as id. With Sequel the > folowing intruct

Update a model instance with a database function.

2021-12-24 Thread Sébastien Lamy
Hi! I have a model "Adherent" correspondint to a table "adherents" in my Postgres database. In this table, when I create a row from my app, I want to set the "creator_id" column to same value as id. With Sequel the folowing intruction works ok DB[:adherents].insert(:name => "foo", :creator_id