#RubyOnRails - 07 July 2018
« Back 1 day Forward 1 day »
[03:58:05] cjfn: I have a non-rails ruby project but I'm trying to use active support's hash with indifferent access
[07:08:40] yottanami: Is anyway to handle this query using rails orm? `select user_id,sum(score) as rank from leaders group by user_id order by rank desc`
[07:10:29] tbuehlmann: yottanami, sure: Leader.select('user_id, SUM(score) AS rank').group(:user_id).order(rank: :desc)
[07:28:58] yottanami: tbuehlmann, I tried the query but I got this error `ActiveRecord::StatementInvalid (PG::WrongObjectType: ERROR: WITHIN GROUP is required for ordered-set aggregate rank)`
[07:29:26] tbuehlmann: right, try this: Leader.select('user_id, SUM(score) AS rank').group(:user_id).order('SUM(score) DESC')
[07:35:46] yottanami: tbuehlmann, ActiveRecord::StatementInvalid (PG::SyntaxError: ERROR: syntax error at or near "AS")
[14:01:14] Pupeno: I haven't done Rails in quite a while. Back in the day I was using Bootstrap. Is it still a good option with good integration? Or should I explore something else?
[14:12:15] Pupeno: Should I handle it with webpack? This project is not going to use React or any of the other big frameworks for JS. It's still going to have some Javascrip.t
[17:20:39] bonhoeffer: i'm getting the "we're sorry but something went wrong" and not able to see anything in the production log, what should i check?
[23:21:57] Fuzai: how do I add a custom path to views so I can render it? <%= render 'includes/nav' %> works but if I create a modals folder and try <%= render 'modals/example' %> it get an error that it's missing