« Back to channel list

#RubyOnRails - 09 July 2017

« Back 1 day Forward 1 day »
[00:02:28] jhfisc: has joined #RubyOnRails
[00:13:46] quazimodo: has joined #RubyOnRails
[00:14:42] patarr: has joined #RubyOnRails
[00:18:58] jhfisc: has joined #RubyOnRails
[00:23:23] chouhoulis: has joined #RubyOnRails
[00:24:23] jhfisc: has joined #RubyOnRails
[00:28:30] planigan: has joined #RubyOnRails
[00:29:51] jhfisc: has joined #RubyOnRails
[00:41:16] jhfisc: has joined #RubyOnRails
[00:53:13] jhfisc: has joined #RubyOnRails
[00:59:13] jhfisc: has joined #RubyOnRails
[01:07:53] jhfisc: has joined #RubyOnRails
[01:17:57] profsimm: has joined #RubyOnRails
[01:18:00] profsimm: Folks, how do you handle "base path" in your apps - when you deploy your app in a subfolder. Do you have explicit separate input params for "original path" and "rewritten path without base path" or?
[01:23:39] weathermaker: has joined #RubyOnRails
[01:29:44] jhfisc: has joined #RubyOnRails
[01:35:16] jhfisc: has joined #RubyOnRails
[01:41:12] jhfisc: has joined #RubyOnRails
[01:50:12] bronson: has joined #RubyOnRails
[01:55:40] duderono_: has joined #RubyOnRails
[02:11:59] Jameser: has joined #RubyOnRails
[02:13:12] jhfisc: has joined #RubyOnRails
[02:19:12] jhfisc: has joined #RubyOnRails
[02:33:08] jhfisc: has joined #RubyOnRails
[02:41:07] Jameser: has joined #RubyOnRails
[02:46:39] Jameser: has joined #RubyOnRails
[02:46:57] wethu: has joined #RubyOnRails
[02:50:34] bronson: has joined #RubyOnRails
[02:55:37] duderonomy: has joined #RubyOnRails
[03:00:30] Jameser: has joined #RubyOnRails
[03:00:57] jhfisc: has joined #RubyOnRails
[03:03:50] irishfromua: has joined #RubyOnRails
[03:08:02] jhfisc: has joined #RubyOnRails
[03:13:37] MasterAsia: has joined #RubyOnRails
[03:16:48] benlieb: has joined #RubyOnRails
[03:17:59] benlieb: does anyone remember HireFire for autoscaling on Heroku? What would I use now? Updating an old app...
[03:21:53] davibusanello: has joined #RubyOnRails
[03:22:39] jhfisc: has joined #RubyOnRails
[03:22:45] MasterAsia: Is it good behaviour to sign a user in if they are clicking on a link from an email I send?
[03:23:56] MasterAsia: benlieb: it appears to still be operating
[03:24:41] benlieb: masterasia: what do you mean?
[03:25:00] MasterAsia: Just use them?
[03:25:00] benlieb: HireFire] Worker query request failed with Heroku::API::Errors::ErrorWithResponse Expected(200) <=> Actual(410 Gone)
[03:25:08] benlieb: the rails gem, not the service
[03:25:18] benlieb: body: "{\"id\":\"gone\",\"error\":\"This version of the API has been Sunset.\\nPlease see https://devcenter.heroku.com/changelog-items/1147 for more information.\\n\"}
[03:25:32] benlieb: last update to hirefire gem was 2011
[03:25:51] weathermaker: has joined #RubyOnRails
[03:25:56] duderonomy: has joined #RubyOnRails
[03:28:13] jhfisc: has joined #RubyOnRails
[03:31:44] HoierM: has joined #RubyOnRails
[03:32:21] MasterAsia: No clue then
[03:32:35] MasterAsia: Maybe update the gem yourself
[03:32:40] MasterAsia: or ask the maintainer
[03:32:55] MasterAsia: Looks like heroku changed their API
[03:39:05] jhfisc: has joined #RubyOnRails
[03:51:16] bronson: has joined #RubyOnRails
[03:53:59] jhfisc: has joined #RubyOnRails
[03:56:32] ur5us: has joined #RubyOnRails
[04:17:07] benlieb: has joined #RubyOnRails
[04:20:12] jhfisc: has joined #RubyOnRails
[04:24:12] einstein9: has joined #RubyOnRails
[04:31:41] wethu: has joined #RubyOnRails
[04:32:16] jhfisc: has joined #RubyOnRails
[04:37:01] jhfisc: has joined #RubyOnRails
[04:42:20] jhfisc: has joined #RubyOnRails
[04:52:57] bronson: has joined #RubyOnRails
[04:54:23] jhfisc: has joined #RubyOnRails
[04:59:55] jhfisc: has joined #RubyOnRails
[05:06:14] Jameser: has joined #RubyOnRails
[05:17:14] jhfisc: has joined #RubyOnRails
[05:25:43] patarr: has joined #RubyOnRails
[05:26:23] podlech: has joined #RubyOnRails
[05:33:56] jhfisc: has joined #RubyOnRails
[05:46:04] wethu: has joined #RubyOnRails
[05:47:16] jhfisc: has joined #RubyOnRails
[05:53:45] bronson: has joined #RubyOnRails
[06:02:06] jhfisc: has joined #RubyOnRails
[06:10:50] jhfisc: has joined #RubyOnRails
[06:12:33] ascarter_: has joined #RubyOnRails
[06:17:12] jhfisc: has joined #RubyOnRails
[06:23:14] jhfisc: has joined #RubyOnRails
[06:24:20] marr: has joined #RubyOnRails
[06:29:13] jhfisc: has joined #RubyOnRails
[06:33:21] wethu: has joined #RubyOnRails
[06:35:13] jhfisc: has joined #RubyOnRails
[06:38:36] jhfisc: has joined #RubyOnRails
[06:54:34] bronson: has joined #RubyOnRails
[06:55:14] jhfisc: has joined #RubyOnRails
[07:03:14] jhfisc: has joined #RubyOnRails
[07:13:46] ascarter_: has joined #RubyOnRails
[07:16:01] irishfromua: has joined #RubyOnRails
[07:19:16] jhfisc: has joined #RubyOnRails
[07:26:36] patarr: has joined #RubyOnRails
[07:33:06] jhfisc: has joined #RubyOnRails
[07:41:14] jhfisc: has joined #RubyOnRails
[07:55:43] bronson: has joined #RubyOnRails
[08:02:23] jhfisc: has joined #RubyOnRails
[08:06:20] srinidhi: has joined #RubyOnRails
[08:08:28] guardianxx: has joined #RubyOnRails
[08:15:07] jhfisc: has joined #RubyOnRails
[08:21:13] jhfisc: has joined #RubyOnRails
[08:24:21] jhfisc: has joined #RubyOnRails
[08:25:24] pLaTo0n: has joined #RubyOnRails
[08:30:15] jhfisc: has joined #RubyOnRails
[08:32:46] FastJack: has joined #RubyOnRails
[08:35:32] jhfisc: has joined #RubyOnRails
[08:51:55] duderonomy: has joined #RubyOnRails
[08:51:59] jhfisc: has joined #RubyOnRails
[08:56:12] bronson: has joined #RubyOnRails
[09:01:04] jhfisc: has joined #RubyOnRails
[09:03:02] timdotrb: has joined #RubyOnRails
[09:03:21] timdotrb: Evening, all
[09:04:46] timdotrb: I have a model whose name is different than the table name. I’m trying to create a has_many :through related to this model, but for some reason, the migration keeps failing with: Mysql2::Error: Cannot add foreign key constraint
[09:05:41] timdotrb: The SQL it output executes fine, so I’m not really sure what the problem is..
[09:07:57] timdotrb: Any ideas? https://gist.github.com/willc0de4food/ebe2a69014ac0068fcca74315eee329f
[09:10:40] lxsameer: has joined #RubyOnRails
[09:13:25] nertzy: has joined #RubyOnRails
[09:15:08] ascarter: has joined #RubyOnRails
[09:20:02] wethu: has joined #RubyOnRails
[09:27:30] patarr: has joined #RubyOnRails
[09:32:37] jhfisc: has joined #RubyOnRails
[09:35:11] srinidhi: has joined #RubyOnRails
[09:38:14] lexileo: has joined #RubyOnRails
[09:48:42] stamina: has joined #RubyOnRails
[09:53:48] Waterpik: has joined #RubyOnRails
[09:54:24] nahtnam: has joined #RubyOnRails
[09:57:24] bronson: has joined #RubyOnRails
[10:16:11] ascarter: has joined #RubyOnRails
[10:27:02] duderonomy: has joined #RubyOnRails
[10:33:50] shilon: has joined #RubyOnRails
[10:41:43] AzaToth: has joined #RubyOnRails
[10:58:10] bronson: has joined #RubyOnRails
[11:00:13] srinidhi: has joined #RubyOnRails
[11:28:22] patarr: has joined #RubyOnRails
[11:29:46] jhfisc: has joined #RubyOnRails
[11:32:12] pLaTo0n: has joined #RubyOnRails
[11:32:38] ur5us: has joined #RubyOnRails
[11:50:53] HoierM_: has joined #RubyOnRails
[11:52:52] ianfleeton: has joined #RubyOnRails
[11:53:45] sevenseacat: has joined #RubyOnRails
[11:56:50] quazimodo: has joined #RubyOnRails
[11:58:59] bronson: has joined #RubyOnRails
[12:00:52] jhfisc: has joined #RubyOnRails
[12:05:20] cyfr0n: has joined #RubyOnRails
[12:10:56] jhfisc: has joined #RubyOnRails
[12:15:13] jhfisc: has joined #RubyOnRails
[12:17:47] duderono_: has joined #RubyOnRails
[12:19:03] shilon: has joined #RubyOnRails
[12:21:13] jhfisc: has joined #RubyOnRails
[12:26:17] patarr: has joined #RubyOnRails
[12:27:17] jhfisc: has joined #RubyOnRails
[12:31:55] jhfisc: has joined #RubyOnRails
[12:45:06] jhfisc: has joined #RubyOnRails
[12:50:33] jhfisc: has joined #RubyOnRails
[12:59:47] bronson: has joined #RubyOnRails
[13:02:11] jhfisc: has joined #RubyOnRails
[13:15:46] jhfisc: has joined #RubyOnRails
[13:18:55] sagax: has joined #RubyOnRails
[13:23:24] jhfisc: has joined #RubyOnRails
[13:25:02] cseder: has joined #RubyOnRails
[13:28:36] jhfisc: has joined #RubyOnRails
[13:31:56] jhfisc: has joined #RubyOnRails
[13:39:19] ianfleeton: has joined #RubyOnRails
[13:49:43] jhfisc: has joined #RubyOnRails
[13:56:03] shilon: has joined #RubyOnRails
[14:00:38] bronson: has joined #RubyOnRails
[14:05:46] jhfisc: has joined #RubyOnRails
[14:10:56] ianfleeton: has joined #RubyOnRails
[14:12:39] chouhoulis: has joined #RubyOnRails
[14:16:02] jhfisc: has joined #RubyOnRails
[14:19:19] enodata: has joined #RubyOnRails
[14:23:12] ianfleeton: has joined #RubyOnRails
[14:26:21] netzfisch: has joined #RubyOnRails
[14:34:44] Chernobuk: has joined #RubyOnRails
[14:44:54] jhfisc: has joined #RubyOnRails
[14:52:48] ianfleeton: has joined #RubyOnRails
[14:55:07] jhfisc: has joined #RubyOnRails
[15:01:12] jhfisc: has joined #RubyOnRails
[15:04:53] cyfr0n: has left #RubyOnRails: ("WeeChat 1.9")
[15:20:53] ascarter: has joined #RubyOnRails
[15:23:05] jhfisc: has joined #RubyOnRails
[15:32:32] shilon: has joined #RubyOnRails
[15:33:37] jhfisc: has joined #RubyOnRails
[15:47:13] jhfisc: has joined #RubyOnRails
[15:53:07] jhfisc: has joined #RubyOnRails
[15:59:20] jhfisc: has joined #RubyOnRails
[16:01:27] br|ck: has joined #RubyOnRails
[16:01:32] bronson: has joined #RubyOnRails
[16:10:56] jhfisc: has joined #RubyOnRails
[16:17:14] jhfisc: has joined #RubyOnRails
[16:25:09] jhfisc: has joined #RubyOnRails
[16:33:07] jhfisc: has joined #RubyOnRails
[16:42:47] Aherin: has joined #RubyOnRails
[16:43:21] jhfisc: has joined #RubyOnRails
[16:43:32] knight33: has joined #RubyOnRails
[16:49:43] shilon: has joined #RubyOnRails
[16:50:24] chouhoulis: has joined #RubyOnRails
[16:51:41] conta: has joined #RubyOnRails
[17:02:03] jhfisc: has joined #RubyOnRails
[17:09:58] [SpLaT]: has joined #RubyOnRails
[17:12:13] jhfisc: has joined #RubyOnRails
[17:18:12] weathermaker: has joined #RubyOnRails
[17:21:48] ascarter: has joined #RubyOnRails
[17:23:00] jhfisc: has joined #RubyOnRails
[17:24:31] knight33: has joined #RubyOnRails
[17:28:39] jhfisc: has joined #RubyOnRails
[17:34:10] golgoth: has joined #RubyOnRails
[17:34:39] golgoth: Hi, I have a problem with accepts_nested_attributes_for. I have a user model which has_many babies, and baby has_one quiniela. The form to create a baby looks like this: ...form_for([@user, @user.babies.build]) do |f|... and inside of it, I also have fields to create the quiniela: ...f.fields_for :baby_quiniela do |bq|... When I add accepts_nested_attributes_for :baby_quiniela to my baby model, the
[17:34:45] golgoth: fields specific to the quiniela disappear from my form. I read that I should add @baby.create_baby_quiniela to the new method of the babies controller but I only have a create method in there since the baby is created through the user. I'm kinda stuck :(
[17:37:43] golgoth: the form to create the baby, including the nested fields for the baby_quiniela: http://pasted.co/450d0cb6
[17:39:43] golgoth: and a section on my controller which does not have a new method: http://pasted.co/8d8026f7
[17:43:40] golgoth: I could forget about accepts_nested_attributes_for and access :amout directly inside params but it would be insecure
[17:43:43] br0d1n: has joined #RubyOnRails
[17:46:19] jhfisc: has joined #RubyOnRails
[17:50:45] jammanbo: has joined #RubyOnRails
[17:51:13] jhfisc: has joined #RubyOnRails
[17:52:05] jammanbo: Anyone know how to go from a class name (potentially namespaced) to a URL, without hard-coding assumptions about the URL I mean.
[17:53:23] matthewd: jammanbo: Use the actual class (or instance) instead of the name, and url_for should do it
[17:53:39] matthewd: (though that's ultimately still making different assumptions)
[17:54:10] jammanbo: matthewd: Yeah, I thought that if I were to constantize the class name and pass it to url_for I'd get the index route, doesn't seem to work though.
[17:54:21] jammanbo: will check again
[17:55:12] matthewd: Assumptions are still necessary: it assumes there's a `your_class_name_path` route helper
[17:55:48] chouhoulis: has joined #RubyOnRails
[17:56:58] gheegh: has joined #RubyOnRails
[17:58:38] gheegh: hey all.. does anyone know of existing code/gem to convert strings like this into integers? "67.2M"
[17:58:47] gheegh: i'd want it to return 67,200,000
[17:59:07] gheegh: 57K to 57,000
[17:59:36] gheegh: I've written a shortener to go one direction.. (to generate those), but i've not seen anything that converts them back to integers
[18:01:13] cseder: has joined #RubyOnRails
[18:02:47] bronson: has joined #RubyOnRails
[18:06:36] tsujp: has joined #RubyOnRails
[18:06:43] irishfromua: has joined #RubyOnRails
[18:07:24] tsujp: Hello everyone, I have a quesiton: if I want a trade (model) to be made up of 1 or more transactions (model) how do I go about creating the trade table? Would I just have trade(ref:transaction)?
[18:07:41] tsujp: How do I make it dynamic in that all trades are made up of 1 or more transactions
[18:11:08] desnudopenguino: creating a trade table? if it is a one trade to many transactions, you add a trade id to the transaction table
[18:12:13] desnudopenguino: a.k.a. the transactions need a foreign key for which trade they belong to
[18:12:14] jhfisc: has joined #RubyOnRails
[18:16:06] pLaTo0n: has joined #RubyOnRails
[18:17:17] shilon: has joined #RubyOnRails
[18:24:20] jhfisc: has joined #RubyOnRails
[18:28:51] mtkd: has joined #RubyOnRails
[18:29:12] conta: has joined #RubyOnRails
[18:29:58] jhfisc: has joined #RubyOnRails
[18:32:37] tsujp: desnudopenguino: so trade table with a fk to each transaction then
[18:35:13] jhfisc: has joined #RubyOnRails
[18:35:33] knight33: has joined #RubyOnRails
[18:37:09] ianfleeton: has joined #RubyOnRails
[18:42:31] ascarter: has joined #RubyOnRails
[18:43:18] jhfisc: has joined #RubyOnRails
[18:43:54] FredStockton: has joined #RubyOnRails
[18:44:59] desnudopenguino: tsujp: transaction table has a column for the id of the trade item it is associated with
[18:47:04] tsujp: desnudopenguino: but I need a list of trades themselves. Trades could have multiple buys and sells (transactions) of assets (financialinstruments)
[18:48:48] jhfisc: has joined #RubyOnRails
[18:49:10] desnudopenguino: is it one trade "owns" multiple transactions, or one transaction "owns" many trades?
[18:51:30] tsujp: desnudopenguino: one trade owns multiple transactions
[18:51:36] tsujp: 1 or more
[18:51:59] desnudopenguino: ok, then you want to have a transaction model with a trade id as I have stated twice now
[18:52:15] jhfisc: has joined #RubyOnRails
[18:52:39] tsujp: yeah I'm confused what you mean by that because I asked you now, also twice, if that means having a trade table and you said no
[18:53:48] desnudopenguino: you need a trade table, yes
[18:54:15] tsujp: right gotcha :)
[18:54:47] desnudopenguino: and a tranaction table that has a fk that points to the trade table item
[18:54:52] desnudopenguino: sorry for the confusion
[18:55:04] mooser: has joined #RubyOnRails
[18:56:11] jhfisc: has joined #RubyOnRails
[18:58:08] tsujp: ive already made the foreign keys in the migration files, but in rails 5 did they add anyting to make foreign keys from the 'rails generate' syntax?
[19:02:11] jhfisc: has joined #RubyOnRails
[19:07:16] jhfisc: has joined #RubyOnRails
[19:09:00] duderonomy: has joined #RubyOnRails
[19:12:20] chouhoulis: has joined #RubyOnRails
[19:12:33] jhfisc: has joined #RubyOnRails
[19:14:04] roshanavand: has joined #RubyOnRails
[19:15:37] danguita: has joined #RubyOnRails
[19:17:37] jhfisc: has joined #RubyOnRails
[19:20:11] desnudopenguino: not that I'm aware of
[19:20:24] jhfisc: has joined #RubyOnRails
[19:24:01] golgoth: finnaly got it to work, I had that bug: https://github.com/rails/rails/issues/25198
[19:27:13] jhfisc: has joined #RubyOnRails
[19:27:45] Majadon: has joined #RubyOnRails
[19:30:01] conta: has joined #RubyOnRails
[19:32:51] ur5us: has joined #RubyOnRails
[19:33:13] jhfisc: has joined #RubyOnRails
[19:38:12] pLaTo0n: has joined #RubyOnRails
[19:40:57] jhfisc: has joined #RubyOnRails
[19:47:13] jhfisc: has joined #RubyOnRails
[19:48:31] mitt3ns: has joined #RubyOnRails
[19:49:36] NoGodDamnIdea: has joined #RubyOnRails
[19:52:20] marr: has joined #RubyOnRails
[19:52:25] jhfisc: has joined #RubyOnRails
[19:53:32] shilon: has joined #RubyOnRails
[19:55:45] gamblor3: has joined #RubyOnRails
[20:03:39] bronson: has joined #RubyOnRails
[20:04:39] jhfisc: has joined #RubyOnRails
[20:06:25] twilling: has joined #RubyOnRails
[20:11:13] jhfisc: has joined #RubyOnRails
[20:15:43] ianfleeton: has joined #RubyOnRails
[20:16:41] jhfisc: has joined #RubyOnRails
[20:21:46] jhfisc: has joined #RubyOnRails
[20:23:10] twilling: has joined #RubyOnRails
[20:25:45] FredStockton: has left #RubyOnRails: ()
[20:27:04] lele: has joined #RubyOnRails
[20:30:18] S1kx: has joined #RubyOnRails
[20:31:10] conta: has joined #RubyOnRails
[20:42:28] knight33: has joined #RubyOnRails
[20:44:10] ianfleeton: has joined #RubyOnRails
[20:47:36] NoGodDamnIdea: has joined #RubyOnRails
[20:50:47] jhfisc: has joined #RubyOnRails
[20:54:08] jhfisc: has joined #RubyOnRails
[20:57:51] einstein9: has joined #RubyOnRails
[21:07:35] ur5us: has joined #RubyOnRails
[21:19:11] zacts: has joined #RubyOnRails
[21:21:47] joenas[m]: has joined #RubyOnRails
[21:23:12] ur5us: has joined #RubyOnRails
[21:25:54] jhfisc: has joined #RubyOnRails
[21:27:59] bashusr: has joined #RubyOnRails
[21:30:36] bashusr: hi all, i have a model that requires about 10 enums that need to be editable (added/removed/deleted/edited) from users. I could create 10 different models for it, but is there some sorta magical gem that can help me create this fast and easily? Maybe even doing it with only 2 tables, an association table and a table to hold all the possible enum values?
[21:31:55] conta: has joined #RubyOnRails
[21:41:35] jhfisc: has joined #RubyOnRails
[21:46:51] jhfisc: has joined #RubyOnRails
[21:53:20] jhfisc: has joined #RubyOnRails
[21:58:49] jhfisc: has joined #RubyOnRails
[22:04:39] bronson: has joined #RubyOnRails
[22:07:53] jhfisc: has joined #RubyOnRails
[22:12:18] jhfisc: has joined #RubyOnRails
[22:13:03] big|bad|wolf: has joined #RubyOnRails
[22:17:57] roshanavand: has joined #RubyOnRails
[22:21:41] ianfleeton: has joined #RubyOnRails
[22:22:02] arBmind: has joined #RubyOnRails
[22:25:38] ascarter: has joined #RubyOnRails
[22:26:26] jhfisc: has joined #RubyOnRails
[22:30:58] Radar: GOOD MORNING
[22:31:17] shilon: has joined #RubyOnRails
[22:31:56] jhfisc: has joined #RubyOnRails
[22:32:42] conta: has joined #RubyOnRails
[22:36:43] wethu: has joined #RubyOnRails
[22:44:20] jhfisc: has joined #RubyOnRails
[22:53:33] jhfisc: has joined #RubyOnRails
[23:03:04] jhfisc: has joined #RubyOnRails
[23:08:10] jhfisc: has joined #RubyOnRails
[23:12:15] jhfisc: has joined #RubyOnRails
[23:26:27] mostlybadfly: has joined #RubyOnRails
[23:32:34] rodrigovlds: has joined #RubyOnRails
[23:33:26] conta: has joined #RubyOnRails
[23:49:44] jhfisc: has joined #RubyOnRails
[23:52:47] amincd: has joined #RubyOnRails
[23:53:12] amincd: hi, is there anyway I can rescue all RecordNotFound errors from the model?
[23:53:25] amincd: I know I can do it in the controller..
[23:54:59] amincd: I'd like to do something like `rescue_from (ActiveRecord::RecordNotFound) do {...} end`. I currently have this in applicationcontroller.rb, but it doesn't work when I place it in applicationrecord.rb
[23:55:41] jhfisc: has joined #RubyOnRails
[23:56:05] amincd: *application_controller.rb
[23:59:12] jhfisc: has joined #RubyOnRails