« Back to channel list

#RubyOnRails - 18 July 2018

« Back 1 day Forward 1 day »
[00:00:00] johndunn: has left #RubyOnRails: ()
[00:09:00] apeiros_: has joined #RubyOnRails
[00:10:00] hfp_work: has joined #RubyOnRails
[00:31:19] Puffball: has joined #RubyOnRails
[00:41:03] alfiemax: has joined #RubyOnRails
[00:42:08] FernandoBasso: has joined #RubyOnRails
[00:49:27] FernandoBasso: has joined #RubyOnRails
[00:49:29] eckhardt_: has joined #RubyOnRails
[01:00:43] bitch: has joined #RubyOnRails
[01:06:35] sevenseacat: has joined #RubyOnRails
[01:12:40] wethu: has joined #RubyOnRails
[01:19:46] moei: has joined #RubyOnRails
[01:34:39] jottr_: has joined #RubyOnRails
[02:02:45] alfiemax: has joined #RubyOnRails
[02:14:16] prettybTech: has joined #RubyOnRails
[02:16:55] wethu: has joined #RubyOnRails
[02:44:17] prettybTech: has joined #RubyOnRails
[02:59:50] prettybT_: has joined #RubyOnRails
[03:05:35] darkhanb: has joined #RubyOnRails
[03:10:00] braincrash: has joined #RubyOnRails
[03:27:26] vedu_: has joined #RubyOnRails
[03:28:37] alfiemax: has joined #RubyOnRails
[03:31:45] Puffball: has joined #RubyOnRails
[03:35:31] jottr_: has joined #RubyOnRails
[03:49:52] atrius: has joined #RubyOnRails
[03:51:25] prettybTech: has joined #RubyOnRails
[03:52:09] vedu_: has joined #RubyOnRails
[03:54:19] xall: has joined #RubyOnRails
[04:12:07] alfiemax: has joined #RubyOnRails
[04:19:13] dionysus69: has joined #RubyOnRails
[04:23:24] dionysus69: has joined #RubyOnRails
[04:25:01] Saukk: has joined #RubyOnRails
[04:26:05] rrichardsr3: has joined #RubyOnRails
[04:32:55] akaiiro: has joined #RubyOnRails
[04:41:55] prettybTech: has joined #RubyOnRails
[05:09:36] dnyy_: has joined #RubyOnRails
[05:10:45] akaiiro: has joined #RubyOnRails
[05:11:34] tdy: has joined #RubyOnRails
[05:19:20] Fire-Dragon-DoL: has joined #RubyOnRails
[05:21:39] Psy-Q: has joined #RubyOnRails
[05:22:31] dionysus69: has joined #RubyOnRails
[05:22:39] bitch: has joined #RubyOnRails
[05:23:16] Mutsuhito: has joined #RubyOnRails
[05:29:37] lomex: has joined #RubyOnRails
[05:35:19] prettybTech: has joined #RubyOnRails
[05:35:19] tpendragon: has joined #RubyOnRails
[05:35:19] npgm: has joined #RubyOnRails
[05:35:19] DylanJ: has joined #RubyOnRails
[05:35:19] ReinH: has joined #RubyOnRails
[05:35:19] pro777: has joined #RubyOnRails
[05:35:19] Kamuela: has joined #RubyOnRails
[05:35:19] Travis-42: has joined #RubyOnRails
[05:35:19] mr-robert: has joined #RubyOnRails
[05:35:19] DukeDave: has joined #RubyOnRails
[05:35:19] tycoon177: has joined #RubyOnRails
[05:35:19] iamdevnul: has joined #RubyOnRails
[05:35:19] FooBarWidget: has joined #RubyOnRails
[05:35:20] matthewd: has joined #RubyOnRails
[05:35:20] phon: has joined #RubyOnRails
[05:35:20] Guest52854: has joined #RubyOnRails
[05:38:33] npgm: has joined #RubyOnRails
[05:39:16] bitch: has joined #RubyOnRails
[05:40:03] Kamuela: has joined #RubyOnRails
[05:40:41] Psy-Q: has joined #RubyOnRails
[05:41:47] prettybT_: has joined #RubyOnRails
[05:54:54] lomex: has joined #RubyOnRails
[06:00:48] lomex: has joined #RubyOnRails
[06:04:12] lomex: has joined #RubyOnRails
[06:19:50] dionysus69: has joined #RubyOnRails
[06:37:05] conta: has joined #RubyOnRails
[06:53:19] alfiemax: has joined #RubyOnRails
[06:58:40] vedu_: has joined #RubyOnRails
[07:11:53] tendencies: has joined #RubyOnRails
[07:16:05] conta: hey folks, I have in my application controller `before_action :authenticate` that sets `Current.user = ...`
[07:16:47] conta: It's nil in views, thought
[07:17:14] conta: is there something else needed to be added? can't figure it out
[07:17:18] sevenseacat: whats the rest of that ... line?
[07:17:33] conta: I also have `models/current.rb` with user setup there
[07:18:25] conta: if authenticated_user = User.find_by(auth_token: cookies.encrypted[:auth_token])
[07:18:25] conta: Current.user = authenticated_user
[07:18:47] conta: if I print Current.user after setting it, it's OK
[07:18:54] conta: in controlller
[07:19:36] sevenseacat: ok, so you've created your own Current class? whats there?
[07:19:38] vedu_: has joined #RubyOnRails
[07:20:23] conta: attribute :user
[07:21:23] sevenseacat: can you gist some of your code? a line here and there doesnt give a good picture of whats going on
[07:21:43] conta: yep, sure, gimme sec
[07:25:30] conta: https://gist.github.com/hovancik/d1e8fe96dc6f1423ec069d7c9c725146
[07:28:16] sevenseacat: oh its that rails global thing,=
[07:28:42] conta: yeah, I'm trying to use it
[07:28:43] conta: http://edgeapi.rubyonrails.org/classes/ActiveSupport/CurrentAttributes.html
[07:29:01] conta: form what I gathered by doing this, it should be avail everywhere
[07:29:02] macxim: has joined #RubyOnRails
[07:29:43] sevenseacat: seems like it should be, for better or worse
[07:30:31] sevenseacat: (https://ryanbigg.com/2017/06/current-considered-harmful for some reasoning)
[07:34:01] conta: yeah, I've read that and I mostly agree but I wanted to try as probably people will start using ut
[07:35:23] conta: I'll go back to the good old current_user
[07:37:15] jottr_: has joined #RubyOnRails
[07:37:37] DTZUZO: has joined #RubyOnRails
[07:38:57] Dbugger: has joined #RubyOnRails
[07:39:58] srinidhi: has joined #RubyOnRails
[07:44:21] Radar: [17:34:01] <conta> yeah, I've read that and I mostly agree but I wanted to try as probably people will start using ut
[07:44:24] Radar: I sure hope not.
[07:44:56] Radar: I also talk about Current here: https://ryanbigg.com/2018/03/on-writing-software-well-2-a-review
[07:44:59] sevenseacat: wow that was a year ago
[07:45:03] sevenseacat: that first blog post
[07:45:03] Radar: After 5:55.
[07:45:11] Radar: yeah it was a long time ago now
[07:47:36] deathwishdave: has joined #RubyOnRails
[07:50:15] psychoslave: has joined #RubyOnRails
[08:00:27] mikecmpbll: has joined #RubyOnRails
[08:01:11] conta: has joined #RubyOnRails
[08:02:04] mikecmpbll: has joined #RubyOnRails
[08:09:14] alfiemax: has joined #RubyOnRails
[08:09:58] alireza: has joined #RubyOnRails
[08:10:17] alireza: i have one to many association
[08:10:30] alireza: where Conversation -<- Messsage(s)
[08:10:49] alireza: Message(s) has a message_type enum
[08:11:05] alireza: i like to get conversations that their **last** messages are specific types
[08:11:15] alireza: how could i do that in activerecord way?
[08:11:43] alireza: we came up with ROW_NUMBER() caluse in SQL
[08:11:58] alireza: but want to know is there an activerecord way?
[08:34:01] mikecmpbll: has joined #RubyOnRails
[08:44:08] alfiemax: has joined #RubyOnRails
[08:45:30] srinidhi: has joined #RubyOnRails
[08:57:57] schneider: has joined #RubyOnRails
[09:01:48] alfiemax: has joined #RubyOnRails
[09:02:59] mikecmpb_: has joined #RubyOnRails
[09:05:04] psychoslave: has joined #RubyOnRails
[09:31:11] alfiemax: has joined #RubyOnRails
[09:38:07] jottr_: has joined #RubyOnRails
[09:54:28] alfiemax: has joined #RubyOnRails
[10:19:46] jammanbo: has joined #RubyOnRails
[10:23:21] Ergo: has joined #RubyOnRails
[10:30:30] lxsameer: has joined #RubyOnRails
[10:34:58] Technodrome: has joined #RubyOnRails
[10:50:39] Ergo: has joined #RubyOnRails
[10:58:01] conta: has joined #RubyOnRails
[10:59:38] Radar: GOOD EVENING
[11:00:47] sevenseacat: hell of an entrance
[11:10:24] desperek: has joined #RubyOnRails
[11:10:42] Radar: how are we all this fine day?
[11:10:45] Radar: or what is left of it
[11:19:21] alfiemax: has joined #RubyOnRails
[11:21:02] Technodrome: has joined #RubyOnRails
[11:22:30] ariejan: has joined #RubyOnRails
[11:39:00] jottr_: has joined #RubyOnRails
[11:43:01] dionysus69: has joined #RubyOnRails
[11:47:47] psychoslave: has joined #RubyOnRails
[11:50:02] psychoslave_: has joined #RubyOnRails
[11:58:02] alfiemax: has joined #RubyOnRails
[12:07:50] moei: has joined #RubyOnRails
[12:08:53] GodFather: has joined #RubyOnRails
[12:18:42] Ergo: has joined #RubyOnRails
[12:22:01] fmcgeough: has joined #RubyOnRails
[12:28:09] Puffball: has joined #RubyOnRails
[12:51:53] nzst: has joined #RubyOnRails
[12:55:14] GodFather: has joined #RubyOnRails
[13:08:12] psychoslave: has joined #RubyOnRails
[13:09:55] srinidhi: has joined #RubyOnRails
[13:32:35] Tempesta: has joined #RubyOnRails
[13:35:02] daemonwrangler: has joined #RubyOnRails
[13:39:52] jottr_: has joined #RubyOnRails
[13:41:12] Sylario: has joined #RubyOnRails
[14:10:11] GodFather: has joined #RubyOnRails
[14:15:42] Technodrome: has joined #RubyOnRails
[14:16:13] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")
[14:28:22] akaiiro: has joined #RubyOnRails
[14:39:57] alfiemax: has joined #RubyOnRails
[14:40:46] srinidhi: has joined #RubyOnRails
[14:46:31] Inside: So - I'm still having a problem with like enums
[14:47:25] lomex: has joined #RubyOnRails
[14:47:27] Inside: Like - I need a column on a model that stores information about the type of that model (ie: new, used, etc)
[14:48:24] Inside: I could have a model_type table which enumerates all the possible types
[14:48:27] Inside: or I could store them as constants
[14:48:45] Inside: (Or use an enum field)
[14:50:09] nzst: what's the issue?
[14:50:25] Inside: I'm not sure which to do
[14:50:30] Inside: I've actually got a mixture of all 3 in my code base
[14:52:33] Inside: Having a ModelType in the database is great if people are looking just at the data - the data is "self describing"
[14:53:10] Inside: but then the code needs to have magic numbers in that MUST correspond to the ID in the database (and if it gets deleted... oopaa)
[14:55:52] JJonah: has joined #RubyOnRails
[14:59:44] jottr_: has joined #RubyOnRails
[15:02:17] tdy: has joined #RubyOnRails
[15:08:32] alfiemax: has joined #RubyOnRails
[15:12:15] s2013: has joined #RubyOnRails
[15:13:55] schneider: has joined #RubyOnRails
[15:14:10] s2013: ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage anyone ever got that issue?
[15:14:25] s2013: im guessing it has something to do with the new 5.2 secret or whatever
[15:17:40] chouhoulis: has joined #RubyOnRails
[15:20:58] prettybTech: has joined #RubyOnRails
[15:30:02] jottr_: has joined #RubyOnRails
[15:31:21] vedu_: has joined #RubyOnRails
[15:46:13] yehowyada: has joined #RubyOnRails
[15:51:52] leequarella: has joined #RubyOnRails
[15:52:25] GodFather: has joined #RubyOnRails
[15:52:38] s2013: has joined #RubyOnRails
[15:58:23] jrm: has joined #RubyOnRails
[16:09:03] jcarl43: has joined #RubyOnRails
[16:10:27] dtzuzu: has joined #RubyOnRails
[16:21:19] conta: has joined #RubyOnRails
[16:24:55] s2013: has joined #RubyOnRails
[16:29:08] Inside: The enumerated_type gem seems to address all my enumeration conundrums really well
[16:30:16] Inside: Well, except the self-descriptive data part
[16:30:31] Inside: since some of my users read raw data from the db into spreadsheet
[16:34:59] tdy: has joined #RubyOnRails
[16:35:28] vedu_: has joined #RubyOnRails
[16:35:58] vedu_: has joined #RubyOnRails
[16:36:51] Technodrome: has joined #RubyOnRails
[16:37:12] apeiros_: has joined #RubyOnRails
[16:39:29] srinidhi: has joined #RubyOnRails
[16:40:23] lexileo: has joined #RubyOnRails
[16:45:39] dionysus69: has joined #RubyOnRails
[16:51:10] s2013: anyone here deploy to digitalocean ?
[16:51:15] s2013: how do you set up your database.yml
[16:53:58] pankaj: has joined #RubyOnRails
[16:55:44] pankaj: I have generate a rails app using postgresql as database. Now, the cluster is locally generated in place of that administrated by postgresql at the start. So, I have changed unix socket directory, port number, user and password that I have to specify before starting psql. Now, how do I configure database.yml file so that it can connect to the postgresql server.
[17:02:08] dviola: has joined #RubyOnRails
[17:09:30] IanMalcolm: has joined #RubyOnRails
[17:19:38] sameerynho: has joined #RubyOnRails
[17:20:50] GodFather: has joined #RubyOnRails
[17:28:51] pankaj: has joined #RubyOnRails
[17:30:30] cagomez: has joined #RubyOnRails
[17:32:38] s2013: has joined #RubyOnRails
[17:32:47] prettybTech: has joined #RubyOnRails
[17:39:17] prettybTech: has joined #RubyOnRails
[17:39:29] akaiiro: has joined #RubyOnRails
[17:40:52] HeyoRockbreaker: has joined #RubyOnRails
[17:41:56] HeyoRockbreaker: Hey, anyone have a second to help me find out why my tests won't display my failure messages?
[17:43:00] leequarella: While trying `@my_obj.avatar.attach(attachement_info)` and it's attempting to talk to redis at localhost. So I think my main question is: where do you set the redis connection info for active storage?
[17:43:41] leequarella: and also, why is that trying to use redis at all? I don't think I did any explicit `perform_later` stuff anywhere
[17:45:27] mikhael_k33hl: has joined #RubyOnRails
[17:45:54] mikhael_k33hl: there's this method gibbon.lists(list_id).members.create(body: {email_address: "foo@bar.com", status: "subscribed", merge_fields: {FNAME: "First Name", LNAME: "Last Name"}}). However, I want to iterate through a hash to pass in the key and value of merge_fields, how do I do that?
[17:47:58] mikhael_k33hl: I'm getting an error: https://gist.github.com/marzdgzmn/bfa544acbeaa96523ee82a7b2fc19bbe
[17:48:17] beowuff: has joined #RubyOnRails
[17:49:07] Andr3as: mikhael_k33hl: in what line does it say the error is?
[17:49:50] mikhael_k33hl: Andr3as: the line with the keyword 'end'
[17:50:24] Andr3as: and the loop does work on the consule?
[17:50:29] Andr3as: on its own
[17:51:21] HeyoRockbreaker: https://gist.github.com/HeyoRockbreaker/4b92ca8ab5a3b65f03d659ef5c19d7a7
[17:51:30] HeyoRockbreaker: Here's a jist of my issue with testing if anyone has a second
[17:52:23] mikhael_k33hl: Andr3as: https://gist.github.com/marzdgzmn/523890b44862bb3a21dd92a5b587bbec is working though
[17:53:00] HeyoRockbreaker: https://gist.github.com/HeyoRockbreaker/bc4e928441f529ffb802fcccb433d7ea Here's my test suite message
[17:53:26] Andr3as: can you inspect the customer and update the gist?
[18:08:02] schneider: has joined #RubyOnRails
[18:08:54] mikhael_k33hl: Andr3as: bit a hard to do that as it is an API, let me try though
[18:09:28] Andr3as: maybe try the "better_errors" gem? its pretty awesome
[18:12:29] Technodrome: has joined #RubyOnRails
[18:16:06] dionysus69: has joined #RubyOnRails
[18:20:21] mikecmpbll: has joined #RubyOnRails
[18:20:39] NoGodDamnIdea: has joined #RubyOnRails
[18:26:13] snickers: has joined #RubyOnRails
[18:34:24] blackcross_: has joined #RubyOnRails
[18:51:23] Saukk: has joined #RubyOnRails
[18:54:00] psychoslave: has joined #RubyOnRails
[19:13:19] Technodrome: has joined #RubyOnRails
[19:16:31] s2013: has joined #RubyOnRails
[19:26:11] akaiiro: has joined #RubyOnRails
[19:30:27] mikhael_k33hl: Andr3as: thanks, I'll give it a try
[19:33:25] eckhardt_: has joined #RubyOnRails
[19:39:46] uks: has joined #RubyOnRails
[19:42:29] prettybTech: has joined #RubyOnRails
[19:44:56] johndunn: has joined #RubyOnRails
[19:50:54] tdy: has joined #RubyOnRails
[20:02:58] s2013: Could not find rake-12.3.1 in any of the sources i keep getting that on prod
[20:03:06] s2013: but i have rake 12.3..1 installed
[20:03:13] s2013: rake, version 12.3.1
[20:03:17] s2013: current# rake --version
[20:03:17] s2013: rake, version 12.3.1
[20:06:55] blackcross: has joined #RubyOnRails
[20:07:00] jottr: has joined #RubyOnRails
[20:10:14] samosaphile: has joined #RubyOnRails
[20:11:10] cagomez: has joined #RubyOnRails
[20:15:22] Inside: that's because production might be running at a different ruby version
[20:15:26] reber: has joined #RubyOnRails
[20:15:56] Inside: where are you deploying production to?
[20:18:02] lexileo: has joined #RubyOnRails
[20:26:06] s2013: has joined #RubyOnRails
[20:49:15] stephenmac7: has joined #RubyOnRails
[20:49:37] tycoon177: does any tool exist to build prawn pdf reports graphically?
[20:50:07] tycoon177: i haven't found one, but it'd be nice to be able to drag instead of working in inches and such
[20:52:25] stephenmac7: Hey, I'm getting an error when trying to use respond_to. I am trying to upgrade to Rails 5. Code: https://hastebin.com/rufigimoli.rb Error: https://hastebin.com/umihocodof.coffeescript
[20:56:46] za1b1tsu: has joined #RubyOnRails
[21:12:48] stephenmac7: Never mind. I've figured out what's going on. Thank you all anyway.
[21:15:04] prettybTech: has joined #RubyOnRails
[21:17:42] ur5us: has joined #RubyOnRails
[21:23:16] dviola: has joined #RubyOnRails
[21:28:48] wethu: has joined #RubyOnRails
[21:42:50] Dbugger: has joined #RubyOnRails
[21:43:00] johndunn: has left #RubyOnRails: ()
[21:57:35] IanMalcolm: has joined #RubyOnRails
[22:02:43] za1b1tsu: has joined #RubyOnRails
[22:04:58] moei: has joined #RubyOnRails
[22:09:42] ur5us: has joined #RubyOnRails
[22:12:14] chouhoulis: has joined #RubyOnRails
[22:12:45] Inside: tycoon177: nope, inches all the way down :/
[22:13:20] Inside: tycoon177: Honestly I just take an 8.5x11 printed with a 0.25grid, then sketch out what I want my forms to look like and punch in the coordinates
[22:17:44] chouhoulis: has joined #RubyOnRails
[22:19:34] tycoon177: That's not a bad idea Inside. I'll give that a shot next time I build a report.
[22:24:24] chouhoulis: has joined #RubyOnRails
[22:30:51] chouhoulis: has joined #RubyOnRails
[22:37:32] chouhoulis: has joined #RubyOnRails
[22:45:15] chouhoulis: has joined #RubyOnRails
[22:49:15] wethu: has joined #RubyOnRails
[22:51:53] chouhoulis: has joined #RubyOnRails
[22:59:32] chouhoulis: has joined #RubyOnRails
[23:03:33] IanMalcolm: has joined #RubyOnRails
[23:06:10] chouhoulis: has joined #RubyOnRails
[23:07:36] prettybTech: has joined #RubyOnRails
[23:12:40] chouhoulis: has joined #RubyOnRails
[23:13:20] orbyt_: has joined #RubyOnRails
[23:16:13] weaksauce: has joined #RubyOnRails
[23:19:25] chouhoulis: has joined #RubyOnRails
[23:20:48] Technodrome: has joined #RubyOnRails
[23:21:20] macxim: has joined #RubyOnRails
[23:24:58] cagomez: has joined #RubyOnRails
[23:25:53] chouhoulis: has joined #RubyOnRails
[23:31:30] chouhoulis: has joined #RubyOnRails
[23:32:15] Puffball: has joined #RubyOnRails
[23:39:06] chouhoulis: has joined #RubyOnRails
[23:44:44] chouhoulis: has joined #RubyOnRails
[23:45:05] akaiiro: has joined #RubyOnRails
[23:47:11] prettybTech: has joined #RubyOnRails
[23:50:32] orbyt_: has joined #RubyOnRails
[23:51:19] chouhoulis: has joined #RubyOnRails
[23:52:45] Xiti: has joined #RubyOnRails
[23:54:58] dviola: has joined #RubyOnRails
[23:56:44] chouhoulis: has joined #RubyOnRails