On Monday, August 10, 2020 at 7:05:15 PM UTC-7, [email protected] wrote:
>
> I was running into a problem with a parameter inside a statement.  I took 
> it out and captured it in a variable and it worked.
>
> Can I not use params directly?
>
> res = DR[:tablename].where{{thisfield: params[:thisfieldvalue], status: 
> 'active'}}.to_a
>

If the virtual row block doesn't take an argument, it it instance_execed, 
so params returns a Sequel::SQL::Identifier, and params[:thisfieldvalue] a 
Sequel::SQL::QualifiedIdentifier.  See 
http://sequel.jeremyevans.net/rdoc/files/doc/virtual_rows_rdoc.html#label-Regular+Procs+vs+Instance+Evaled+Procs

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/5156e62e-e838-46b6-a082-0f41a594956fo%40googlegroups.com.

Reply via email to