« Back to channel list

#RubyOnRails - 05 March 2019

« Back 1 day Forward 1 day »
[00:07:30] xco: has joined #RubyOnRails
[00:10:23] Inside: davidfetter_work: there are no implicit foreign key constraints?
[00:10:32] Inside: as in, they may not be constraints
[00:10:50] Inside: (at a database level)
[00:12:25] tbuehlmann: has joined #RubyOnRails
[00:15:25] conta: has joined #RubyOnRails
[00:18:17] davidh38: has joined #RubyOnRails
[00:25:33] davidfetter_work: Inside: you've identified the problem very precisely. None of them are actual (as in database-enforced) FKs.
[00:29:57] Inside: yay rails
[00:29:58] mangold: has joined #RubyOnRails
[00:32:02] Inside: ACTION hammers on the tests until they pass
[00:32:17] Inside: I'm doing this so wrong :>|
[00:38:58] helpa: has joined #RubyOnRails
[00:43:26] fcser_: has joined #RubyOnRails
[00:45:58] uks: has joined #RubyOnRails
[00:57:54] mojtaba: has joined #RubyOnRails
[01:01:14] Inside: Man, I hate naming things
[01:01:30] Inside: Trying to figure out if I want to name a class UserIdentity or Identity
[01:01:51] Inside: This will be like, a major class in the entire application so it's important to get the name right
[01:03:06] davidfetter_work: There are two hard problems in computer science: Naming things, cache coherency, and off-by-one.
[01:03:12] Inside: haha yeah ;)
[01:04:05] davidfetter_work: I have hopes for cache coherency. The others, not so much.
[01:04:06] Inside: what would you suggest?
[01:04:31] Inside: I have a User and a user has 0 or more identities
[01:04:46] davidfetter_work: could there ever be an identity for something that's not a user?
[01:05:01] davidfetter_work: for example, might identities nest?
[01:05:25] Inside: "identity" is just what the person will use to login as - either their email... or in the case of temp employees, a PIN
[01:05:51] orbyt_: has joined #RubyOnRails
[01:06:07] davidfetter_work: so it's flat. I'd call it a UserIdentity just in case there's ever something else that might need one.
[01:06:16] Inside: the application validates corporate credentials against active directory, if provided, or the database if a PIN is provided
[01:07:05] Inside: IT tells me that they can't create AD accounts for everyone since it costs money??
[01:15:16] mangold: has joined #RubyOnRails
[01:21:17] SanguineAnomaly: has joined #RubyOnRails
[01:27:24] SanguineAnomaly: has joined #RubyOnRails
[01:29:14] sevenseacat: has joined #RubyOnRails
[01:55:41] kvda: has joined #RubyOnRails
[01:59:03] kvda: has joined #RubyOnRails
[01:59:25] davidfetter_work: Inside: if you were wondering why I prefer stuff that doesn't have a proprietor...
[02:28:00] Technodrome: thinking that i want to switch back to rails for work
[02:28:05] Technodrome: currently doing python
[02:44:32] agent_white: has joined #RubyOnRails
[02:50:01] s00pcan: has joined #RubyOnRails
[02:52:04] ariedler: has joined #RubyOnRails
[02:54:06] ariedler: has joined #RubyOnRails
[03:01:51] Tempesta: has joined #RubyOnRails
[03:05:20] quazimodo: has joined #RubyOnRails
[03:09:47] greasysock: has joined #RubyOnRails
[03:11:30] greasysock: What are people's preferred method of deployment that isn't Heroku?
[03:24:22] hellekin: has joined #RubyOnRails
[03:54:34] istrasci: has joined #RubyOnRails
[03:55:08] istrasci: Can anyone tell me what delete_all returns?
[03:56:15] istrasci: Or how can I make it deliberately fail in a unit test?
[03:58:15] Radar: Technodrome: seems like a good plan. I support this.
[03:58:40] Radar: greasysock: Docker container, probably on Amazon ECS.
[03:58:56] Radar: istrasci: why do you want it to deliberately fail?
[03:58:57] Technodrome: Radar the only thing is, i'm always placed in Python positions
[03:59:01] Radar: Technodrome: seems bad
[03:59:11] Technodrome: just how my world plays out
[03:59:38] sevenseacat: you don't choose where you get 'placed'?
[03:59:48] istrasci: Radar: I have a method running a transaction, and I want to test all ways the transaction could fail and rollback.
[04:00:07] Radar: sevenseacat: that's what I sid
[04:02:41] tdy: has joined #RubyOnRails
[04:02:58] Technodrome: sevenseacat my last full time rails gig was 2009 , so yeah, i'm just not getting placed in rails jobs
[04:03:04] Technodrome: but python ones come rather easy
[04:03:35] sevenseacat: are you one of those consultant types that gets shunted from gig to gig?
[04:03:41] sevenseacat: instead of taking your own job?
[04:04:15] sevenseacat: consultants are just bodies to throw at clients in my experience
[04:09:19] braincrash: has joined #RubyOnRails
[04:19:28] ariedler: has joined #RubyOnRails
[04:37:12] v01d4lph4: has joined #RubyOnRails
[04:38:47] Technodrome: sevenseacat all w2 positions
[04:38:56] Technodrome: what do you mean, taking your own job?
[04:54:40] ariedler: has joined #RubyOnRails
[05:02:56] kapil____: has joined #RubyOnRails
[05:03:40] Xiti: has joined #RubyOnRails
[05:05:40] dviola: has joined #RubyOnRails
[05:11:33] srinidhi: has joined #RubyOnRails
[05:15:46] ur5us: has joined #RubyOnRails
[05:36:37] quazimodo: has joined #RubyOnRails
[05:39:30] mangold: has joined #RubyOnRails
[06:05:47] odinsbane: has left #RubyOnRails: ()
[06:06:08] bga57: has joined #RubyOnRails
[06:06:36] wethu: has joined #RubyOnRails
[06:19:05] mangold: has joined #RubyOnRails
[06:20:37] hellekin: has joined #RubyOnRails
[06:21:28] conta: has joined #RubyOnRails
[06:46:57] mangold: has joined #RubyOnRails
[07:06:22] srinidhi: has joined #RubyOnRails
[07:09:08] za1b1tsu: has joined #RubyOnRails
[07:09:56] w0rd-driven: has joined #RubyOnRails
[07:17:42] reber: has joined #RubyOnRails
[07:45:24] LightStalker: has joined #RubyOnRails
[07:47:44] mangold: has joined #RubyOnRails
[08:00:33] hellekin: has joined #RubyOnRails
[08:01:19] lankanmon: has joined #RubyOnRails
[08:12:58] Leifr: has joined #RubyOnRails
[08:23:14] kvda: has joined #RubyOnRails
[09:03:57] hellekin: has joined #RubyOnRails
[09:27:13] kvda: has joined #RubyOnRails
[09:38:12] lxsameer: has joined #RubyOnRails
[09:49:01] tdy: has joined #RubyOnRails
[09:59:13] gambl0r3: has joined #RubyOnRails
[10:04:33] egray: has joined #RubyOnRails
[10:21:26] apparition: has joined #RubyOnRails
[10:28:11] DTZUZO: has joined #RubyOnRails
[10:33:53] uks: has joined #RubyOnRails
[10:44:47] tdy: has joined #RubyOnRails
[10:49:39] dionysus70: has joined #RubyOnRails
[10:57:06] davidh38: has joined #RubyOnRails
[11:01:29] helpa: has joined #RubyOnRails
[11:02:24] Radar: !botsnack
[11:02:24] helpa: Nom nom. Thanks, Radar!
[11:11:08] conta: has joined #RubyOnRails
[11:46:58] lankanmon: has joined #RubyOnRails
[11:50:11] helpa: Nam nam. Thonks, sevenseacat!
[11:55:31] ariedler: has joined #RubyOnRails
[11:57:43] ariedler: has joined #RubyOnRails
[12:00:52] Fernando-Basso: has joined #RubyOnRails
[12:09:09] tdy: has joined #RubyOnRails
[12:17:07] tdy: has joined #RubyOnRails
[12:24:53] srinidhi: has joined #RubyOnRails
[12:31:12] dustinm`: has joined #RubyOnRails
[12:39:35] jane_booty_doe: has joined #RubyOnRails
[13:04:58] michael_mbp: has joined #RubyOnRails
[13:08:55] davidh38: has joined #RubyOnRails
[13:31:37] davidh38: has joined #RubyOnRails
[13:35:45] za1b1tsu: has joined #RubyOnRails
[13:44:31] davidh38: has joined #RubyOnRails
[14:09:10] mangold: has joined #RubyOnRails
[14:09:17] davidh38: has joined #RubyOnRails
[14:13:30] Eindoofus: has joined #RubyOnRails
[14:14:56] Eindoofus: as someone who already has some Java Spring REST experience, do you guys have any recommendations on what books or resources to look at to learn how to use Rails to make an API for a web app?
[14:20:40] fox_mulder_cp: eindoofus you can start from reading a official rails guides )
[14:21:23] fox_mulder_cp: api disable some features like server side application pages rendering, assets compilation and some others
[14:22:56] Eindoofus: "disable some features like server side application pages rendering, assets compilation and some others" i feel like i need more hand-holding material than the guides. this sounds like i'd be going against the grain
[14:23:29] uksio: has joined #RubyOnRails
[14:24:05] tbuehlmann: I also recommend the official guides. there's also a part for api-only applications: https://guides.rubyonrails.org/api_app.html
[14:30:46] TheMoonMaster: fox_mulder_cp: I've done that a few times but if you end up needing those features it's a pain to bring them back
[14:30:51] tdy: has joined #RubyOnRails
[14:32:32] TheMoonMaster: like an API for a mobile app "how are we gonna serve our landing page?". guess who had to bring back assets and server rendering :P
[14:34:21] davidh38: has joined #RubyOnRails
[14:46:58] conta: has joined #RubyOnRails
[14:51:42] fox_mulder_cp: TheMoonMaster api mode - it's a api only mode. with rejected all asset/page rendetion, cookies and another functionality for easying and lighting application code base
[14:52:25] fox_mulder_cp: btw - all static pages can be served via nginx, apache or IIS or another web server
[14:52:48] fox_mulder_cp: i have a landing page generated via reactjs app
[14:53:26] agent_white: has joined #RubyOnRails
[14:56:06] jane_booty_doe: has joined #RubyOnRails
[14:58:38] Sylario: has joined #RubyOnRails
[15:11:05] davidh38: has joined #RubyOnRails
[15:12:45] pokalyis: has joined #RubyOnRails
[15:13:15] pokalyis: Is there a way to use single table inheritance, where each child has their own columns?
[15:14:05] pokalyis: So say I've a TwitterUser and a FacebookUser. They share some columns but not all
[15:14:14] pokalyis: But I still want to use the same table
[15:19:26] fox_mulder_cp: one user can have #facebook_name, #twitter_name both
[15:21:25] pokalyis: fox_mulder_cp FacebookUser has multiply attributes, not just name
[15:21:33] pokalyis: Same thing with TwitterUser
[15:23:42] fox_mulder_cp: so User has_one facebook_props, and User has_one twi_props..
[15:23:55] davidh38: has joined #RubyOnRails
[15:24:26] fox_mulder_cp: in pgsql you can store json-based hash at one table column
[15:24:35] pokalyis: I was thinking about jsonb
[15:24:44] pokalyis: As that's queryable
[15:25:09] pokalyis: Is there a way to map jsonb attributes to model attributes so I can use validation
[15:25:40] pokalyis: TwitterUser#custom_id points to TwitterUser#props.customer_id
[15:25:41] fox_mulder_cp: scope :hold, -> { where("status @> ARRAY[?]::varchar[]", ['clientHold']) }
[15:26:20] fox_mulder_cp: t.string :status, array: true, default: []
[15:26:28] fox_mulder_cp: t.hstore :contacts, default: {}
[15:26:50] fox_mulder_cp: pokalyis: create getter and setter def's )
[15:27:27] pokalyis: There's no more rails-is way to just map the jsonb prop to the attributes?
[15:28:05] conta: has joined #RubyOnRails
[15:30:59] jgx_: has joined #RubyOnRails
[15:34:28] jgx: has joined #RubyOnRails
[15:34:29] pokalyis: Aha, found the virtus gem
[15:34:32] pokalyis: fox_mulder_cp thanks
[15:47:16] TheMoonMaster: fox_mulder_cp: lightning? also you can make a landing page via a react app, but that takes extra skills, context, etc.
[15:47:50] TheMoonMaster: if you're a team of Rails devs it makes sense to use Rails there and once you grow you can re-evaluate that. it's all pretty context dependent tbh
[15:54:50] szulak_: has joined #RubyOnRails
[16:04:38] vcavallo: TheMoonMaster: I agree with your above sentiment: it usually safer to use full Rails and only utitilize the api-ish bits so you still have the other stuff if you want it
[16:05:18] vcavallo: then if you truly truly have an api-only app after lots of product development, then maybe extract it out to an API-only rails to save a few bytes (but also sort of who cares)
[16:17:06] agent_white: has joined #RubyOnRails
[16:18:23] orbyt_: has joined #RubyOnRails
[16:29:14] mangold: has joined #RubyOnRails
[16:34:59] mauro1254: has joined #RubyOnRails
[16:42:35] dionysus70: has joined #RubyOnRails
[16:46:59] DTZUZO: has joined #RubyOnRails
[16:52:30] yaw: has joined #RubyOnRails
[16:54:16] davidh38: has joined #RubyOnRails
[16:58:11] agent_white: has joined #RubyOnRails
[17:00:06] agent_white: has joined #RubyOnRails
[17:03:08] tdy: has joined #RubyOnRails
[17:08:24] reber: has joined #RubyOnRails
[17:18:02] gambl0r3: has joined #RubyOnRails
[17:25:39] Ergo: has joined #RubyOnRails
[17:27:50] Dbugger: has joined #RubyOnRails
[17:28:36] reber__: has joined #RubyOnRails
[17:32:01] orbyt_: has joined #RubyOnRails
[17:33:40] davidh38: has joined #RubyOnRails
[17:44:23] [Butch]: has joined #RubyOnRails
[17:45:49] dionysus70: has joined #RubyOnRails
[17:47:38] conta: has joined #RubyOnRails
[17:48:21] orbyt_: has joined #RubyOnRails
[17:58:03] ravenousmoose: has joined #RubyOnRails
[18:04:14] skryking: has joined #RubyOnRails
[18:12:02] conta: has joined #RubyOnRails
[18:15:13] Sylario: I am using jsonapi-rb as a serializer. It allow you to alias attibute name (key: in AMS), however, when there is an error the source should contain a pointer with the model and attribute, and when it's an alias, it's empty
[18:15:53] Sylario: example: {"errors":[{"title":"Invalid content","detail":"error message","source":{}}],"jsonapi":{"version":"1.0"}}
[18:22:07] andywww: has joined #RubyOnRails
[18:22:22] andywww: typically would you put preloads in your query objects?
[18:23:05] andywww: it feels tidier but it makes it feel a bit presumptuous
[18:26:14] tdy: has joined #RubyOnRails
[18:26:30] davidh38: has joined #RubyOnRails
[18:26:39] kapil____: has joined #RubyOnRails
[18:36:23] jaddison: has joined #RubyOnRails
[18:48:22] [Butch]: has joined #RubyOnRails
[18:48:49] cnsvc_: has joined #RubyOnRails
[18:50:25] akadmks: has joined #RubyOnRails
[18:58:55] sameerynho: has joined #RubyOnRails
[18:59:04] akadmks: So I have a pretty noob question. I seem to have bootstrap 4 working on rails 5.2.2 but can not get it to pick up a theme when i try to link the _bootswatch.scss from the bootswatch website
[19:00:13] tdy: has joined #RubyOnRails
[19:00:38] uksio: has joined #RubyOnRails
[19:04:17] Sylario: DOes anybody has an example controller with JSON-API rb
[19:08:47] ascarter: has joined #RubyOnRails
[19:16:46] ravenousmoose: has joined #RubyOnRails
[19:27:31] orbyt_: has joined #RubyOnRails
[19:39:17] conta: has joined #RubyOnRails
[19:41:49] jaddison: has joined #RubyOnRails
[19:56:48] andywww: has joined #RubyOnRails
[20:02:51] Sylario: I cannot manage to make JSONAPI-RB deserializer works : https://github.com/jsonapi-rb/jsonapi-rb/issues/6
[20:03:00] Sylario: If anyone has any experience with it
[20:03:32] Sylario: wrong URL : https://github.com/jsonapi-rb/jsonapi-rails/issues/103
[20:03:49] Sylario: I have multiples problems with jsonapi
[20:07:34] reber: has joined #RubyOnRails
[20:07:47] reber__: has joined #RubyOnRails
[20:08:51] orbyt_: has joined #RubyOnRails
[20:11:25] hd1: has joined #RubyOnRails
[20:22:31] tdy: has joined #RubyOnRails
[20:24:59] ellcs: has joined #RubyOnRails
[20:31:23] Sylario: how would you put a byebug in a third party gem?
[20:33:17] szulak_: has joined #RubyOnRails
[20:35:06] ascarter: has joined #RubyOnRails
[20:38:28] conta: has joined #RubyOnRails
[20:39:00] antigerme: has joined #RubyOnRails
[20:40:07] antigerme: has joined #RubyOnRails
[20:54:06] [Butch]: has joined #RubyOnRails
[21:00:15] ravenousmoose: has joined #RubyOnRails
[21:00:59] s00pcan: has joined #RubyOnRails
[21:04:22] Radar: GOOD MORNING
[21:04:52] hd1: RADAR: MORNING
[21:05:01] hd1: hit your caps lock, please?
[21:14:18] Sylario: Is there a way to use byebug in railtie ?
[21:14:20] Sylario: `method_missing': undefined local variable or method `byebug' for JSONAPI::Rails::Railtie:Class (NameError)
[21:14:54] Sylario: I am trying to understand a gem and I cannot use byebug everywhere. I guess there is probably some loading order not respected
[21:15:21] hd1: which gem?
[21:15:40] Sylario: jsonapi-rb
[21:16:02] Sylario: jsonapi-rails-0.3.1
[21:16:18] Inside: RADAR \o/
[21:17:27] Sylario: The gem is supposed to add a _jsonap key somewhere in params, but it does not and the deserializer looks for it
[21:17:42] Sylario: So I am just trying to understand how that works
[21:18:19] Inside: sylario: you can set breakpoints
[21:18:28] Sylario: yes with byebug
[21:18:45] Inside: is that a question or statement?
[21:18:48] Sylario: but it does not work
[21:18:49] Radar: hd1: SORRY CAPS LOCK IS CURRENTLY BROKEN
[21:19:04] Inside: b my_file.rb:40 ?
[21:19:09] Radar: sylario: you may need to require byebug before you can call its method.
[21:19:24] hd1: Radar: clearly it does :p
[21:19:40] Radar: hd1: oops
[21:19:44] reber__: has joined #RubyOnRails
[21:21:34] Sylario: Radar: well I should have tried it, a require 'byebug' just worked
[21:21:47] Inside: I didn't even get the question right
[21:21:50] Radar: sylario: it's okay it is still early morning in some parts of the world. You are forgiven
[21:21:59] Radar: ACTION doles out forgiveness to Inside too
[21:22:01] Sylario: it"s 22:21 here
[21:22:07] Inside: It's true
[21:22:10] Inside: Radar IS the second coming of Jesus
[21:22:13] Radar: sylario: that's past my bedtime.
[21:22:22] Radar: Inside: nah he was way cooler
[21:22:34] Radar: Inside: his best miracle was having 12 close friends in his 30s
[21:24:14] Inside: too close to home
[21:24:30] Radar: boom right in the feels
[21:33:59] Sylario: https://github.com/jsonapi-rb/jsonapi-rails/blob/v0.3.1/lib/jsonapi/rails/railtie.rb#L12 I put a byebug inside the PARSER but it is never called. DOes it seems like something that would be called by rails ?
[21:39:39] Inside: aren't railties initialized like at the beginning?
[21:39:47] Inside: how did you put a byebug?
[21:41:43] Inside: man this is amazing. I copied a config file from my main project to my proof of concept project.. got LDAP authorization working in the POC, then can't replicate the results in the main project /even though the files are the same/
[21:41:59] Sylario: I vi'd the railtie.rb of my gem in rvm
[21:42:30] Sylario: in the rvm folders where the gem is stored
[21:43:11] Sylario: But it seems PARSER is added to ActionDispatch::Request.parameter_parsers[:jsonapi]
[21:44:36] Sylario: <Proc:0x0055b84f414b98@/home/sylvain/.rvm/gems/ruby-2.4.1/gems/active_model_serializers-0.10.7/lib/active_model_serializers/register_jsonapi_renderer.rb:55 (lambda)>
[21:44:46] Sylario: gem conflict
[21:47:08] jaddison: has joined #RubyOnRails
[21:47:22] Inside: I haven't tried this yet, but you oculd put 'byebug' in application.rb before 'rails/all' and then set the breakpoint in the file?
[21:49:25] Sylario: Inside the include bybuge works, the lambda is never called because somewhere it is destroyed by AMS parser
[21:49:32] Sylario: or something like that
[21:51:09] Sylario: Inside: include byebug at the start of the gem railtie was enough to make it works
[22:06:13] andywww: has joined #RubyOnRails
[22:21:01] hightower3: has joined #RubyOnRails
[22:22:06] hightower3: Hey if I have a N-N table linking user_ids to role_ids, what would its default rails-generated table name be?
[22:22:34] Inside: role_users
[22:22:49] hightower3: Why does 'role' come first?
[22:26:05] hightower3: and also, why is it not named roles_users given N-N?
[22:29:41] Radar: roles_users.
[22:29:54] Radar: because it's a N-N
[22:30:52] hightower3: Great, and is there any particular reason/explanation why roles_users instead of users_roles?
[22:31:22] Radar: Inside: Yeah, why is it that way?
[22:32:27] Net: I believe it's alphabetical
[22:32:38] Radar: What Net saidf
[22:36:05] Sylario: well, i'll have a bastardized serialize /deserialize for now, but at least I learned a few things about rails
[22:38:02] Inside: that rails is wonderful so long as you stay in the tiny little box it made for ou
[22:38:18] Radar: Inside: yes, stay Inside.
[22:40:03] Inside: ACTION demodulates Radar 
[22:40:38] tdy: has joined #RubyOnRails
[23:06:50] ascarter: has joined #RubyOnRails
[23:14:13] kvda: has joined #RubyOnRails
[23:16:51] davidh38: has joined #RubyOnRails
[23:17:42] gambl0r3: has joined #RubyOnRails
[23:20:11] hammer065: has joined #RubyOnRails
[23:34:04] duderonomy: has joined #RubyOnRails
[23:35:35] ellcs: has joined #RubyOnRails