<    March 2017    >
Su Mo Tu We Th Fr Sa  
          1  2  3  4  
 5  6  7  8  9 10 11  
12 13 14 15 16 17 18  
19 20 21 22 23 24 25  
_2_6 27 28 29 30 31
00:02 glennpratt joined
01:50 glennpratt joined
02:41 glennpratt joined
03:11 filterfish joined
03:34 flips_ joined
03:36 flips joined
03:49 JJonah joined
05:43 aidalgol joined
06:31 filterfish joined
10:11 <claw> when i do:
10:11 <claw> DB["select *,
10:11 <claw> (round((idx_blks_hit/(NULLIF(((idx_blks_hit + idx_blks_read)/100.0),0)))))::int as hit_rate
10:11 <claw> from pg_statio_user_indexes order by hit_rate desc;"].all
10:11 <claw> i get hit_rate as BigDecimal where it should be just an integer
10:12 <claw> on postgres it looks totaly fine as i get round numbers
10:12 <claw> i want ruby to take them as integers. anybody knows is my problem with the sql or ruby ?
10:13 <claw> p.s. that query should work on any postgres db
10:15 <claw> round or ::int dont seam to have any effekt on sequel and i dont know if its still Decimal on SQL side
10:16 <claw> well funny: if i remove the round() i get a integer in ruby as expected
10:17 <claw> while its decimal on sql
10:18 <claw> nope sorry its not decimal on sql
10:19 <claw> nevermind i think i did different things on sql ... guess i was blind
10:48 asio joined
10:58 <asio> Hi, I'm having trouble with understanding how to save a new object and its relation, I've a many_to_many relation between User and Roles, now when I create a new user I also want to make sure the user at least have one role too at the same time...how to I make that? code: http://pastebin.com/zSDebLAA
17:38 glennpratt joined
18:08 glennpratt joined
19:01 <jeremyevans> asio: You can use association_pks plugin with the :delay_pks association option
19:03 glennpratt joined
19:57 glennpratt joined
20:02 glennpratt joined
21:50 glennpratt joined
22:45 glennpratt joined
23:07 filterfish joined
23:08 filterfish joined
23:11 saltsa joined
23:27 saltsa joined
23:39 glennpratt joined