« Back to channel list

#RubyOnRails - 08 January 2019

« Back 1 day Forward 1 day »
[00:05:03] drale2k_: has joined #RubyOnRails
[00:27:27] fugee: has joined #RubyOnRails
[00:27:34] fugee: any spree users in here
[00:52:06] mheld: has joined #RubyOnRails
[00:57:25] conta: has joined #RubyOnRails
[01:04:18] NeXTSUN: has joined #RubyOnRails
[01:06:59] sevenseacat: has joined #RubyOnRails
[01:07:41] zcarey: has joined #RubyOnRails
[01:13:38] NeXTSUN: has joined #RubyOnRails
[01:31:21] havenwood: has joined #RubyOnRails
[01:45:19] lupine: has joined #RubyOnRails
[01:45:46] uplime: has joined #RubyOnRails
[01:46:15] Technodrome: has joined #RubyOnRails
[01:46:57] baweaver: fugee: Again, you need to contact their support channels. They have a slack among other things
[02:12:42] xall: has joined #RubyOnRails
[02:19:50] Saukk: has joined #RubyOnRails
[02:28:18] SteenJobs: has joined #RubyOnRails
[02:42:07] gambl0r3: has joined #RubyOnRails
[02:56:22] maryo_: has joined #RubyOnRails
[03:00:53] Technodrome: has joined #RubyOnRails
[03:00:59] arthurnn: has joined #RubyOnRails
[03:02:42] orbyt_: has joined #RubyOnRails
[03:09:11] cayuse: has joined #RubyOnRails
[03:09:25] cayuse: has left #RubyOnRails: ()
[03:10:01] cayuse: has joined #RubyOnRails
[03:10:08] cayuse: has left #RubyOnRails: ()
[03:12:55] wethu: has joined #RubyOnRails
[03:50:18] eckhardt: has joined #RubyOnRails
[03:56:20] tdy: has joined #RubyOnRails
[04:09:50] braincrash: has joined #RubyOnRails
[04:10:16] madebymarkca: has joined #RubyOnRails
[04:10:39] madebymarkca: has joined #RubyOnRails
[04:13:27] tdy: has joined #RubyOnRails
[04:24:33] za1b1tsu: has joined #RubyOnRails
[04:57:38] tdy: has joined #RubyOnRails
[05:00:04] ariedler: has joined #RubyOnRails
[05:34:14] xall: has joined #RubyOnRails
[05:51:04] lexileo: has joined #RubyOnRails
[05:53:51] xall: has joined #RubyOnRails
[06:02:55] za1b1tsu: has joined #RubyOnRails
[06:07:10] reber: has joined #RubyOnRails
[06:21:26] conta: has joined #RubyOnRails
[06:41:03] dionysus69: has joined #RubyOnRails
[06:43:43] NeXTSUN: has joined #RubyOnRails
[06:46:45] gambl0r3: has joined #RubyOnRails
[07:01:10] ariedler: has joined #RubyOnRails
[07:07:16] Technodrome: has joined #RubyOnRails
[07:21:35] zululee_: has joined #RubyOnRails
[07:54:17] cnsvc: has joined #RubyOnRails
[07:55:07] za1b1tsu: has joined #RubyOnRails
[08:10:20] mauro1254: has joined #RubyOnRails
[08:15:25] armyriad: has joined #RubyOnRails
[08:19:07] hays: has joined #RubyOnRails
[08:28:51] arcaos: has joined #RubyOnRails
[09:01:56] ariedler: has joined #RubyOnRails
[09:07:34] srinidhi: has joined #RubyOnRails
[09:08:27] mikecmpbll: has joined #RubyOnRails
[09:16:18] xall: has joined #RubyOnRails
[09:21:04] drale2k_: has joined #RubyOnRails
[09:41:40] scatterp: has joined #RubyOnRails
[09:41:49] scatterp: hi i updated from ruby 2.5.1 to ruby 2.6.0 and I am getting this error TypeError (wrong argument type Hash (expected String)): app/controllers/application_controller.rb:208:in `set_gon' can any one tell me whats wrong here gem files are all the same
[09:45:44] lxsameer: has joined #RubyOnRails
[10:04:23] dionysus69: has joined #RubyOnRails
[10:06:03] Ergo: has joined #RubyOnRails
[10:06:29] blackmesa: has joined #RubyOnRails
[10:07:56] wethu: has joined #RubyOnRails
[10:10:49] Saukk: has joined #RubyOnRails
[10:34:22] srinidhi: has joined #RubyOnRails
[10:35:55] lxsameer: has joined #RubyOnRails
[10:39:33] Puffball: has joined #RubyOnRails
[10:44:31] apparition: has joined #RubyOnRails
[11:00:21] wethu: has joined #RubyOnRails
[11:01:07] wethu: has joined #RubyOnRails
[11:17:26] sirensari2: has joined #RubyOnRails
[11:55:08] ariedler: has joined #RubyOnRails
[12:16:15] segy: has joined #RubyOnRails
[12:18:12] exchgr`: has joined #RubyOnRails
[12:29:11] za1b1tsu: has joined #RubyOnRails
[12:42:32] Jervis_: has joined #RubyOnRails
[13:10:40] dslegends: has joined #RubyOnRails
[13:11:02] nertzy: has joined #RubyOnRails
[13:30:23] conta1: has joined #RubyOnRails
[13:32:06] michael_mbp: has joined #RubyOnRails
[13:49:10] EnderMB: has joined #RubyOnRails
[14:44:30] regedit: has joined #RubyOnRails
[15:01:43] kapil____: has joined #RubyOnRails
[15:02:56] dbugger_: has joined #RubyOnRails
[15:12:33] arcaos: has joined #RubyOnRails
[15:29:21] GodFather: has joined #RubyOnRails
[15:37:05] chouhoulis: has joined #RubyOnRails
[15:39:51] scrptktty: has joined #RubyOnRails
[15:46:17] IGnorAND: You can make an enum in a model. Can you also connect it to a number?
[15:48:59] IGnorAND: think I found it
[15:52:48] GodFather: has joined #RubyOnRails
[15:54:31] NL3limin4t0r_afk: IGnorAND: It is by default connected to the array index. At least, if you're talking about https://api.rubyonrails.org/classes/ActiveRecord/Enum.html
[15:55:47] NL3limin4t0r_afk: For explicit numbers use an hash. eg. `enum status: { active: 0, archived: 1 }`
[15:55:55] IGnorAND: NL3limin4t0r_afk: I have an external DB with a list of vehicle types, instead of doing an external query I wanted to make an enum with their ids
[15:56:55] IGnorAND: NL3limin4t0r: that's what I did :)
[16:02:06] NL3limin4t0r: However keep in mind that enum is set on model initialisation. If the model (class) is initialized changes to the external database will not be reflected in the enum.
[16:06:32] NL3limin4t0r: You can ignore the above if your enum is hardcoded. However if you set your enum dynamically you'll have to take this into account. eg. `enum status: SomeModelConnectedWithExternalDb.pluck(:slug, :id).to_h.symbolize_keys`
[16:10:18] NL3limin4t0r: ^ I just realized the symbolize_keys is obsolete in the above example.
[16:10:59] GodFather: has joined #RubyOnRails
[16:28:34] ams__: has joined #RubyOnRails
[16:28:44] unreal: has joined #RubyOnRails
[16:44:14] GodFather: has joined #RubyOnRails
[16:47:20] tdy: has joined #RubyOnRails
[16:50:25] catbusters: has joined #RubyOnRails
[16:50:50] duderonomy: has joined #RubyOnRails
[16:58:39] srinidhi: has joined #RubyOnRails
[17:02:16] duderono_: has joined #RubyOnRails
[17:08:22] IGnorAND: @NL3limin4t0r hardcoded enum. I know.
[17:08:49] IGnorAND: @NL3limin4t0r thanks for the warning :)
[17:20:08] tdy: has joined #RubyOnRails
[17:29:57] za1b1tsu: has joined #RubyOnRails
[17:38:29] darkphnx: has joined #RubyOnRails
[17:41:51] orbyt_: has joined #RubyOnRails
[17:56:03] maryo: has joined #RubyOnRails
[18:01:22] eclm: has joined #RubyOnRails
[18:21:00] defsdoor: has joined #RubyOnRails
[18:31:26] gambl0r3: has joined #RubyOnRails
[18:42:45] GodFather: has joined #RubyOnRails
[18:43:37] tdy: has joined #RubyOnRails
[18:46:36] tdy: has joined #RubyOnRails
[18:55:03] snickers: has joined #RubyOnRails
[18:57:32] conta1: has joined #RubyOnRails
[19:01:29] sameerynho: has joined #RubyOnRails
[19:04:00] FastJack: has joined #RubyOnRails
[19:04:43] lxsameer: has joined #RubyOnRails
[19:11:23] za1b1tsu: has joined #RubyOnRails
[19:13:04] SteenJobs: has joined #RubyOnRails
[19:15:12] GodFather: has joined #RubyOnRails
[19:26:01] srinidhi: has joined #RubyOnRails
[19:33:46] NL3limin4t0r: IGnorAND: In most other languages enums are constants, so that's not really anything worrisome. Ruby doesn't really have enums build-in and instead uses symbols to achieve the same result. Rails introduced them into the models to simplify the state of an record.
[19:37:09] tdy: has joined #RubyOnRails
[19:41:50] GodFather: has joined #RubyOnRails
[19:46:20] IGnorAND: I have an api app, but in my model I have something like author_id. In my display I'd like to see author_name. With the render json it just sends author_id, do we custom build all json for foreign keys?
[19:50:29] krawchyk: has joined #RubyOnRails
[20:01:35] tdy: has joined #RubyOnRails
[20:04:27] krawchyk_: has joined #RubyOnRails
[21:15:37] crankharder: has joined #RubyOnRails
[21:19:37] mikecmpbll: has joined #RubyOnRails
[21:25:35] GodFather: has joined #RubyOnRails
[21:27:27] orbyt_: has joined #RubyOnRails
[21:48:09] hellekin: has joined #RubyOnRails
[21:57:35] lexileo: has joined #RubyOnRails
[22:02:01] krawchyk: has joined #RubyOnRails
[22:34:59] benlieb: has joined #RubyOnRails
[22:37:39] omix: has joined #RubyOnRails
[22:38:12] benlieb: is it not possible to use a has_one :through association name in a where clause? Seems not… but i thought it should..
[22:38:23] benlieb: I wanted to do this Departure.where(area_manager: Employee.find(7))
[22:38:47] benlieb: which seems to igore it completely
[22:38:47] benlieb: SELECT 1 AS one FROM `departure` WHERE `departure`.`id` IS NULL LIMIT 1
[22:38:57] benlieb: I have to do this: Departure.joins(:itinerary).where('itinerary.area_manager_id = 7')
[22:39:12] benlieb: Departure:
[22:39:13] benlieb: belongs_to :itinerary
[22:39:14] benlieb: has_one :area_manager, through: :itinerary
[22:40:44] wethu: has joined #RubyOnRails
[22:46:27] omix: has joined #RubyOnRails
[22:51:30] tdy: has joined #RubyOnRails
[22:56:03] bvdw: has joined #RubyOnRails
[23:05:46] IGnorAND: benlieb: odd, should work
[23:06:12] NeXTSUN: has joined #RubyOnRails
[23:07:20] IGnorAND: Not sure, but maybe you missed the belongs_to and has_one in the other models: https://guides.rubyonrails.org/association_basics.html#the-has-one-through-association
[23:09:57] snuz: has joined #RubyOnRails
[23:13:32] Aherin_: has joined #RubyOnRails
[23:46:50] srruby: has joined #RubyOnRails
[23:47:26] srruby: How are people setting environment variables these days? I'm setting up a production Rails 5 app on Debian 9 ?