« Back to channel list

#RubyOnRails - 09 April 2018

« Back 1 day Forward 1 day »
[00:07:14] schneider: has joined #RubyOnRails
[00:16:29] schneider: has joined #RubyOnRails
[00:23:17] cstls: has joined #RubyOnRails
[00:25:41] schneider: has joined #RubyOnRails
[00:34:46] schneider: has joined #RubyOnRails
[00:42:52] Auger: has joined #RubyOnRails
[00:43:06] Auger: hello, i'm trying to execute a query on the rails console
[00:43:18] Auger: how do i see all of a model
[00:43:38] fryguy: Model.all
[00:43:46] Auger: for example, Model.select('title')
[00:43:52] schneider: has joined #RubyOnRails
[00:44:01] Auger: how do i untruncate the results?
[00:44:11] Auger: it always limits me to 10
[00:45:31] roshanavand: has joined #RubyOnRails
[00:45:32] Auger: sorry, all rows for a model
[00:46:52] fryguy: `select` doesn't default to 10, so you have something in your model doing that
[00:48:10] Auger: weird, ok thanks
[00:48:19] Auger: i'm using .offset() to peruse the records
[00:48:34] Auger: been sent in to do some nonsense on the prod database and i don't know ruby >.<
[00:50:14] _3dwardsharp: maybe .unscope(:limit) ?
[00:53:00] schneider: has joined #RubyOnRails
[01:02:13] schneider: has joined #RubyOnRails
[01:11:19] schneider: has joined #RubyOnRails
[01:19:06] yukai: has joined #RubyOnRails
[01:20:27] schneider: has joined #RubyOnRails
[01:29:37] schneider: has joined #RubyOnRails
[01:38:42] schneider: has joined #RubyOnRails
[01:47:52] schneider: has joined #RubyOnRails
[01:56:59] schneider: has joined #RubyOnRails
[02:00:02] Auger: thank you for the help :)
[02:04:09] cstls: has joined #RubyOnRails
[02:06:03] schneider: has joined #RubyOnRails
[02:13:39] agent_white: has joined #RubyOnRails
[02:17:08] s2013: has joined #RubyOnRails
[02:19:41] greengriminal: has joined #RubyOnRails
[02:20:08] schneider: has joined #RubyOnRails
[02:22:07] ur5us: has joined #RubyOnRails
[02:29:19] schneider: has joined #RubyOnRails
[02:36:23] ur5us: has joined #RubyOnRails
[02:37:04] Saukk: has joined #RubyOnRails
[02:38:28] schneider: has joined #RubyOnRails
[02:47:38] schneider: has joined #RubyOnRails
[02:56:45] schneider: has joined #RubyOnRails
[03:01:35] _3dwardsharp: has joined #RubyOnRails
[03:05:52] schneider: has joined #RubyOnRails
[03:15:02] schneider: has joined #RubyOnRails
[03:16:42] NorthLumberJack: has joined #RubyOnRails
[03:17:50] NorthLumberJack: hey guys, best way to check if object is a active record collection?
[03:19:08] NorthLumberJack: .is_a?(ActiveRecord::Relation)
[03:20:16] Radar: NorthLumberJack: !why
[03:20:16] helpa: NorthLumberJack: Please explain why you are trying to do this so we can better understand you.
[03:21:08] NorthLumberJack: helpa: Just so I can raise an error for my method if the param is not a collection
[03:24:06] schneider: has joined #RubyOnRails
[03:31:53] schneider: has joined #RubyOnRails
[03:40:58] schneider: has joined #RubyOnRails
[03:44:58] Puffball: has joined #RubyOnRails
[03:50:07] schneider: has joined #RubyOnRails
[03:59:15] schneider: has joined #RubyOnRails
[04:00:13] s2013: has joined #RubyOnRails
[04:06:51] kapil___: has joined #RubyOnRails
[04:08:22] schneider: has joined #RubyOnRails
[04:08:41] one_zero: has joined #RubyOnRails
[04:17:29] schneider: has joined #RubyOnRails
[04:20:23] tdy: has joined #RubyOnRails
[04:26:35] schneider: has joined #RubyOnRails
[04:35:46] schneider: has joined #RubyOnRails
[04:39:48] jackhum: has joined #RubyOnRails
[04:44:51] schneider: has joined #RubyOnRails
[04:54:02] schneider: has joined #RubyOnRails
[05:02:46] safetypin: has joined #RubyOnRails
[05:03:12] schneider: has joined #RubyOnRails
[05:10:38] reber: has joined #RubyOnRails
[05:12:18] schneider: has joined #RubyOnRails
[05:20:15] fragamus: has joined #RubyOnRails
[05:21:27] schneider: has joined #RubyOnRails
[05:30:44] schneider: has joined #RubyOnRails
[05:39:07] ferr1: has joined #RubyOnRails
[05:39:43] schneider: has joined #RubyOnRails
[05:48:32] one_zero: has joined #RubyOnRails
[05:48:52] schneider: has joined #RubyOnRails
[05:51:00] KeyJoo: has joined #RubyOnRails
[05:52:12] jcarl43: has joined #RubyOnRails
[05:53:55] mtkd: has joined #RubyOnRails
[05:57:59] schneider: has joined #RubyOnRails
[06:02:11] cam27: has joined #RubyOnRails
[06:07:04] schneider: has joined #RubyOnRails
[06:16:15] schneider: has joined #RubyOnRails
[06:25:23] schneider: has joined #RubyOnRails
[06:34:31] schneider: has joined #RubyOnRails
[06:42:17] ferr1: has left #RubyOnRails: ("WeeChat 2.1")
[06:43:41] schneider: has joined #RubyOnRails
[06:45:07] segy_: has joined #RubyOnRails
[06:50:12] LateralO1: has joined #RubyOnRails
[06:52:45] schneider: has joined #RubyOnRails
[07:01:57] schneider: has joined #RubyOnRails
[07:11:13] schneider: has joined #RubyOnRails
[07:16:00] blackmesa: has joined #RubyOnRails
[07:20:20] schneider: has joined #RubyOnRails
[07:29:30] schneider: has joined #RubyOnRails
[07:30:46] drale2k_: has joined #RubyOnRails
[07:32:21] uks: has joined #RubyOnRails
[07:35:28] Andr3as: has joined #RubyOnRails
[07:38:25] defsdoor: has joined #RubyOnRails
[07:42:54] schneider: has joined #RubyOnRails
[07:45:34] cam27: has joined #RubyOnRails
[07:48:14] elcms: has joined #RubyOnRails
[08:06:34] mikecmpbll: has joined #RubyOnRails
[08:08:52] srinidhi: has joined #RubyOnRails
[08:10:00] alfiemax: has joined #RubyOnRails
[08:30:45] marr: has joined #RubyOnRails
[08:50:57] LateralOctober: has joined #RubyOnRails
[08:54:17] srinidhi: has joined #RubyOnRails
[09:03:43] mikecmpb_: has joined #RubyOnRails
[09:06:10] mtkd: has joined #RubyOnRails
[09:08:07] ur5us: has joined #RubyOnRails
[09:13:01] ^mtkd: has joined #RubyOnRails
[09:17:54] schneider: has joined #RubyOnRails
[09:26:20] EXCHGR: has joined #RubyOnRails
[09:27:11] schneider: has joined #RubyOnRails
[09:29:56] alfiemax: has joined #RubyOnRails
[09:34:07] xuyuheng: has joined #RubyOnRails
[09:34:59] xuyuheng: has joined #RubyOnRails
[09:36:17] schneider: has joined #RubyOnRails
[09:45:28] schneider: has joined #RubyOnRails
[09:45:41] alfiemax: has joined #RubyOnRails
[09:59:30] schneider: has joined #RubyOnRails
[10:08:52] schneider: has joined #RubyOnRails
[10:10:37] Fernando-Basso: has joined #RubyOnRails
[10:11:06] j0bk: has joined #RubyOnRails
[10:15:29] j0bk: Hi, can someone help me? https://stackoverflow.com/questions/49730312/rails-circular-and-dynamic-nested-form
[10:17:47] dminuoso: What is a circular dynamic nested form?
[10:17:59] schneider: has joined #RubyOnRails
[10:19:32] j0bk: dynamic add / remove
[10:19:39] Sylario: has joined #RubyOnRails
[10:20:17] j0bk: circular is like Category belongs_to :category and has_many :categories
[10:27:09] schneider: has joined #RubyOnRails
[10:33:02] srinidhi: has joined #RubyOnRails
[10:33:08] blackmesa: has joined #RubyOnRails
[10:33:10] Ergo: has joined #RubyOnRails
[10:36:16] schneider: has joined #RubyOnRails
[10:38:13] blackchalk: has joined #RubyOnRails
[10:45:26] schneider: has joined #RubyOnRails
[10:46:42] blackmesa: has joined #RubyOnRails
[10:53:07] schneider: has joined #RubyOnRails
[10:58:21] kurko_: has joined #RubyOnRails
[11:12:29] schneider: has joined #RubyOnRails
[11:16:08] Cavallari: has joined #RubyOnRails
[11:19:58] schneider: has joined #RubyOnRails
[11:29:08] schneider: has joined #RubyOnRails
[11:35:50] apparition: has joined #RubyOnRails
[11:38:14] schneider: has joined #RubyOnRails
[11:38:49] srinidhi: has joined #RubyOnRails
[11:40:19] DrYockel1: has joined #RubyOnRails
[11:42:57] LateralOctober: has joined #RubyOnRails
[11:47:32] tcopeland: has joined #RubyOnRails
[12:01:17] duderonomy: has joined #RubyOnRails
[12:31:32] jackhum: has joined #RubyOnRails
[12:35:02] alfiemax: has joined #RubyOnRails
[12:37:31] NL3limin4t0r: has joined #RubyOnRails
[12:42:00] thesubr00t: has joined #RubyOnRails
[12:42:16] dminuoso: Hi guyette.
[12:42:34] thesubr00t: Is there a helper to get the URI pattern for a specific path ?
[12:42:49] dminuoso: thesubr00t: `rails routes`
[12:43:05] dminuoso: thesubr00t: or do you need it programmatically?
[12:43:31] thesubr00t: dminuoso, yes programmatically
[12:44:12] thesubr00t: I need to send the pattern to a frontend client in a json response
[12:44:32] dminuoso: thesubr00t: Can you be a bit more specific?
[12:44:37] dminuoso: thesubr00t: Is JSON:API enough?
[12:45:43] thesubr00t: dminuoso, I just need a helper like `something_path` to return the pattern, ex (users/:id)
[12:47:24] dminuoso: thesubr00t: Do you need it once or is a quick and dirty hack enough?
[12:48:43] thesubr00t: dminuoso, well I'm sending a bunch of urls pattern to the front, so basically a clean approach is what I'm looking for.
[12:49:09] thesubr00t: dminuoso, but tell me what you have in mind ;-)
[12:51:17] dminuoso: thesubr00t: Well nevermind that then. Im not familiar with any public API for this.
[12:51:20] dminuoso: What rails version are you using?
[12:53:40] workmad3: has joined #RubyOnRails
[12:56:33] dminuoso: thesubr00t: This will take a moment.
[12:57:03] thesubr00t: dminuoso, Okay thanks ! :-)
[12:57:30] dionysus69: has joined #RubyOnRails
[13:02:02] mtkd: has joined #RubyOnRails
[13:07:59] tjbp: has joined #RubyOnRails
[13:13:39] dminuoso: thesubr00t: First get the ActionDispatch::Journey::Route
[13:13:52] dminuoso: Use AD::J::R#path to get some ActionDispatch::Journey::Path
[13:14:19] dminuoso: Then use AD::J::P#spec with to_s
[13:14:21] dminuoso: so for example
[13:14:23] Andr3as: maybe this does the trick for rails 4 too? https://stackoverflow.com/questions/21171524/rails-3-get-route-pattern-for-current-controller-action
[13:14:45] alfiemax: has joined #RubyOnRails
[13:14:45] dminuoso: thesubr00t: route = Rails.application.routes.routes.to_a.sample; route.path.spec.to_s
[13:15:02] dminuoso: thesubr00t: That's how the `rails routes` command does it.
[13:15:20] dminuoso: Andr3as: Yeah that looks quite similar.
[13:15:27] alfiemax_: has joined #RubyOnRails
[13:15:29] dminuoso: You dont need to go down the `recognize` hack though
[13:15:48] thesubr00t: dminuoso, Thank you mate ! That will point me to the right direction
[13:15:55] dminuoso: thesubr00t: Basically just go through this for more details
[13:16:03] dminuoso: thesubr00t: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/inspector.rb
[13:16:46] dminuoso: thesubr00t: In particular the `collection_routes` should be of interest for you
[13:17:03] dminuoso: err collect_routes
[13:18:05] dminuoso: thesubr00t: Just keep in mind that none of this is considered public API. Rails minor or patch version changes could at any time break this.
[13:21:25] duderonomy: has joined #RubyOnRails
[13:33:14] arBmind: has joined #RubyOnRails
[13:38:24] apeiros: has joined #RubyOnRails
[13:41:05] safetypin: has joined #RubyOnRails
[13:41:14] tcopeland: has joined #RubyOnRails
[13:42:08] jackhum: has joined #RubyOnRails
[13:43:04] chouhoulis: has joined #RubyOnRails
[13:52:13] schneider: has joined #RubyOnRails
[13:59:33] blackmesa: has joined #RubyOnRails
[14:02:35] alfiemax: has joined #RubyOnRails
[14:03:13] orbyt_: has joined #RubyOnRails
[14:03:30] rfoust: has joined #RubyOnRails
[14:16:04] MrCrackPotBuilde: has joined #RubyOnRails
[14:17:04] kapil___: has joined #RubyOnRails
[14:17:31] MrCrackPotBuilde: how would you add an image from a hashed array to an image_tag i either get image not in asset pipeline or nill class for method error
[14:17:44] MrCrackPotBuilde: <%= image_tag @output['products'][0]['images'][0]%>
[14:18:12] MrCrackPotBuilde: when i use the rails console i get the https url for the image but when i add to the tag i get errors only
[14:22:46] Saukk: has joined #RubyOnRails
[14:32:19] tbuehlmann: MrCrackPotBuilde: check what @output is exactly
[14:43:27] drale2k_: has joined #RubyOnRails
[14:43:33] walidvb: has joined #RubyOnRails
[14:43:50] walidvb: I'm trying to test some caching with rspec and jbuilder
[14:45:11] walidvb: i set a cache key to a static string for testing, and expect the response from the server to be the exact same. Still, it seems like on the 2nd request the view is still rendered.
[14:53:19] jaffachief: has joined #RubyOnRails
[14:58:28] apeiros: has joined #RubyOnRails
[15:05:26] Cavallari: has joined #RubyOnRails
[15:09:09] cschneid_: has joined #RubyOnRails
[15:14:51] alfiemax: has joined #RubyOnRails
[15:16:52] ellcs: has joined #RubyOnRails
[15:17:00] s2013: has joined #RubyOnRails
[15:18:56] GodFather: has joined #RubyOnRails
[15:27:18] ams__: has joined #RubyOnRails
[15:30:26] troys: has joined #RubyOnRails
[15:40:38] KeyJoo: has joined #RubyOnRails
[15:42:55] ebsen: has joined #RubyOnRails
[15:43:16] safetypin: has joined #RubyOnRails
[15:50:11] AzaToth: has joined #RubyOnRails
[15:55:19] cagomez: has joined #RubyOnRails
[15:58:15] cam27: has joined #RubyOnRails
[15:58:37] cagomez: has joined #RubyOnRails
[15:59:22] jcarl43: has joined #RubyOnRails
[15:59:31] MrPunkin: has joined #RubyOnRails
[16:05:20] blackmesa: has joined #RubyOnRails
[16:13:56] darkhanb: has joined #RubyOnRails
[16:14:59] schneider: has joined #RubyOnRails
[16:15:28] one_zero: has joined #RubyOnRails
[16:36:55] MrPunkin: I have upgraded a prior install to Rails 5.1.5, which now apparently requires Yarn to compile assets. Does Rails not install these dependencies for me?
[16:37:38] schneider: has joined #RubyOnRails
[16:40:01] havenwood: MrPunkin: No, Rails doesn't install Yarn.
[16:40:20] havenwood: MrPunkin: You'll have to install stuff like Ruby, Postgres, Redis, Yarn, etc yourself.
[16:40:55] MrPunkin: Okay, thanks havenwood
[16:45:53] orbyt_: has joined #RubyOnRails
[16:46:49] MrCrackPotBuilde: tbuehlmann @outpu = webhoseio.query('productFilter', {'q': "Arduino"})
[16:52:12] s2013: has joined #RubyOnRails
[16:58:37] MrCrackPotBuilde: when i use the above @output['pr..... i get the http url of the image but just under neath that i get => nil
[17:16:58] schneider: has joined #RubyOnRails
[17:18:27] dviola: has joined #RubyOnRails
[17:20:46] safetypin: has joined #RubyOnRails
[17:22:30] fragamus: has joined #RubyOnRails
[17:33:52] elcms: has joined #RubyOnRails
[17:36:19] mikecmpbll: has joined #RubyOnRails
[17:44:06] duderonomy: has joined #RubyOnRails
[17:45:09] mtkd: has joined #RubyOnRails
[17:47:27] s2013: has joined #RubyOnRails
[17:47:40] Rodya_: has joined #RubyOnRails
[17:53:46] drale2k_: has joined #RubyOnRails
[18:17:08] sameerynho: has joined #RubyOnRails
[18:29:41] schneider: has joined #RubyOnRails
[18:36:19] srinidhi: has joined #RubyOnRails
[18:36:46] fragamus: has joined #RubyOnRails
[18:39:29] Cache_Money: has joined #RubyOnRails
[18:41:30] kapil___: has joined #RubyOnRails
[18:43:05] schneider: has joined #RubyOnRails
[18:50:29] duderonomy: has joined #RubyOnRails
[18:51:13] trautwein: has joined #RubyOnRails
[18:52:19] trautwein: has joined #RubyOnRails
[18:56:06] mtkd: has joined #RubyOnRails
[18:58:37] s2013: has joined #RubyOnRails
[18:58:38] FastJack: has joined #RubyOnRails
[18:58:51] jrm: has joined #RubyOnRails
[18:58:53] cagomez: has joined #RubyOnRails
[18:59:51] trautwein: has joined #RubyOnRails
[19:03:10] duderonomy: has joined #RubyOnRails
[19:14:57] trautwein: has joined #RubyOnRails
[19:21:15] trautwein: has joined #RubyOnRails
[19:21:33] et09: has joined #RubyOnRails
[19:21:56] et09: having a million problems for yarn + webpacker on rails... "Your yarn packages are out of date / Please run `yarn install` to update" despite yarn install being up to date
[19:23:05] trautwein: has joined #RubyOnRails
[19:24:38] et09: something to do with the wrong node version? i'm really confused
[19:25:04] trautwein_: has joined #RubyOnRails
[19:26:17] mtkd: has joined #RubyOnRails
[19:26:39] trautwein: has joined #RubyOnRails
[19:29:57] cagomez: has joined #RubyOnRails
[19:30:43] et09: nevermind, disabled yarn a la https://medium.com/@shvetsovdm/how-to-use-webpacker-with-npm-instead-of-yarn-a8a764e3a8ab
[19:40:05] fragamus: has joined #RubyOnRails
[19:42:32] halbbalda: has joined #RubyOnRails
[19:44:56] fragamus: has joined #RubyOnRails
[19:45:10] harrycs: has joined #RubyOnRails
[19:45:10] safetypin: has joined #RubyOnRails
[19:45:27] NoGodDamnIdea: has joined #RubyOnRails
[19:45:48] cagomez: has joined #RubyOnRails
[19:46:06] shtirlic: has joined #RubyOnRails
[19:54:38] orbyt_: has joined #RubyOnRails
[19:56:38] s2013: has joined #RubyOnRails
[20:03:17] cagomez: has joined #RubyOnRails
[20:21:32] workmad3: has joined #RubyOnRails
[20:22:02] SteenJobs: has joined #RubyOnRails
[20:25:58] duderonomy: has joined #RubyOnRails
[20:26:30] _aeris_: has joined #RubyOnRails
[20:31:23] orbyt_: whats the diff between `RSpec.configure do |config|` vs `RSpec.configuration do |config|`
[20:31:33] markle: has joined #RubyOnRails
[20:32:12] orbyt_: I assume they are functinoally equivalent
[20:32:16] orbyt_: functionally*
[20:34:19] MarkAValdez: has joined #RubyOnRails
[20:49:02] MarkAValdez: has joined #RubyOnRails
[20:51:34] MarkAValdez: has left #RubyOnRails: ()
[20:53:11] _3dwardsharp: has joined #RubyOnRails
[21:08:09] ur5us: has joined #RubyOnRails
[21:46:02] Fernando-Basso: has joined #RubyOnRails
[22:00:20] maryo: has joined #RubyOnRails
[22:01:10] ElFerna: has joined #RubyOnRails
[22:04:13] rev_strangehope: has left #RubyOnRails: ()
[22:09:57] Cork: has joined #RubyOnRails
[22:16:42] orbyt_: has joined #RubyOnRails
[22:21:03] workmad3: has joined #RubyOnRails
[22:33:45] tcopeland: has joined #RubyOnRails
[22:36:11] ElFerna: has joined #RubyOnRails
[22:36:50] ElFerna: has joined #RubyOnRails
[22:38:28] ElFerna: has joined #RubyOnRails
[22:39:08] ElFerna: has joined #RubyOnRails
[22:39:23] mikecmpbll: has joined #RubyOnRails
[22:40:08] ElFerna: has joined #RubyOnRails
[22:43:02] duderonomy: has joined #RubyOnRails
[22:52:20] LateralO1: has joined #RubyOnRails
[22:58:50] orbyt_: has joined #RubyOnRails
[23:01:51] erdave: has joined #RubyOnRails
[23:17:45] _3dwardsharp: has joined #RubyOnRails
[23:22:03] xco: has joined #RubyOnRails
[23:22:19] xco: hi, is there a nice way to write params.require(:data).require(:object).require(:charge)?
[23:22:30] xco: to avoid the chains of ‘require'?
[23:38:50] duderonomy: has joined #RubyOnRails