« Back to channel list

#RubyOnRails - 12 August 2019

« Back 1 day Forward 1 day »
[00:10:43] skryking: has joined #RubyOnRails
[00:11:26] ebsen: has joined #RubyOnRails
[00:15:31] ElFerna: has joined #RubyOnRails
[00:33:36] ElFerna: has joined #RubyOnRails
[00:47:31] sagax: has joined #RubyOnRails
[00:51:23] ElFerna: has joined #RubyOnRails
[01:12:58] Exuma: has joined #RubyOnRails
[02:41:00] ebsen: has joined #RubyOnRails
[03:01:50] Exuma: has joined #RubyOnRails
[03:15:35] Saukk: has joined #RubyOnRails
[03:27:58] Tempesta: has joined #RubyOnRails
[03:52:39] srinidhi: has joined #RubyOnRails
[03:59:43] ebsen: has joined #RubyOnRails
[04:23:00] vsdfd: has joined #RubyOnRails
[04:24:03] vsdfd: does someone uses the graphql-ruby gem?
[04:30:01] srinidhi: has joined #RubyOnRails
[04:41:39] vsdfd: kurly thx for the reply, but I just figured it out what my bug was lol. I was trying to understand it for a while, to make sure I would not ask something stupid, but I gave up and came here... was making a pastiebin thing with the content of multiple files and just fixed the bug lol. Thx anyway
[04:42:37] MrCrackPot: has joined #RubyOnRails
[05:31:12] hays: has joined #RubyOnRails
[05:31:38] GoldenBear: has joined #RubyOnRails
[05:41:27] alxgsv: has joined #RubyOnRails
[05:51:56] Aherin: has joined #RubyOnRails
[06:34:41] corellian: has joined #RubyOnRails
[06:37:15] lxsameer: has joined #RubyOnRails
[06:51:39] xco: has joined #RubyOnRails
[07:11:05] gambl0re: has joined #RubyOnRails
[07:18:21] MasterAsia: has joined #RubyOnRails
[07:24:48] Milos: has joined #RubyOnRails
[07:45:57] deepredsky: has joined #RubyOnRails
[07:50:46] alxgsv: has joined #RubyOnRails
[08:05:59] defsdoor: has joined #RubyOnRails
[08:06:17] jefffrails35: has joined #RubyOnRails
[08:43:05] defsdoor: has joined #RubyOnRails
[08:43:39] ppl: has joined #RubyOnRails
[08:43:39] Liothen: has joined #RubyOnRails
[08:44:30] GoldenBear: has joined #RubyOnRails
[08:45:41] Milos: has joined #RubyOnRails
[08:46:21] NL3limin4t0r: has joined #RubyOnRails
[08:47:54] G: has joined #RubyOnRails
[08:47:54] CheckYourSix: has joined #RubyOnRails
[08:49:41] FooBarWidget: has joined #RubyOnRails
[09:31:57] alxgsv: has joined #RubyOnRails
[09:38:12] lankanmon: has joined #RubyOnRails
[09:47:02] za1b1tsu: has joined #RubyOnRails
[10:16:32] tsujp: has joined #RubyOnRails
[10:21:25] tsujp: has joined #RubyOnRails
[11:35:12] FastJack: has joined #RubyOnRails
[12:16:50] Aherin: has joined #RubyOnRails
[12:48:19] uks: has joined #RubyOnRails
[13:47:03] Technodrome: has joined #RubyOnRails
[13:50:58] srinidhi: has joined #RubyOnRails
[14:04:55] wallace_mu: has joined #RubyOnRails
[14:20:13] Saukk: has joined #RubyOnRails
[14:30:56] defsdoor: has joined #RubyOnRails
[14:44:18] tf2ftw: has joined #RubyOnRails
[15:06:10] uksio: has joined #RubyOnRails
[15:18:46] ss942: has joined #RubyOnRails
[15:22:12] tf2ftw: has joined #RubyOnRails
[15:25:25] ss942: Hello, I'm trying to pass multiple parameters inside link_to I made same thing copule months ago, and everything was working. I nearly copy pasted my previous code, to next place, and...
[15:25:25] ss942: ...params.merge act in way I don't understand. Previously when I merged something like params.merge(accordion: {sort: {opportunity: (sort != ('n' || sort == 'n-') ? 'n' : 'n-')}}) it worked.
[15:25:25] ss942: Now it makes me crazy because I'm getting 2 different data structures in same request. Somehow I've when I click again in another link the thing I wanted to replace previous value coexist with old one.
[15:25:25] ss942: I have no idea what I'm missing, could anyone tell me what should I do?
[15:34:30] dionysus69: has joined #RubyOnRails
[15:35:14] havenwood: ss942: Show the code and result?
[15:36:20] havenwood: ss942: This will always result in `"n"`, always: ('n' || sort == 'n-')
[15:37:05] havenwood: ss942: So the ternary is always truthy, and it boils down to: sort != "n"
[15:37:22] tf2ftw: has joined #RubyOnRails
[15:38:01] ss942: (17:36:20) havenwood: ss942: This will always result in `"n"`, always: ('n' || sort == 'n-')
[15:38:01] ss942: nah, it's not alway's one of these, somtimes it's 'c' or 'c-' etc.
[15:38:21] havenwood: ss942: My point is, this statement always returns: "n"
[15:38:28] ss942: I fu&&& brackets xD
[15:43:43] ss942: havenwood: oh my god you were totally right
[15:43:53] ss942: I have to take some sleep
[15:44:14] eddof13: has joined #RubyOnRails
[15:44:45] ss942: I can't say how it's possible that I hadn't noticed this
[15:45:07] ss942: Maybe I should try out some books about clean code =|
[15:53:55] Linell: loool it happens
[16:13:23] s00pcan: has joined #RubyOnRails
[16:26:50] istrasci: has joined #RubyOnRails
[16:28:52] istrasci: I'm adding supplementary methods to my model's columns by iterating the *columns_hash*, and defining new methods. I'd like to do this for all my models automatically. How can I do this? I thought about monkey patching ActiveRecord::ModleSchema::ClassMethods since that's where *columns_hash* is defined, but I can't get it to work.
[16:32:00] tdy: has joined #RubyOnRails
[17:08:48] deepredsky: has joined #RubyOnRails
[17:12:42] gambl0re: has joined #RubyOnRails
[17:17:34] conta1: has joined #RubyOnRails
[17:27:38] conta1: has joined #RubyOnRails
[17:30:53] eddof13: has joined #RubyOnRails
[17:39:29] eddof13: has joined #RubyOnRails
[17:39:43] deepredsky: has joined #RubyOnRails
[17:58:43] maxdoubt: has joined #RubyOnRails
[18:00:49] s00pcan: has joined #RubyOnRails
[18:05:53] xco: has joined #RubyOnRails
[18:11:15] amperry: has joined #RubyOnRails
[18:13:55] nate-^: has joined #RubyOnRails
[18:15:31] nate-^: I am running a test that has only a pending within it, and it's coming up as a failure saying it raised no errors.. it's only one test out of the whole suite of pendings. any idea? https://pastebin.com/mY9scr4z is the test, https://pastebin.com/wKhdiwFF is the result. I don't understand why it's actually marked as fixed, It doesn't do anything.
[18:15:56] amperry: Hey folks, I've got a select input that maps to an ActiveRecord relation supers, defined as: "@supers = User.where(role: :supervisor) || {}". I put the '|| {}' to avoid a NoMethodError when the results are empty, but is there a more ActiveRecord/Rails-ish way to do that?
[18:16:27] context: uhh, .where will never return nil ?
[18:17:15] context: you should never see a NoMethodError unless you are calling a method that doesnt exist on AR::Relation
[18:17:16] amperry: context: hrm. I don't know why it would say that, then.
[18:17:40] context: either way, {} is not going to give you what AR::Relation gives you either
[18:18:15] amperry: context: if .where returns a relation with a count of 0, I get that error in the form view that uses it.
[18:18:26] context: how are you using it
[18:18:28] dionysus69: has joined #RubyOnRails
[18:19:06] amperry: context: "<%= f.collection_select(:supervisor, @supers, :id, :name, include_blank: '-- select --') %>"
[18:20:04] context: try adding .all to your @supers = line
[18:20:28] context: id have to see the error, im pretty sure .all just gives you a Relation also
[18:20:49] context: neither .all nor .where give you a object, they give you a Relation || Array
[18:22:13] amperry: lemme see, one moment
[18:23:35] amperry: context: hmmm... adding '.all' seems to have done the trick, but I don't know why.
[18:23:46] context: also you probably want :supervisor_id
[18:25:03] amperry: context: thanks.
[18:35:56] sameerynho: has joined #RubyOnRails
[18:40:36] xco_: has joined #RubyOnRails
[18:47:13] s00pcan: has joined #RubyOnRails
[18:50:20] alxgsv: has joined #RubyOnRails
[18:50:58] gambl0re: has joined #RubyOnRails
[18:55:07] gambl0re: has joined #RubyOnRails
[19:21:50] ss942: > 26 files changed, 575 insertions(+), 189 deletions(-)
[19:22:09] ss942: wrong channel
[19:23:04] Exuma: has joined #RubyOnRails
[19:25:27] s00pcan: has joined #RubyOnRails
[19:28:25] woo: has joined #RubyOnRails
[19:28:25] Linell: looks like you're killing it on insertions though
[19:35:39] woo: I had the following error when attempting to install rails: http://dpaste.com/1MPWDKD.txt
[19:36:04] woo: could somebody help me out?
[19:36:24] gambl0re: has joined #RubyOnRails
[19:37:21] Linell: woo: what happens if you just do `gem install loofah`?
[19:37:38] s00pcan_: has joined #RubyOnRails
[19:38:02] context: loofah installed very first line
[19:39:07] ss942: has left #RubyOnRails: ()
[19:42:06] woo: The error reappeared: https://bpaste.net/raw/2qM9
[19:42:22] Linell: context: you're right, but what's up with the error then?
[19:43:21] eddof13: has joined #RubyOnRails
[19:49:29] s00pcan_: has joined #RubyOnRails
[19:49:44] context: i have no idea :x
[19:50:29] context: this popped up on the googles
[19:50:30] context: https://medium.com/@leog7one/how-to-fix-while-executing-gem-nomethoderror-undefined-method-source-paths-for-eeee8a05d44c
[19:57:41] woo: context: I'll take a look.
[20:25:56] Exuma: has joined #RubyOnRails
[20:29:58] catbusters: has joined #RubyOnRails
[21:07:48] Technodrome: has joined #RubyOnRails
[21:08:40] LtHummus: has joined #RubyOnRails
[21:18:58] eddof13: has joined #RubyOnRails
[21:22:00] gambl0re: has joined #RubyOnRails
[21:47:48] woo: has left #RubyOnRails: ()
[21:50:12] tdy: has joined #RubyOnRails
[21:53:57] tdy1: has joined #RubyOnRails
[21:56:23] tdy2: has joined #RubyOnRails
[22:58:09] tdy: has joined #RubyOnRails
[23:08:07] gambl0re: has joined #RubyOnRails
[23:32:37] xco: has joined #RubyOnRails