Found solution
Sequel.case(
  { Sequel[:table][:total] > 0 => Sequel[:table][:actual].cast(:float) / 
Sequel[:table][:total] },
  0,
).as(:progress)


пятница, 12 октября 2018 г., 17:29:10 UTC+10 пользователь Artur Trofimov 
написал:
>
> Hello again!
>
> How to convert subject to Sequel code? I found Sequel.case but have no 
> idea how to insert comparison and division in it.
>
>
>

-- 
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.

Reply via email to