« Back to channel list

#RubyOnRails - 14 April 2018

« Back 1 day Forward 1 day »
[00:00:42] duderono_: has joined #RubyOnRails
[00:01:13] cagomez: has joined #RubyOnRails
[00:01:45] LateralO1: has joined #RubyOnRails
[00:04:31] schneider: has joined #RubyOnRails
[00:04:43] workmad3: has joined #RubyOnRails
[00:07:17] quazimodo: has joined #RubyOnRails
[00:13:41] schneider: has joined #RubyOnRails
[00:15:07] Rodya_: has joined #RubyOnRails
[00:15:12] quazimodo: has joined #RubyOnRails
[00:15:15] duderono_: has joined #RubyOnRails
[00:19:58] apparition: has joined #RubyOnRails
[00:23:06] schneider: has joined #RubyOnRails
[00:25:16] alfiemax: has joined #RubyOnRails
[00:27:40] Technodrome: has joined #RubyOnRails
[00:31:12] schneider: has joined #RubyOnRails
[00:40:17] schneider: has joined #RubyOnRails
[00:45:49] kurko__: has joined #RubyOnRails
[00:49:25] schneider: has joined #RubyOnRails
[00:58:31] schneider: has joined #RubyOnRails
[01:07:34] schneider: has joined #RubyOnRails
[01:15:52] Rodya_: has joined #RubyOnRails
[01:16:41] schneider: has joined #RubyOnRails
[01:20:45] DTZUZO: has joined #RubyOnRails
[01:23:10] Puffball: has joined #RubyOnRails
[01:23:43] schneider: has joined #RubyOnRails
[01:32:04] dviola: has joined #RubyOnRails
[01:32:53] schneider: has joined #RubyOnRails
[01:35:14] quazimodo: has joined #RubyOnRails
[01:42:00] schneider: has joined #RubyOnRails
[01:49:17] bga57: has joined #RubyOnRails
[01:51:00] schneider: has joined #RubyOnRails
[02:00:07] schneider: has joined #RubyOnRails
[02:04:02] workmad3: has joined #RubyOnRails
[02:07:13] tdy: has joined #RubyOnRails
[02:09:15] schneider: has joined #RubyOnRails
[02:18:21] schneider: has joined #RubyOnRails
[02:25:37] orbyt_: has joined #RubyOnRails
[02:27:27] schneider: has joined #RubyOnRails
[02:35:40] mroutis: has joined #RubyOnRails
[02:36:32] schneider: has joined #RubyOnRails
[02:45:38] schneider: has joined #RubyOnRails
[02:50:32] Or1on: has joined #RubyOnRails
[02:53:28] harrycs: has joined #RubyOnRails
[02:54:44] schneider: has joined #RubyOnRails
[03:00:13] harrycs: has joined #RubyOnRails
[03:02:15] harrycs: has joined #RubyOnRails
[03:03:48] schneider: has joined #RubyOnRails
[03:06:18] harrycs: has joined #RubyOnRails
[03:08:15] harrycs: has joined #RubyOnRails
[03:09:23] timdotrb: has joined #RubyOnRails
[03:12:58] schneider: has joined #RubyOnRails
[03:14:13] Dimik: has joined #RubyOnRails
[03:16:14] harrycs: has joined #RubyOnRails
[03:17:21] Rodya_: has joined #RubyOnRails
[03:18:15] harrycs: has joined #RubyOnRails
[03:20:14] harrycs: has joined #RubyOnRails
[03:22:03] schneider: has joined #RubyOnRails
[03:22:14] harrycs: has joined #RubyOnRails
[03:22:25] Radar: ule: https://www.engineyard.com/blog/rails-encrypted-credentials-on-rails-5.2
[03:27:00] DTZUZO: has joined #RubyOnRails
[03:31:07] schneider: has joined #RubyOnRails
[03:35:59] quazimodo: has joined #RubyOnRails
[03:40:12] schneider: has joined #RubyOnRails
[03:46:22] orbyt_: has joined #RubyOnRails
[03:49:21] schneider: has joined #RubyOnRails
[03:49:30] cagomez: has joined #RubyOnRails
[03:50:44] DTZUZO: has joined #RubyOnRails
[03:53:25] ephemer0l: has joined #RubyOnRails
[03:56:19] LateralOctober: has joined #RubyOnRails
[03:58:26] schneider: has joined #RubyOnRails
[04:01:59] segy: has joined #RubyOnRails
[04:03:22] workmad3: has joined #RubyOnRails
[04:07:34] schneider: has joined #RubyOnRails
[04:13:02] ule: Radar: thank you
[04:16:38] schneider: has joined #RubyOnRails
[04:17:14] mtkd: has joined #RubyOnRails
[04:21:38] timdotrb: has joined #RubyOnRails
[04:22:23] timdotrb: has joined #RubyOnRails
[04:23:10] timdotrb: has joined #RubyOnRails
[04:23:56] timdotrb: has joined #RubyOnRails
[04:24:41] timdotrb: has joined #RubyOnRails
[04:25:29] timdotrb: has joined #RubyOnRails
[04:25:45] schneider: has joined #RubyOnRails
[04:26:14] timdotrb: has joined #RubyOnRails
[04:27:01] timdotrb: has joined #RubyOnRails
[04:27:47] timdotrb: has joined #RubyOnRails
[04:34:51] schneider: has joined #RubyOnRails
[04:43:57] schneider: has joined #RubyOnRails
[04:48:17] quazimodo: has joined #RubyOnRails
[04:53:03] schneider: has joined #RubyOnRails
[04:54:03] ariejan: has joined #RubyOnRails
[04:55:22] Omnilord: has joined #RubyOnRails
[05:02:13] schneider: has joined #RubyOnRails
[05:05:43] timdotrb: has joined #RubyOnRails
[05:05:50] nickenchuggets: has joined #RubyOnRails
[05:11:18] schneider: has joined #RubyOnRails
[05:16:07] alfiemax: has joined #RubyOnRails
[05:18:53] Rodya_: has joined #RubyOnRails
[05:20:24] schneider: has joined #RubyOnRails
[05:25:27] cagomez: has joined #RubyOnRails
[05:27:45] cagomez: has joined #RubyOnRails
[05:29:29] schneider: has joined #RubyOnRails
[05:37:15] Saukk: has joined #RubyOnRails
[05:38:34] schneider: has joined #RubyOnRails
[05:47:43] schneider: has joined #RubyOnRails
[05:54:16] apparition: has joined #RubyOnRails
[05:56:58] schneider: has joined #RubyOnRails
[05:57:01] LateralO1: has joined #RubyOnRails
[05:58:23] ephemer0l: has joined #RubyOnRails
[06:02:38] workmad3: has joined #RubyOnRails
[06:04:46] KeyJoo: has joined #RubyOnRails
[06:05:00] reber: has joined #RubyOnRails
[06:05:36] KeyJoo: has joined #RubyOnRails
[06:11:15] schneider: has joined #RubyOnRails
[06:19:36] Rodya_: has joined #RubyOnRails
[06:19:47] ariejan: has joined #RubyOnRails
[06:20:21] schneider: has joined #RubyOnRails
[06:22:46] duderonomy: has joined #RubyOnRails
[06:29:30] schneider: has joined #RubyOnRails
[06:33:50] morfin: has joined #RubyOnRails
[06:34:21] morfin: only way to use groupwise max in ActiveRecord is writing like 1/2 of query as plain text?
[06:38:37] schneider: has joined #RubyOnRails
[06:47:42] mtkd: has joined #RubyOnRails
[06:47:46] schneider: has joined #RubyOnRails
[06:56:46] schneider: has joined #RubyOnRails
[06:59:27] emers2n: has joined #RubyOnRails
[07:03:14] emers2n: I have a model that that has an integer field. I have a form in my view where they can edit this field. I want the field in the form for the user to be able to enter a string, after which in the controller I will convert it into an integer to save it. HOWEVER, Ruby on Rails is already converts the field in question to an integer when it sends it to the controller.
[07:04:18] ianfleeton: has joined #RubyOnRails
[07:04:30] emers2n: For example, I want them the user to be able to enter '1:30pm' in the form field, and then in the controller I want to convert it to an integer (90) to save it. However, when it gets to the controller it's already an integer (1:30am converted to 1)
[07:04:51] emers2n: Is there a simple way to solve this?
[07:05:53] schneider: has joined #RubyOnRails
[07:12:04] morfin: if i use .lock(true) with joins will be only primary table locked?
[07:12:53] darkhanb: has joined #RubyOnRails
[07:14:58] schneider: has joined #RubyOnRails
[07:16:11] mjolnird: has joined #RubyOnRails
[07:16:45] mjolnird: has joined #RubyOnRails
[07:17:30] elcms: has joined #RubyOnRails
[07:20:26] Rodya_: has joined #RubyOnRails
[07:24:03] schneider: has joined #RubyOnRails
[07:24:54] morfin: https://hastebin.com/ralafuzafe.sql
[07:25:11] morfin: i have this code: will be only emails table locked until transaction ends?
[07:26:54] elcms: has joined #RubyOnRails
[07:32:30] uks: has joined #RubyOnRails
[07:33:34] schneider: has joined #RubyOnRails
[07:35:27] mikecmpbll: has joined #RubyOnRails
[07:35:44] SteenJobs: has joined #RubyOnRails
[07:42:43] schneider: has joined #RubyOnRails
[07:51:49] schneider: has joined #RubyOnRails
[07:53:15] mtkd: has joined #RubyOnRails
[07:54:04] timdotrb: has joined #RubyOnRails
[07:55:03] timdotrb: has joined #RubyOnRails
[07:55:37] timdotrb: has joined #RubyOnRails
[07:57:35] LateralOctober: has joined #RubyOnRails
[08:00:53] schneider: has joined #RubyOnRails
[08:02:00] workmad3: has joined #RubyOnRails
[08:10:08] schneider: has joined #RubyOnRails
[08:19:06] schneider: has joined #RubyOnRails
[08:21:02] Rodya_: has joined #RubyOnRails
[08:24:30] sidx64: has joined #RubyOnRails
[08:28:39] schneider: has joined #RubyOnRails
[08:37:43] schneider: has joined #RubyOnRails
[08:46:52] schneider: has joined #RubyOnRails
[08:55:57] schneider: has joined #RubyOnRails
[09:03:40] dionysus69: has joined #RubyOnRails
[09:04:16] kapil___: has joined #RubyOnRails
[09:05:10] schneider: has joined #RubyOnRails
[09:14:13] schneider: has joined #RubyOnRails
[09:14:18] thomasfedb: morfin, hey, have you still got unanswered questions?
[09:14:23] mikecmpbll: has joined #RubyOnRails
[09:16:39] thomasfedb: emers2n, why not use a datetime in your model?
[09:17:28] ianfleeton: has joined #RubyOnRails
[09:18:43] thomasfedb: emers2n, or if you really need time of day, consider http://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html#method-i-serialize
[09:18:57] thomasfedb: emers2n, or perhaps https://github.com/JackC/tod
[09:21:50] Rodya_: has joined #RubyOnRails
[09:23:23] schneider: has joined #RubyOnRails
[09:26:23] sameerynho: has joined #RubyOnRails
[09:27:32] one_zero: has joined #RubyOnRails
[09:32:20] dionysus69: has joined #RubyOnRails
[09:32:32] schneider: has joined #RubyOnRails
[09:36:48] sidx64: has joined #RubyOnRails
[09:41:41] schneider: has joined #RubyOnRails
[09:50:52] schneider: has joined #RubyOnRails
[09:51:29] ur5us: has joined #RubyOnRails
[09:54:31] ur5us: has joined #RubyOnRails
[09:58:12] LateralO1: has joined #RubyOnRails
[09:59:52] schneider: has joined #RubyOnRails
[10:01:14] workmad3: has joined #RubyOnRails
[10:03:12] ianfleeton: has joined #RubyOnRails
[10:09:03] schneider: has joined #RubyOnRails
[10:18:12] schneider: has joined #RubyOnRails
[10:20:33] alfiemax: has joined #RubyOnRails
[10:21:01] ianfleeton: has joined #RubyOnRails
[10:22:35] Rodya_: has joined #RubyOnRails
[10:27:17] schneider: has joined #RubyOnRails
[10:29:28] quazimodo: has joined #RubyOnRails
[10:38:23] schneider: has joined #RubyOnRails
[10:47:39] schneider: has joined #RubyOnRails
[10:53:57] zmo: has joined #RubyOnRails
[10:54:03] zmo: hi 🙌
[10:55:01] zmo: I got a question about STI… is there a mechanism in ActiveRecord/Rails so that I can query a list with polymorphism applied?
[10:56:11] zmo: like I got `class X < ActiveRecord:Base`, with children `class A < X`, `class B < X`, `class C < X`
[10:56:46] schneider: has joined #RubyOnRails
[10:57:02] zmo: I have a `class Foo` that has a has_many relationship with X
[10:57:22] zmo: (through member `Foo.list_of_x`)
[10:58:03] zmo: if I create a bunch of A, B, C, linked to a single Foo row, that works fine
[10:58:33] sidx64: has joined #RubyOnRails
[10:58:49] zmo: but if I want to access `Foo.list_of_x` I get a bunch of `X`… is there a way I can have that list with polymorphism applied, so I get a bunch of A, B, C and not X?
[11:05:55] schneider: has joined #RubyOnRails
[11:15:51] mtkd: has joined #RubyOnRails
[11:16:55] schneider: has joined #RubyOnRails
[11:18:38] mostlybadfly: has joined #RubyOnRails
[11:23:12] alfiemax: has joined #RubyOnRails
[11:23:21] Rodya_: has joined #RubyOnRails
[11:26:03] schneider: has joined #RubyOnRails
[11:33:45] zmo: ok, I found that I can do `Foo.all.sample.list_of_x.map{ |elt| elt.becomes(elt.type.constantize) }`
[11:34:16] defsdoor: has joined #RubyOnRails
[11:34:18] zmo: but I believe there's a better way to do it, maybe a tad more efficient (even if efficiency in this context is not my prime concern)
[11:35:12] schneider: has joined #RubyOnRails
[11:44:21] schneider: has joined #RubyOnRails
[11:49:50] srinidhi: has joined #RubyOnRails
[11:53:28] schneider: has joined #RubyOnRails
[11:58:00] unreal: has joined #RubyOnRails
[11:58:44] LateralOctober: has joined #RubyOnRails
[12:00:38] workmad3: has joined #RubyOnRails
[12:01:07] roshanavand: has joined #RubyOnRails
[12:02:34] schneider: has joined #RubyOnRails
[12:11:45] schneider: has joined #RubyOnRails
[12:21:10] schneider: has joined #RubyOnRails
[12:21:11] sidx64_: has joined #RubyOnRails
[12:24:06] Rodya_: has joined #RubyOnRails
[12:26:22] roshanavand: has joined #RubyOnRails
[12:27:25] ur5us: has joined #RubyOnRails
[12:30:14] schneider: has joined #RubyOnRails
[12:39:22] schneider: has joined #RubyOnRails
[12:48:29] schneider: has joined #RubyOnRails
[12:59:32] schneider: has joined #RubyOnRails
[13:00:14] unreal_: has joined #RubyOnRails
[13:03:33] p8m: has joined #RubyOnRails
[13:08:40] schneider: has joined #RubyOnRails
[13:17:50] schneider: has joined #RubyOnRails
[13:22:11] dionysus69: has joined #RubyOnRails
[13:24:48] Rodya_: has joined #RubyOnRails
[13:25:36] one_zero: has joined #RubyOnRails
[13:26:57] schneider: has joined #RubyOnRails
[13:27:45] duderonomy: has joined #RubyOnRails
[13:32:46] alfiemax: has joined #RubyOnRails
[13:33:10] sameerynho: has joined #RubyOnRails
[13:35:53] dionysus69: has joined #RubyOnRails
[13:36:02] schneider: has joined #RubyOnRails
[13:44:31] schneider: has joined #RubyOnRails
[13:50:20] kurko_: has joined #RubyOnRails
[13:53:38] schneider: has joined #RubyOnRails
[13:59:19] LateralO1: has joined #RubyOnRails
[13:59:56] workmad3: has joined #RubyOnRails
[14:06:02] kurko_: has joined #RubyOnRails
[14:09:33] schneider: has joined #RubyOnRails
[14:18:46] schneider: has joined #RubyOnRails
[14:25:37] Rodya_: has joined #RubyOnRails
[14:27:54] schneider: has joined #RubyOnRails
[14:28:14] ur5us: has joined #RubyOnRails
[14:31:10] ianfleeton: has joined #RubyOnRails
[14:31:19] chouhoulis: has joined #RubyOnRails
[14:35:38] macduck: has joined #RubyOnRails
[14:37:02] schneider: has joined #RubyOnRails
[14:41:18] chouhoulis: has joined #RubyOnRails
[14:47:00] mtkd: has joined #RubyOnRails
[14:48:02] schneider: has joined #RubyOnRails
[14:57:13] schneider: has joined #RubyOnRails
[15:06:18] schneider: has joined #RubyOnRails
[15:07:36] apparition: has joined #RubyOnRails
[15:12:21] jbwiv_: has joined #RubyOnRails
[15:15:28] schneider: has joined #RubyOnRails
[15:21:02] orbyt_: has joined #RubyOnRails
[15:23:49] marr: has joined #RubyOnRails
[15:24:38] schneider: has joined #RubyOnRails
[15:26:23] Rodya_: has joined #RubyOnRails
[15:33:45] schneider: has joined #RubyOnRails
[15:42:50] schneider: has joined #RubyOnRails
[15:47:15] darkhanb: has joined #RubyOnRails
[15:48:38] coffee: has joined #RubyOnRails
[15:51:58] schneider: has joined #RubyOnRails
[15:59:11] workmad3: has joined #RubyOnRails
[16:01:06] schneider: has joined #RubyOnRails
[16:19:37] kurko_: has joined #RubyOnRails
[16:24:18] mroutis: has joined #RubyOnRails
[16:27:02] Rodya_: has joined #RubyOnRails
[16:27:18] trooney: has joined #RubyOnRails
[16:27:20] trooney: Convention question: I have a table with all available settings and their default values, and a polymorphic table containg the actual setting value for a given polymorphic model. What's the convention on naming these? Rails uses 'types' to indicate polymorphism. What do I call the "types" of settings in my app? (https://pastebin.com/WM7Beq5d)
[16:28:53] ur5us: has joined #RubyOnRails
[16:37:08] workmad3: has joined #RubyOnRails
[16:37:41] trooney: ACTION watches the tumbleweeds roll by
[16:42:01] sidx64: has joined #RubyOnRails
[16:51:05] mtkd: has joined #RubyOnRails
[16:54:52] unreal: has joined #RubyOnRails
[16:56:08] cagomez: has joined #RubyOnRails
[17:23:08] sidx64: has joined #RubyOnRails
[17:27:53] Rodya_: has joined #RubyOnRails
[17:36:55] KeyJoo: has joined #RubyOnRails
[17:37:46] Rodya_: has joined #RubyOnRails
[17:38:22] KeyJoo: has joined #RubyOnRails
[18:23:13] nexii: has joined #RubyOnRails
[18:24:03] nexii: hello. I was wondering if someone can help why this migration method is issuing an error: https://pastebin.com/4q5caZJ0
[18:27:28] LateralOctober: has joined #RubyOnRails
[18:27:35] ur5us: has joined #RubyOnRails
[18:33:59] cagomez_: has joined #RubyOnRails
[18:35:08] nexii: I feel as if the migration files are screwed and would like to regenerate them based on the existing models
[18:35:11] nexii: is that possible?
[18:50:31] schneider: has joined #RubyOnRails
[18:59:39] schneider: has joined #RubyOnRails
[19:04:45] alfiemax: has joined #RubyOnRails
[19:05:58] srinidhi: has joined #RubyOnRails
[19:06:46] cagomez: has joined #RubyOnRails
[19:08:51] schneider: has joined #RubyOnRails
[19:16:36] cagomez: has joined #RubyOnRails
[19:16:36] mtkd: has joined #RubyOnRails
[19:17:58] schneider: has joined #RubyOnRails
[19:27:03] schneider: has joined #RubyOnRails
[19:36:14] schneider: has joined #RubyOnRails
[19:45:20] schneider: has joined #RubyOnRails
[19:48:41] crankharder: has joined #RubyOnRails
[19:53:38] elomatreb: has left #RubyOnRails: ("WeeChat 2.1")
[19:54:28] schneider: has joined #RubyOnRails
[20:03:35] schneider: has joined #RubyOnRails
[20:12:45] schneider: has joined #RubyOnRails
[20:20:53] sidx64_: has joined #RubyOnRails
[20:21:52] schneider: has joined #RubyOnRails
[20:28:05] LateralO1: has joined #RubyOnRails
[20:31:02] schneider: has joined #RubyOnRails
[20:35:27] alfiemax: has joined #RubyOnRails
[20:36:20] cagomez: has joined #RubyOnRails
[20:40:08] schneider: has joined #RubyOnRails
[20:45:48] armyriad: has joined #RubyOnRails
[20:49:17] schneider: has joined #RubyOnRails
[20:58:24] schneider: has joined #RubyOnRails
[21:02:40] ellcs: has joined #RubyOnRails
[21:07:34] schneider: has joined #RubyOnRails
[21:16:39] schneider: has joined #RubyOnRails
[21:20:40] xelkarin: has joined #RubyOnRails
[21:21:07] xelkarin: I have a project where a single boolean column is added to an already existing table in the final migration.
[21:21:36] xelkarin: When I run 'rake db:create db:migrate db:seed' the seeding fails with ActiveModel::UnknownAttributeError when accessing that last column created.
[21:21:57] xelkarin: If I run 'rake db:create db:migrate' and 'rake db:seed' as separate commands everything runs fine.
[21:22:30] xelkarin: Anything I need to do to run database creation and seeding all in one go?
[21:25:55] schneider: has joined #RubyOnRails
[21:32:35] dviola: has joined #RubyOnRails
[21:36:50] schneider: has joined #RubyOnRails
[21:38:26] Dimik: has joined #RubyOnRails
[21:40:23] Puffball: has joined #RubyOnRails
[21:44:28] xelkarin: nm, I found the reset_column_information() method.
[21:46:01] schneider: has joined #RubyOnRails
[21:51:16] sameerynho: has joined #RubyOnRails
[21:53:01] orbyt_: has joined #RubyOnRails
[21:55:07] schneider: has joined #RubyOnRails
[21:57:56] alfiemax: has joined #RubyOnRails
[22:04:14] schneider: has joined #RubyOnRails
[22:12:45] quazimodo: has joined #RubyOnRails
[22:13:24] schneider: has joined #RubyOnRails
[22:14:03] wethu: has joined #RubyOnRails
[22:14:56] AnotherOne: has joined #RubyOnRails
[22:22:33] schneider: has joined #RubyOnRails
[22:28:39] LateralOctober: has joined #RubyOnRails
[22:31:37] schneider: has joined #RubyOnRails
[22:40:56] schneider: has joined #RubyOnRails
[22:50:00] schneider: has joined #RubyOnRails
[22:59:25] schneider: has joined #RubyOnRails
[23:05:54] darkhanb: has joined #RubyOnRails
[23:08:16] darkhanb: has joined #RubyOnRails
[23:08:16] schneider: has joined #RubyOnRails
[23:11:55] wethu: has joined #RubyOnRails
[23:17:25] schneider: has joined #RubyOnRails
[23:25:45] kies: has joined #RubyOnRails
[23:26:50] schneider: has joined #RubyOnRails
[23:27:24] mroutis: has joined #RubyOnRails
[23:35:57] schneider: has joined #RubyOnRails
[23:39:10] Puffball: has joined #RubyOnRails
[23:44:38] schneider: has joined #RubyOnRails
[23:53:49] schneider: has joined #RubyOnRails
[23:54:23] DTZUZO: has joined #RubyOnRails
[23:58:05] quazimodo: has joined #RubyOnRails