« Back to channel list

#RubyOnRails - 18 March 2019

« Back 1 day
[00:06:25] jottr: has joined #RubyOnRails
[00:11:36] mr-spoon: has joined #RubyOnRails
[00:27:23] jottr: has joined #RubyOnRails
[00:47:49] elcontrastador: has joined #RubyOnRails
[00:48:16] jottr: has joined #RubyOnRails
[01:01:51] dylanf: has joined #RubyOnRails
[01:07:28] sevenseacat: has joined #RubyOnRails
[01:09:10] jottr: has joined #RubyOnRails
[01:11:17] s00pcan_: has joined #RubyOnRails
[01:20:05] s00pcan: has joined #RubyOnRails
[01:30:06] jottr: has joined #RubyOnRails
[01:47:59] s00pcan: has joined #RubyOnRails
[01:51:01] jottr: has joined #RubyOnRails
[01:54:04] gambl0re: has joined #RubyOnRails
[02:07:17] mr-spoon: has joined #RubyOnRails
[02:11:56] jottr: has joined #RubyOnRails
[02:20:28] Hackmeifyoucan: has joined #RubyOnRails
[02:22:44] sevenseacat: can always try asking your question
[02:23:39] Hackmeifyoucan: Write a function lucky_sevens?(numbers), which takes in an array of integers and returns true if any three consecutive elements sum to 7
[02:23:44] Hackmeifyoucan: please i have problem
[02:23:54] sevenseacat: sure, what problem are you having
[02:24:04] Hackmeifyoucan: i was able to iterate over my inter
[02:24:10] Hackmeifyoucan: but where i have problem is
[02:24:15] Hackmeifyoucan: the condition part
[02:24:28] Hackmeifyoucan: three consecutive elements
[02:24:52] sevenseacat: how are you doing your iteration?
[02:25:00] Hackmeifyoucan: https://rextester.com/XDA77384
[02:25:21] sevenseacat: thats not a link I'm going to click on
[02:25:43] Hackmeifyoucan: paste the code here
[02:26:27] sevenseacat: a gist on github or something similar would be great
[02:26:29] mangold: has joined #RubyOnRails
[02:26:41] Hackmeifyoucan: def lucky_sevens?(numbers) index = 0 while index <= numbers.length num = numbers[index] if numbers[index] + numbers[index] + numbers[index]== 7 return true end index += 1 end end puts lucky_sevens?([2,1,5,1,0]) puts lucky_sevens?([0,-2,1,8]) puts lucky_sevens?([7,7,7,7]) puts lucky_sevens?([3,4,3,4])
[02:27:40] Hackmeifyoucan: please can u message me private
[02:28:31] sevenseacat: I am not your bro.
[02:28:51] Hackmeifyoucan: bro mean brother man
[02:29:21] Hackmeifyoucan: are u helping me or not
[02:32:51] jottr: has joined #RubyOnRails
[02:34:20] Hackmeifyoucan: is any better person here
[02:53:44] jottr: has joined #RubyOnRails
[02:58:27] duderonomy: has joined #RubyOnRails
[03:01:35] duderonomy: has joined #RubyOnRails
[03:02:36] dylanf: has joined #RubyOnRails
[03:02:39] duderonomy: has joined #RubyOnRails
[03:03:24] duderonomy: has joined #RubyOnRails
[03:04:04] duderonomy: has joined #RubyOnRails
[03:04:47] duderonomy: has joined #RubyOnRails
[03:05:47] duderonomy: has joined #RubyOnRails
[03:07:15] duderonomy: has joined #RubyOnRails
[03:10:22] duderonomy: has joined #RubyOnRails
[03:14:42] jottr: has joined #RubyOnRails
[03:14:48] rascencio: has joined #RubyOnRails
[03:15:23] duderonomy: has joined #RubyOnRails
[03:21:19] dylanf: has joined #RubyOnRails
[03:23:52] pd09041999: has joined #RubyOnRails
[03:52:36] ur5us: has joined #RubyOnRails
[03:55:05] jottr: has joined #RubyOnRails
[04:09:53] braincrash: has joined #RubyOnRails
[04:15:59] jottr: has joined #RubyOnRails
[04:21:55] pd09041999: has joined #RubyOnRails
[04:36:54] jottr: has joined #RubyOnRails
[04:42:22] dylanf: has joined #RubyOnRails
[04:44:25] srinidhi: has joined #RubyOnRails
[04:57:51] jottr: has joined #RubyOnRails
[04:59:14] mangold: has joined #RubyOnRails
[04:59:48] srinidhi: has joined #RubyOnRails
[05:18:46] jottr: has joined #RubyOnRails
[05:54:33] jottr: has joined #RubyOnRails
[05:55:07] srinidhi: has joined #RubyOnRails
[06:20:49] conta: has joined #RubyOnRails
[06:23:40] cfjk: has joined #RubyOnRails
[06:26:51] segy: has joined #RubyOnRails
[06:31:46] jottr: has joined #RubyOnRails
[06:34:32] gambl0re: has joined #RubyOnRails
[06:35:27] gambl0re: has joined #RubyOnRails
[06:37:17] gambl0re: has joined #RubyOnRails
[06:38:40] gambl0re: has joined #RubyOnRails
[06:39:41] gambl0re: has joined #RubyOnRails
[06:41:03] gambl0re: has joined #RubyOnRails
[06:44:24] dylanf: has joined #RubyOnRails
[06:45:41] jottr: has joined #RubyOnRails
[06:54:07] segy: has joined #RubyOnRails
[07:02:26] segy: has joined #RubyOnRails
[07:29:50] DaniG2k: has joined #RubyOnRails
[07:30:18] DaniG2k: I have a model called ContainerTypes that has_many containers, as such:
[07:30:19] DaniG2k: has_many :containers, dependent: :restrict_with_error
[07:30:37] DaniG2k: I'd like to add a migration to ensure the `dependent: :restrict_with_error` gets checked at the database level
[07:30:46] DaniG2k: but I'm not entirely sure how to do so. Any suggestions?
[07:31:49] sevenseacat: if you have a foreign key restraint, you won't be able to delete a record that has other records with FKs pointing to it
[07:32:30] DaniG2k: so I need to add something like `add_foreign_key :containers, :container_types, on_delete: :restrict` ?
[07:32:49] DaniG2k: the Container is the model that has the container_type_id field on it
[07:34:00] sevenseacat: something like that
[07:34:08] DaniG2k: right ok, I'll give it a shot. THanks
[07:44:51] jottr: has joined #RubyOnRails
[07:47:30] tdy1: has joined #RubyOnRails
[07:53:31] tdy1: has joined #RubyOnRails
[07:54:04] za1b1tsu: has joined #RubyOnRails
[07:55:19] Ergo: has joined #RubyOnRails
[07:58:07] cgfbee: has joined #RubyOnRails
[08:05:47] ur5us: has joined #RubyOnRails
[08:18:31] dionysus69: has joined #RubyOnRails
[08:21:11] reber: has joined #RubyOnRails
[08:36:15] srinidhi: has joined #RubyOnRails
[08:48:27] jottr: has joined #RubyOnRails
[08:53:11] dylanf: has joined #RubyOnRails
[08:59:14] tdy1: has joined #RubyOnRails
[09:09:21] jottr: has joined #RubyOnRails
[09:30:15] jottr: has joined #RubyOnRails
[09:36:37] dtzuzu: has joined #RubyOnRails
[09:37:32] DTZUZO: has joined #RubyOnRails
[09:40:44] jottr: has joined #RubyOnRails
[09:42:42] srinidhi: has joined #RubyOnRails
[09:47:51] Spaceman77: has joined #RubyOnRails
[09:47:59] Spaceman77: Hello. I have an input form for two model objects. Let's call them model A and B. I have a requirement that if model A's attribute "Apple" is some value, then model B's attribute "Banana" should be present, otherwise there should be no validation.
[09:48:07] Technodrome: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[09:48:27] Spaceman77: Does rails provide some short-hand approach for condition-based validation?
[09:58:42] jottr: has joined #RubyOnRails
[09:59:21] tbuehlmann: Spaceman77: yes, see https://guides.rubyonrails.org/active_record_validations.html#conditional-validation
[10:06:07] apparition: has joined #RubyOnRails
[10:08:05] tdy1: has joined #RubyOnRails
[10:16:49] mikecmpbll: has joined #RubyOnRails
[10:20:08] mangold: has joined #RubyOnRails
[10:54:06] dylanf: has joined #RubyOnRails
[11:08:06] tdy1: has joined #RubyOnRails
[11:19:37] neozor: has joined #RubyOnRails
[11:25:10] neozor: Hi! this is my first time using an IRC channel, i hope i can collaborate with the community around here. Have a nice day!
[11:27:59] mikecmpbll: neozor : welcome :) looking forward to your input.
[11:45:10] jottr_: has joined #RubyOnRails
[11:49:48] louvre: has joined #RubyOnRails
[12:01:12] MrCrackPotBuilde: has joined #RubyOnRails
[12:02:44] ss942: has joined #RubyOnRails
[12:05:11] MrCrackPotBuilde: has joined #RubyOnRails
[12:05:39] ss942: https://github.com/lapinskik/paginated_documents/blob/master/lib/pagination_documents_patch.rb
[12:05:39] ss942: I'm writing Redmine plugin, and I wonder if when I do pagination in this place[13::], would it change a way things are grouped? I mean would it group all documents, or just all for each page of pagination?
[12:05:39] ss942: If the second answer is closer to true, any tips on how I rewrite this if part "documents.includes(:attachments, :category).to_a" is must have?
[12:14:06] tdy1: has joined #RubyOnRails
[12:17:37] conta1: has joined #RubyOnRails
[12:42:55] dylanf: has joined #RubyOnRails
[12:48:32] tdy1: has joined #RubyOnRails
[12:56:37] pd09041999: has joined #RubyOnRails
[12:58:18] pd09041999: has joined #RubyOnRails
[13:11:50] pokalyis: has joined #RubyOnRails
[13:12:03] pokalyis: Is there any alternative to spork for rails 5? I want to run my tests faster
[13:13:51] s2013: has joined #RubyOnRails
[13:34:08] pokalyis: Is there any reason why spork was abandoned?
[13:36:18] sevenseacat: because it was terrible
[13:37:07] dylanf: has joined #RubyOnRails
[13:38:24] pokalyis: Is there any other solution? Takes over a minute to boot up rails on my 2010 machine
[13:39:29] sevenseacat: good lord, 2010?
[13:39:48] sevenseacat: spring might help, but is also terrible and buggy
[13:39:48] dionysus70: has joined #RubyOnRails
[13:40:36] pokalyis: About to get a new machine as soon as I leave china. Right now I've to use this one
[13:41:07] tdy1: has joined #RubyOnRails
[13:42:00] pokalyis: So it was abandoned b/c computers were getting fast enough?
[13:45:03] sevenseacat: no, because it was buggy and barely worked
[13:45:16] sevenseacat: plus newer versions of ruby were much quicker
[14:16:23] DWSR: has joined #RubyOnRails
[14:18:12] DWSR: Hey all, I'm wondering if someone has a good pattern for this: I'm trying to create a Docker container for my company's Rails 5.0 app that uses Sprockets. I'm trying to precompile all the assets for a particular rev so that they can be included as part of the image. Unfortunately, this requires that I initialize the entire application which means I need a bunch of external services present, massively increasing the complexity of th
[14:18:48] DWSR: Is there any recommendations on a way to solve this? I fell down a Railties rabbit hole yesterday and found that we could create and declare initializer "groups", but didn't find details on that.
[14:30:12] pd09041999: has joined #RubyOnRails
[14:30:51] pokalyis: has joined #RubyOnRails
[14:31:51] pd09041999: has joined #RubyOnRails
[14:39:21] rascencio: has joined #RubyOnRails
[14:39:35] hightower3: has joined #RubyOnRails
[14:43:44] dylanf: has joined #RubyOnRails
[14:53:19] pd09041999: has joined #RubyOnRails
[14:57:35] dylanf: has joined #RubyOnRails
[14:57:47] srinidhi: has joined #RubyOnRails
[15:16:17] Dbugger: has joined #RubyOnRails
[15:20:50] cxl: Hi, I'm a bit lost with Rails 5.2 and React. I have created my app with `rails new myapp --webpack=react` but I don't see any webpack-dev-server in my binstubs dir, or the app/javascript, or the config/webpacker.yml files. Can I 'retrofit' react in my app now?
[15:27:37] reber: has joined #RubyOnRails
[15:33:09] hd1: has joined #RubyOnRails
[15:40:38] duderonomy: has joined #RubyOnRails