« Back to channel list

#RubyOnRails - 05 October 2018

« Back 1 day Forward 1 day »
[00:15:19] orbyt_: has joined #RubyOnRails
[00:29:06] sevenseacat: has joined #RubyOnRails
[00:57:42] duderonomy: has joined #RubyOnRails
[01:04:01] lxsameer: has joined #RubyOnRails
[01:19:45] orbyt_: has joined #RubyOnRails
[01:31:15] Puffball: has joined #RubyOnRails
[01:44:54] darkhanb: has joined #RubyOnRails
[01:54:07] cagomez: has joined #RubyOnRails
[02:16:39] Dimik: has joined #RubyOnRails
[02:22:53] Saukk: has joined #RubyOnRails
[02:44:50] Puffball: has joined #RubyOnRails
[03:10:14] braincrash: has joined #RubyOnRails
[03:34:39] srinidhi: has joined #RubyOnRails
[04:10:24] knight33: has joined #RubyOnRails
[04:17:02] za1b1tsu: has joined #RubyOnRails
[04:45:56] LiftLeft: has joined #RubyOnRails
[04:47:32] lxsameer: has joined #RubyOnRails
[04:59:31] helpa: has joined #RubyOnRails
[05:00:18] Scient: has joined #RubyOnRails
[05:00:28] Psy-Q: has joined #RubyOnRails
[05:01:15] reber: has joined #RubyOnRails
[05:01:20] DTZUZO: has joined #RubyOnRails
[05:03:43] cschneid_: has joined #RubyOnRails
[05:06:32] MoritaShinobu: has joined #RubyOnRails
[05:09:25] cschneid_: has joined #RubyOnRails
[05:16:20] rspades: has joined #RubyOnRails
[05:32:52] cschneid_: has joined #RubyOnRails
[05:41:22] za1b1tsu: has joined #RubyOnRails
[06:30:10] davidh38: has joined #RubyOnRails
[06:32:09] davidh38: has joined #RubyOnRails
[07:15:52] davidh38: has joined #RubyOnRails
[07:19:56] za1b1tsu: has joined #RubyOnRails
[07:48:17] kapil____: has joined #RubyOnRails
[07:59:40] mikecmpbll: has joined #RubyOnRails
[08:06:19] lxsameer: has joined #RubyOnRails
[08:08:44] davidh38: has joined #RubyOnRails
[08:09:20] schneider: has joined #RubyOnRails
[08:16:50] schneider: has joined #RubyOnRails
[08:21:43] simmerz: has joined #RubyOnRails
[08:46:32] ellcs: has joined #RubyOnRails
[08:47:05] kreantos: has joined #RubyOnRails
[08:49:36] uks: has joined #RubyOnRails
[08:52:00] srinidhi: has joined #RubyOnRails
[09:02:41] andywww: has joined #RubyOnRails
[09:04:49] sevenseacat: current score in me vs. webpack is webpack: 1000000, me: 1
[09:07:49] jkprg: has joined #RubyOnRails
[09:25:12] sevenseacat: I don't know who invented webpack, but right now I am cursing their name
[09:26:33] davidh38: has joined #RubyOnRails
[09:46:34] tbuehlmann: my story exactly
[09:54:30] DTZUZO: has joined #RubyOnRails
[09:55:45] sevenseacat: webpack: 100000, me: 2
[10:01:14] ariedler: has joined #RubyOnRails
[10:33:15] cschneid_: has joined #RubyOnRails
[10:48:53] lankanmon: has joined #RubyOnRails
[10:55:08] ariedler: has joined #RubyOnRails
[11:03:27] Ergo: has joined #RubyOnRails
[11:08:54] tdy: has joined #RubyOnRails
[11:18:16] srinidhi: has joined #RubyOnRails
[12:00:35] kat3kasper: has joined #RubyOnRails
[12:02:44] cschneid_: has joined #RubyOnRails
[12:07:31] kat3kasper: I have a one off .csv file I would like to import into a Rails app on production. The app is open source so I do not want to add the .csv file in the project directory. The app is currently hosted on Heroku. So far the only thing I've come up with is to add a form with in my app, but felt that was overkill for an one-off. Any other ideas?
[12:19:32] roshanavand: has joined #RubyOnRails
[12:26:33] catphish: has joined #RubyOnRails
[12:26:55] catphish: what is the correct method on an AR association to check for count==0?
[12:27:29] catphish: actuall, looks like empty? is the answer
[12:34:49] lexileo: has joined #RubyOnRails
[12:37:21] TvL2386: catphish: I always use .count
[12:39:16] catphish: TvL2386: people like their helper methods :)
[12:39:23] TvL2386: catphish: and it results in "SELECT COUNT(*)"
[12:39:49] catphish: TvL2386: in that case you might want to consider changing to use any? and empty?
[12:40:11] catphish: counting all the entries will be slower
[12:40:31] TvL2386: catphish: oh I see! .any? does something else
[12:40:49] catphish: yes, it does a select with a limit 1, so it only counts up to one entry
[12:40:59] TvL2386: yes that's awesome :)
[12:41:16] catphish: means the database (with mysql at least) only has to pull entry instead of all of them
[12:41:24] catphish: *one entryy
[12:41:30] another-user: has joined #RubyOnRails
[12:41:59] catphish: i always use .any? but i wasn't sure if there was an opposite method
[12:42:04] catphish: seems like .empty? does it :)
[12:42:10] another-user: where can i look for maintenace schedule for rails versions? specifically i'm interested when support for 4.2 ends
[12:42:47] another-user: https://guides.rubyonrails.org/maintenance_policy.html doesn't provide such info
[12:52:49] sevenseacat: it does list that info. currently 4.2 only gets fixes for severe security issues
[12:53:07] sevenseacat: when rails 6 comes out, rails 4.2 will drop off that list
[12:53:34] chouhoulis: has joined #RubyOnRails
[12:54:41] another-user: sevenseacat: oh, okay, thank you!
[12:57:09] ariedler: has joined #RubyOnRails
[13:15:53] kat3kasper: has joined #RubyOnRails
[13:28:54] catphish: has left #RubyOnRails: ("Leaving")
[13:30:14] davidh38: has joined #RubyOnRails
[13:33:17] cschneid_: has joined #RubyOnRails
[13:37:08] Saukk: has joined #RubyOnRails
[13:39:14] Cork: has joined #RubyOnRails
[13:41:55] another-user: has joined #RubyOnRails
[13:46:14] chouhoulis: has joined #RubyOnRails
[13:55:11] fcser_: has joined #RubyOnRails
[14:07:06] donnie: has joined #RubyOnRails
[14:11:45] [spoiler]: has left #RubyOnRails: ("WeeChat 2.2")
[14:17:43] Croata: has joined #RubyOnRails
[14:25:14] chouhoulis: has joined #RubyOnRails
[14:39:36] dviola: has joined #RubyOnRails
[14:41:05] chouhoulis: has joined #RubyOnRails
[14:41:06] simmerz: has joined #RubyOnRails
[14:50:47] platoon23: has joined #RubyOnRails
[14:55:03] apeiros_: has joined #RubyOnRails
[14:58:26] cschneid_: has joined #RubyOnRails
[14:58:56] ariedler: has joined #RubyOnRails
[15:05:12] sandstrom: has joined #RubyOnRails
[15:06:22] sameerynho: has joined #RubyOnRails
[15:15:33] davidh38: has joined #RubyOnRails
[15:16:00] Croata: has joined #RubyOnRails
[15:21:30] rrichardsr3: has joined #RubyOnRails
[15:27:09] davidh38: has joined #RubyOnRails
[15:36:54] beholders_eye: has joined #RubyOnRails
[15:44:40] orbyt_: has joined #RubyOnRails
[15:53:53] duderonomy: has joined #RubyOnRails
[16:05:23] duderonomy: has joined #RubyOnRails
[16:06:53] orbyt_: has joined #RubyOnRails
[16:08:19] duderonomy: has joined #RubyOnRails
[16:20:52] apeiros: has joined #RubyOnRails
[16:21:32] duderonomy: has joined #RubyOnRails
[16:29:13] darkhanb: has joined #RubyOnRails
[16:30:59] Cork: has joined #RubyOnRails
[16:41:17] knight33: has joined #RubyOnRails
[16:42:50] orbyt_: has joined #RubyOnRails
[16:47:34] davidh38: has joined #RubyOnRails
[16:53:26] orbyt_: has joined #RubyOnRails
[16:54:25] prettybTech: has joined #RubyOnRails
[16:59:11] ariedler: has joined #RubyOnRails
[16:59:12] mikecmpbll: has joined #RubyOnRails
[17:02:39] DTZUZO: has joined #RubyOnRails
[17:09:01] davidh38: hey guys, i am in rails version 2.3.1 and i have trouble understanding this route: https://dpaste.de/eoDg
[17:09:37] davidh38: does anyone know what this means?
[17:18:30] za1b1tsu: has joined #RubyOnRails
[17:27:57] DTZUZO: has joined #RubyOnRails
[17:41:31] tbuehlmann: davidh38: what part exactly?
[17:41:45] DTZUZO: has joined #RubyOnRails
[17:42:28] duderonomy: has joined #RubyOnRails
[17:43:54] Cork: has joined #RubyOnRails
[17:44:37] davidh38: @tbuehlmann the problem i face is the following: in a controller there is the following code: application_charge.return_url = charge. Sow i wondered, where the charge comes from. I clicked with command (on a mac in rubymine) on this variable and it directed me to the resource.
[17:45:34] davidh38: so when charge is assigned to application_charg.return_url, does it have anything to do with the resource?
[17:46:11] tbuehlmann: no. what's charge?
[17:46:14] davidh38: or is this not deductable from this context?
[17:46:34] davidh38: it is just a variable, i cannot figure out where it is initialized
[17:46:53] davidh38: i searched in sublime find files
[17:47:00] davidh38: but the whole project itself is working
[17:47:07] davidh38: may i show you the project?
[17:47:37] tbuehlmann: if it's not a local variable it's a method. check the controller and the parent controller
[17:56:37] duderonomy: has joined #RubyOnRails
[17:57:39] davidh38: tbuehlmann, okay, i checked both the superclass of the controller and the controller and i could not find a corresponding method or a variable. Is there something i miss?
[17:59:34] MrCrackPotBuilde: when adding devise custom controller using scope how would i add multiple rails generate devise:controllers [api], [v1], [user]
[18:02:30] MrCrackPotBuilde: ah i got it 4th time was the charm its rails g devise:controllers api/v1/user
[18:04:29] davidh38: has joined #RubyOnRails
[18:05:16] tbuehlmann: davidh38: you could search for "def charge" or search for "charge" in general
[18:06:27] duderonomy: has joined #RubyOnRails
[18:07:09] prettybTech: has joined #RubyOnRails
[18:07:40] DTZUZO_: has joined #RubyOnRails
[18:09:24] Ergo: has joined #RubyOnRails
[18:10:22] davidh38: tbuehlmann, i did i shows the: resources :charge, only: [:index, :create] do
[18:10:30] davidh38: in the routes.rb
[18:11:17] tbuehlmann: no idea then
[18:11:59] davidh38: tbuehlmann, so the resource could not be the declaration?
[18:12:10] tbuehlmann: I wouldn't know why
[18:13:50] davidh38: tbuehlmann okay thank you i will search further
[18:19:22] DTZUZO_: has joined #RubyOnRails
[18:28:32] platoon23: has joined #RubyOnRails
[18:40:47] ariedler: has joined #RubyOnRails
[18:56:09] conta1: has joined #RubyOnRails
[19:05:07] prettybTech: has joined #RubyOnRails
[19:10:08] duderonomy: has joined #RubyOnRails
[19:19:00] DTZUZO: has joined #RubyOnRails
[19:23:19] apeiros_: has joined #RubyOnRails
[19:25:02] unCork: has joined #RubyOnRails
[19:35:05] rserkov: has joined #RubyOnRails
[19:40:42] davidh38: has joined #RubyOnRails
[19:42:20] samort7: has joined #RubyOnRails
[19:43:03] samort7: Question: Why do we have migrations? Like, I understand what they do, but why do we incrementally change a database schema? Why don't we just have one massive file that lays out what the schema should look like?
[19:53:32] NoGodDamnIdea: has joined #RubyOnRails
[19:57:19] tbuehlmann: samort7: we have such a file, it's the schema.rb (or structure.sql)
[19:58:46] ivanskie: has joined #RubyOnRails
[20:00:10] samort7: tbuehlmann, oh, right. So if we have that file, why do we have migrations? Why don't we just adjust schema.rb when we need the schema to change?
[20:00:12] tbuehlmann: see https://guides.rubyonrails.org/active_record_migrations.html#migration-overview for an overview on why migrations are useful
[20:02:02] tbuehlmann: well, let's say we only have that file. when you changed the database locally and committed that change, your production rails app would somehow need to determine what exactly changed since its last version
[20:02:25] tbuehlmann: it might calculate a diff from an earlier version of something like that, but that seems too complicated
[20:02:45] samort7: oh, so for example, if we were to rename a column, we would somehow need to communicate that to the production version.
[20:03:04] tbuehlmann: exactly. and that's easily done with a migration
[20:03:23] samort7: ah, ok. That makes a lot of sense. Thanks!
[20:03:59] tbuehlmann: you're welcome!
[20:30:24] chouhoulis: has joined #RubyOnRails
[20:42:10] ariedler: has joined #RubyOnRails
[20:47:56] tdy: has joined #RubyOnRails
[21:00:38] schneider: has joined #RubyOnRails
[21:06:49] apeiros_: has joined #RubyOnRails
[21:09:58] schneider: has joined #RubyOnRails
[21:12:50] ShekharReddy: has joined #RubyOnRails
[21:19:14] schneider: has joined #RubyOnRails
[21:20:51] ivanskie: has joined #RubyOnRails
[21:28:29] schneider: has joined #RubyOnRails
[21:37:44] schneider: has joined #RubyOnRails
[21:38:20] tdy: has joined #RubyOnRails
[21:47:05] schneider: has joined #RubyOnRails
[21:56:22] schneider: has joined #RubyOnRails
[22:05:39] schneider: has joined #RubyOnRails
[22:14:52] schneider: has joined #RubyOnRails
[22:16:23] davidh38: has joined #RubyOnRails
[22:19:50] ariedler: has joined #RubyOnRails
[22:24:10] schneider: has joined #RubyOnRails
[22:33:28] schneider: has joined #RubyOnRails
[22:39:15] agent_white: has joined #RubyOnRails
[22:42:45] schneider: has joined #RubyOnRails
[22:52:01] schneider: has joined #RubyOnRails
[23:00:11] nertzy: has joined #RubyOnRails
[23:00:21] apeiros: has joined #RubyOnRails
[23:00:50] Scriptonaut: has joined #RubyOnRails
[23:01:20] schneider: has joined #RubyOnRails
[23:10:35] schneider: has joined #RubyOnRails
[23:19:52] schneider: has joined #RubyOnRails
[23:27:49] Dimik: has joined #RubyOnRails
[23:29:07] schneider: has joined #RubyOnRails
[23:36:22] DTZUZO: has joined #RubyOnRails
[23:38:27] schneider: has joined #RubyOnRails
[23:47:41] schneider: has joined #RubyOnRails
[23:56:56] schneider: has joined #RubyOnRails