« Back to channel list

#RubyOnRails - 15 January 2019

« Back 1 day Forward 1 day »
[00:03:36] Linuus: has joined #RubyOnRails
[00:18:10] mat_bug: has joined #RubyOnRails
[00:36:09] nchambers: has joined #RubyOnRails
[00:38:59] mat_bug: has joined #RubyOnRails
[00:44:35] orbyt_: has joined #RubyOnRails
[00:58:39] mat_bug: has joined #RubyOnRails
[01:09:52] mat_bug: has joined #RubyOnRails
[01:23:43] sevenseacat: has joined #RubyOnRails
[01:31:30] jottr: has joined #RubyOnRails
[01:48:18] tdy: has joined #RubyOnRails
[02:02:48] mat_bug: has joined #RubyOnRails
[02:09:07] Intii: has joined #RubyOnRails
[02:09:26] Linuus: has joined #RubyOnRails
[02:09:41] Intii: Hey everyone, I have sort of a weird problem... I'm trying to import a CSV and match fields to the DB and create them if they don't exist. The problem I run into this:
[02:10:57] Intii: I have a school named: XX but in the CSV it's XX Univerisity. When I do SELECT * FROM schools WHERE name LIKE %XX University%% no records come up, even though XX is in there
[02:11:03] Intii: What's the proper way to query the DB for that?
[02:17:06] mat_bug: has joined #RubyOnRails
[02:18:17] baweaver: Intii: You sure they're the same case?
[02:18:43] baweaver: Welcome to data normalization concerns
[02:19:11] baweaver: You'd need to strip off the university part of it, and better yet find a fallback metric that tries variants of the name just in case
[02:19:21] baweaver: though make sure to dry run those before applying them
[02:24:42] Intii: Yeah same case, I'm running them through so the actual query looks like this SELECT * FROM schools WHERE lower(name) LIKE '%XX University%'
[02:25:05] Intii: In rails the XX University part is school_name.downcase
[02:25:39] Intii: How would I do the second part? I don't know if Univerisity is the problem for all schools. It is for this one, but the next one might have University in it.
[02:27:04] Saukk: has joined #RubyOnRails
[02:29:39] mat_bug: has joined #RubyOnRails
[02:32:00] tdy: has joined #RubyOnRails
[02:42:03] mat_bug: has joined #RubyOnRails
[02:52:37] dbugger_: has joined #RubyOnRails
[02:59:55] mat_bug: has joined #RubyOnRails
[03:03:51] havenwood: Int, ah - they left. Was going to say ILIKE is Posgres for insensitive like: SELECT * FROM schools WHERE name ILIKE 'XX%'
[03:06:05] cschneid: has joined #RubyOnRails
[03:09:59] havenwood: Or even use a case insensitive type, citext.
[03:10:35] duderonomy: has joined #RubyOnRails
[03:10:36] havenwood: https://www.postgresql.org/docs/current/citext.html
[03:11:57] mat_bug: has joined #RubyOnRails
[03:16:59] tdy: has joined #RubyOnRails
[03:34:58] mat_bug: has joined #RubyOnRails
[03:39:29] dviola: has joined #RubyOnRails
[03:41:04] jottr: has joined #RubyOnRails
[03:43:54] segy: has joined #RubyOnRails
[03:47:23] mat_bug: has joined #RubyOnRails
[03:55:45] benlieb: has joined #RubyOnRails
[04:07:59] mat_bug: has joined #RubyOnRails
[04:09:19] braincrash: has joined #RubyOnRails
[04:21:19] Technodrome: has joined #RubyOnRails
[04:22:03] mat_bug: has joined #RubyOnRails
[04:35:06] Linuus: has joined #RubyOnRails
[04:43:26] ariedler: has joined #RubyOnRails
[04:44:09] mat_bug: has joined #RubyOnRails
[04:44:57] tdy: has joined #RubyOnRails
[04:56:35] mat_bug: has joined #RubyOnRails
[05:05:29] _aeris: has joined #RubyOnRails
[05:33:02] za1b1tsu: has joined #RubyOnRails
[05:43:19] jottr: has joined #RubyOnRails
[05:56:10] mat_bug: has joined #RubyOnRails
[06:09:03] reber: has joined #RubyOnRails
[06:18:26] conta: has joined #RubyOnRails
[06:44:31] ariedler: has joined #RubyOnRails
[06:49:16] mat_bug: has joined #RubyOnRails
[06:50:05] paranoicsan: has joined #RubyOnRails
[07:09:09] hammer065: has joined #RubyOnRails
[07:09:41] Linuus: has joined #RubyOnRails
[07:13:19] mat_bug: has joined #RubyOnRails
[07:15:13] cnsvc: has joined #RubyOnRails
[07:25:04] kapil____: has joined #RubyOnRails
[07:35:21] srinidhi: has joined #RubyOnRails
[07:37:20] mat_bug: has joined #RubyOnRails
[07:44:16] jottr: has joined #RubyOnRails
[07:45:32] Technodrome: has joined #RubyOnRails
[07:48:48] Xiti: has joined #RubyOnRails
[07:58:22] mat_bug: has joined #RubyOnRails
[08:04:38] Dbugger: has joined #RubyOnRails
[08:09:57] paranoicsan: has joined #RubyOnRails
[08:35:01] Sylario: has joined #RubyOnRails
[08:45:24] ariedler: has joined #RubyOnRails
[08:54:44] mat_bug: has joined #RubyOnRails
[09:05:59] mikecmpb_: has joined #RubyOnRails
[09:14:53] paranoicsan: has joined #RubyOnRails
[09:30:43] jottr: has joined #RubyOnRails
[09:37:28] Ergo: has joined #RubyOnRails
[09:39:43] Linuus: has joined #RubyOnRails
[09:53:28] za1b1tsu: has joined #RubyOnRails
[10:08:10] ur5us: has joined #RubyOnRails
[10:31:43] Technodrome: has joined #RubyOnRails
[10:46:05] ariedler: has joined #RubyOnRails
[10:46:42] TheHonorableKitt: has joined #RubyOnRails
[11:08:24] paranoicsan: has joined #RubyOnRails
[11:27:56] conta: has joined #RubyOnRails
[11:33:10] conta: has joined #RubyOnRails
[11:35:29] jottr: Hi all. What are robust strategies of handling certificate files in secrets.yml that contain newlines?
[11:38:47] paranoicsan: has left #RubyOnRails: ()
[11:43:52] paranoicsan: has joined #RubyOnRails
[11:50:29] jottr: This seems to be a very quiet channel. I recall this channel being a lot more active
[11:51:51] tbuehlmann: what's the problem with strings containing newlines?
[11:55:03] uks: has joined #RubyOnRails
[11:55:08] ariedler: has joined #RubyOnRails
[11:56:30] gaara4896: has left #RubyOnRails: ()
[12:06:29] Linuus: has joined #RubyOnRails
[12:07:54] sunsea: has joined #RubyOnRails
[12:08:11] sunsea: i wnt to learn, but i dont know programming
[12:08:14] sunsea: i knw html5
[12:08:35] sunsea: i think the series ''for dummies'' or ''head first ruby on rails'' is best for ppl who dont get math thinking?
[12:12:38] reber: has joined #RubyOnRails
[12:23:15] tbuehlmann: sunsea: you don't need a lot of math to get started
[12:32:24] hammer065: has joined #RubyOnRails
[12:46:37] sunsea: il start with 'the books i mentioned above
[12:46:41] sunsea: and see how it goes
[12:47:09] sunsea: i want to build an online bookshop that allows ppl to self-publish ebooks (like kindle in amazon) but far lighter version and only ebooks, not everything like amazon
[12:47:18] sunsea: in greece
[12:47:45] sunsea: im happy to \hire someone but i l try to learn it first
[12:53:41] paranoicsan: has left #RubyOnRails: ()
[12:53:50] paranoicsan: has joined #RubyOnRails
[13:01:05] sevenseacat: what do you plan to offer that places like leanpub and softcover don't?
[13:01:26] sunsea: ARE U Talking to me?
[13:02:22] sunsea: ok let me see these apps and il answer
[13:02:36] sunsea: basically i dont search to invent the wheel
[13:02:53] sunsea: i want to make sefl=publishing super easy for greeks who most of them are low=-tech icitgizens
[13:03:03] sunsea: internet in greece is used mainly by affluent males
[13:03:12] sunsea: but they do write lots of blogs
[13:03:17] sunsea: just want to make it easy as hell
[13:03:20] sunsea: to publish an ebook
[13:03:27] sunsea: s there is a sociological aspect in it
[13:03:34] sunsea: i didnt say i want to invent self publishing, lol
[13:04:04] beholders_eye: has joined #RubyOnRails
[13:13:47] paranoicsan: has joined #RubyOnRails
[13:16:12] za1b1tsu: has joined #RubyOnRails
[13:22:14] za1b1tsu: Is there a built-in functionality for working with jsonb arrays? No hashes, just stored data in an array
[13:32:10] tbuehlmann: za1b1tsu: when having a jsonb column, you'll work with a simple array
[13:33:06] za1b1tsu: tbuehlmann, I understand, thank you
[13:34:59] za1b1tsu: I fail to query though, Stuff.where('paused_list @> ?', 1), gives me "operator matches the given name and argument type(s). You might need to add explicit type casts." I one stuff row with [1, 2, 3] in jsonb column, called paused_list.
[13:35:21] za1b1tsu: *I one/I have one
[13:51:14] mikecmpb_: anyone have any advice for running action cable in production? 😬
[13:51:36] mikecmpb_: presumably it's best to set up dedicated action cable server(s)
[13:54:13] TheHonorableKitt: has left #RubyOnRails: ()
[13:55:27] beholders_eye: has joined #RubyOnRails
[14:07:39] alan_w: has joined #RubyOnRails
[14:10:35] beholders_eye: has joined #RubyOnRails
[14:12:32] exchgr`: has joined #RubyOnRails
[14:30:07] chouhoulis: has joined #RubyOnRails
[14:32:03] Linuus: has joined #RubyOnRails
[14:33:21] beholders_eye: has joined #RubyOnRails
[14:42:15] mangold: has joined #RubyOnRails
[14:45:31] orbyt_: has joined #RubyOnRails
[14:51:37] mengu: has joined #RubyOnRails
[14:51:43] mengu: hello everyone.
[14:52:40] mengu: i'm configuring action_dispatch.default_headers in config/application.rb as shown in here => https://edgeguides.rubyonrails.org/security.html#default-headers but it is not taking effect. my rails version is 5.2.1. is there anything i'm missing?
[14:52:52] za1b1tsu: has joined #RubyOnRails
[14:56:24] fox_mulder_cp: mengu: is a proxy such as apache/nginx before app?
[14:56:42] paranoicsan: has joined #RubyOnRails
[14:56:51] mengu: fox_mulder_cp: i have just the puma web server on dev
[14:57:36] mengu: i actually see them defined when i add a breakpoint with byebug, as Rails.application.config.action_dispatch.default_headers
[14:57:45] mengu: but in the response, none of those headers are present
[15:11:43] mengu: maybe there's a bug, i tried with iframe as well, and set X-Frame-Options to DENY and i can embed the action in an iframe without any problems
[15:11:49] mengu: rails is not sending those headers
[15:14:12] DTZUZO: has joined #RubyOnRails
[15:15:47] beholders_eye: has joined #RubyOnRails
[15:21:51] mengu: fox_mulder_cp: btw, i've changed from ActionController::API to ActionController::Base
[15:21:53] mengu: and it worked
[15:22:47] srinidhi: has joined #RubyOnRails
[15:22:55] mengu: but, i see API is also set to have DefaultHeaders
[15:23:02] mengu: https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/api.rb#L125
[15:23:09] mengu: i'm going to open an issue
[15:29:16] beholders_eye: has joined #RubyOnRails
[15:34:19] fryguy: has joined #RubyOnRails
[15:58:43] coffeejunk: has joined #RubyOnRails
[16:00:11] tdy: has joined #RubyOnRails
[16:11:42] eddof13: has joined #RubyOnRails
[16:15:36] kapil____: has joined #RubyOnRails
[16:21:14] conta: has joined #RubyOnRails
[16:21:54] chouhoulis: has joined #RubyOnRails
[16:25:30] Saukk: has joined #RubyOnRails
[16:37:13] powerbit: has joined #RubyOnRails
[16:38:53] Linuus: has joined #RubyOnRails
[16:43:42] thunderbirdtr: has joined #RubyOnRails
[16:43:53] conta2: has joined #RubyOnRails
[16:51:39] reber: has joined #RubyOnRails
[17:11:51] MrPunkin: has joined #RubyOnRails
[17:14:03] MrPunkin: Is there a good way to parse and maintain multiple cookies across multiple requests with Net::HTTP?
[17:15:49] uksio: has joined #RubyOnRails
[17:26:04] duderonomy: has joined #RubyOnRails
[17:32:10] MrPunkin: Is there a good way to parse and maintain multiple cookies across multiple requests with Net::HTTP?
[17:33:01] duderonomy: has joined #RubyOnRails
[17:40:35] orbyt_: has joined #RubyOnRails
[17:51:39] elcontrastador: has joined #RubyOnRails
[17:52:38] lxsameer: has joined #RubyOnRails
[17:52:50] duderonomy: has joined #RubyOnRails
[17:56:38] duderonomy: has joined #RubyOnRails
[17:57:42] [Butch]: has joined #RubyOnRails
[18:01:54] duderonomy: has joined #RubyOnRails
[18:14:45] [Butch]: has joined #RubyOnRails
[18:31:18] Dbugger: has joined #RubyOnRails
[18:36:14] Intii: has joined #RubyOnRails
[18:36:26] Intii: Hey All, I have a weird problem that I’m not sure how to solve. I’m trying to import CSVs into my application, but the data isn’t the same for schools as it is in the DB. For example, I have a school named XX but the name in the CSV I’m importing is XX University.
[18:36:26] Intii: I’m doing a search in the database like so: `game.conference.schools.where("LOWER(TRIM(name)) LIKE ?", "%#{home.strip.downcase}%").first_or_create` which produces the following query: `SELECT * FROM schools WHERE LOWER(TRIM(name)) LIKE %xx university%`
[18:36:26] Intii: That query returns nothing even though XX is in the DB
[18:36:28] Intii: How can I work around this?
[18:38:14] duderonomy: has joined #RubyOnRails
[18:56:15] ahartley: has joined #RubyOnRails
[18:58:00] srinidhi: has joined #RubyOnRails
[18:58:26] orbyt_: has joined #RubyOnRails
[19:04:18] Linuus: has joined #RubyOnRails
[19:10:11] conta: has joined #RubyOnRails
[19:15:15] reber__: has joined #RubyOnRails
[19:15:49] Aherin: has joined #RubyOnRails
[19:20:41] IGnorAND: I want to make the following my default scope: select * from security_id_cards, security_id_request where security_id_cards.request_id=security_id_request.id; How do I do this in rails? default_scope { joins(:security_id_request).where('security_id_cards.request_id = security_id_request.id') } was my guess, but it indicates Can't join to association named 'security_id_request'; perhaps you misspelled it?
[19:21:09] cnsvc: has joined #RubyOnRails
[19:24:52] Tempesta: has joined #RubyOnRails
[19:27:33] mikecmpbll: has joined #RubyOnRails
[19:29:41] orbyt_: has joined #RubyOnRails
[19:34:03] sunsea: has left #RubyOnRails: ()
[19:37:57] alexhartley: has joined #RubyOnRails
[19:42:48] ariedler: has joined #RubyOnRails
[19:43:02] reber: has joined #RubyOnRails
[19:43:50] reber__: has joined #RubyOnRails
[19:54:45] conta: has joined #RubyOnRails
[19:57:55] ivanskie: has joined #RubyOnRails
[19:58:13] ivanskie: does anyone have grok patterns for Passenger logs?
[19:58:18] ivanskie: im utterly failing at trying to make my own
[20:11:09] chouhoulis: has joined #RubyOnRails
[20:16:39] chouhoulis: has joined #RubyOnRails
[20:17:15] chouhoulis: has joined #RubyOnRails
[20:24:50] tdy: has joined #RubyOnRails
[20:26:00] MrPunkin: is there a way to read the URL used from a Net::HTTP response object?
[20:26:06] MrPunkin: or is that information not returned in the response?
[20:33:15] ur5us: has joined #RubyOnRails
[20:36:56] jtperreault: has joined #RubyOnRails
[20:39:54] defsdoor: has joined #RubyOnRails
[20:45:46] Linuus: has joined #RubyOnRails
[20:58:34] orbyt_: has joined #RubyOnRails
[21:00:25] ivanskie: has joined #RubyOnRails
[21:00:50] THKitten: has joined #RubyOnRails
[21:01:57] dozzed: has joined #RubyOnRails
[21:04:19] jarlopez: has joined #RubyOnRails
[21:04:46] jarlopez: Is there a way to expose a module's functions _only if_ the user is running the rails console? i.e. protect the application from running them
[21:07:30] jaddison: has joined #RubyOnRails
[21:09:31] jaddison: spree question: can I programatically create an order for $0, and have the state in 'delivery' right away? Or does spree require that the checkout web flow is followed?
[21:27:02] MrPunkin: has left #RubyOnRails: ()
[21:28:40] linetrace: has left #RubyOnRails: ()
[21:35:00] jenrzzz: has joined #RubyOnRails
[21:40:23] arathald: has joined #RubyOnRails
[21:43:32] ariedler: has joined #RubyOnRails
[21:58:10] jaddison: has joined #RubyOnRails
[22:24:20] jenrzzz: has joined #RubyOnRails
[22:36:52] jaddison_: has joined #RubyOnRails
[22:51:05] beholders_eye: has joined #RubyOnRails
[22:58:51] chouhoulis: has joined #RubyOnRails
[23:05:53] jenrzzz: has joined #RubyOnRails
[23:22:46] orbyt_: has joined #RubyOnRails
[23:41:53] mat_bug: has joined #RubyOnRails
[23:44:37] ariedler: has joined #RubyOnRails
[23:48:51] mat_bug: has joined #RubyOnRails
[23:56:30] jenrzzz: has joined #RubyOnRails