On Thursday, January 11, 2018 at 9:40:44 AM UTC-8, Ivan Nikulin wrote: > > Thanks for your prompt response, Jeremy! > > Please forgive me if I'm missing something obvious here, I'm new to > Sequel, but I don't quite understand `projects[:users]` notation. According > to the docs, Sequel::Dataset#[] method "returns the first record matching > the conditions", so I'm not sure what you meant here, since Sequel adds > users to WHERE clause for me in this case, which of course breaks > everything. As I've mentioned, projects is a dataset, not a table. >
Ah, I see the confusion. My example code does work, but it's true that it would break if you have projects as a local variable in the same scope, which your example code did use. Use Sequel[:projects][:users] or self.projects[:users] instead of projects[:users] in that case. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
