I support this and am surprised it isn't already implemented. Public-facing ID's and internal PKs is a pretty common architecture.
On Mon, Aug 5, 2019 at 9:36 AM Nick Rivadeneira < nicholas.rivadene...@gmail.com> wrote: > In our public API, we use a UUID for record identifiers, however our > primary key internally is the default incrementing integer in Postgres. I'd > like to submit a PR that adds an option to `accepts_nested_attributes_for` > that would change which key is being queried on, but doesn't require a > change of `primary_key` in the model. > > Would this get accepted? If so, I'm interested in opinions on a good name > for the option. Could be as simple as `:primary_key`, similar to how > `belongs_to` has an option for `:primary_key` which does not require a > primary key change in the associated model. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-core/ecc0ce4d-cf39-44cc-8c56-67ec27980b13%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-core/ecc0ce4d-cf39-44cc-8c56-67ec27980b13%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-core/CAFDQ6N2y_oj-v%2BeRBss6BH0%3Dgh61SOJbNj8DoJjO9jdwUrkQSw%40mail.gmail.com.