« Back to channel list

#RubyOnRails - 05 April 2017

« Back 1 day Forward 1 day »
[00:01:54] uks: has joined #RubyOnRails
[00:02:24] kaspergr1bbe: has joined #RubyOnRails
[00:03:25] amperry: Radar: sure, one moment and I'll gist it
[00:04:07] Radar: It smells to me like it is probably doing more than one thing and so I'd want to split it out into multiple objects... like VoidResidentApplication, but I can't judge it until I see it.
[00:06:03] amperry: Actually, I have a better example of what I'm thinking of, called MoveOutResidents, here: https://gist.github.com/amp108/a0d9b185e38683ba6ec25498260f33e7 . Where "better" = "more exemplary" not "higher quality code" :S
[00:12:03] tanuki: has joined #RubyOnRails
[00:12:04] chouhoulis: has joined #RubyOnRails
[00:14:03] rakm: has joined #RubyOnRails
[00:14:18] nahtnam: has joined #RubyOnRails
[00:19:12] amperry: Radar: irrespective of the quality of the code itself, I was just wondering if, in this situation (where I alter/create multiple different models), creating this SO is a good idea, and if so, from whence to call it.
[00:19:52] Rodya_: has joined #RubyOnRails
[00:21:41] Pumukel: has joined #RubyOnRails
[00:25:39] shinnya: has joined #RubyOnRails
[00:26:51] chouhoulis: has joined #RubyOnRails
[00:30:23] tanuki: has joined #RubyOnRails
[00:34:56] naprimer: has joined #RubyOnRails
[00:36:32] hahuang65: has joined #RubyOnRails
[00:36:54] tanuki: has joined #RubyOnRails
[00:45:39] amperry: Radar: was the code that bad?
[00:48:29] patarr: has joined #RubyOnRails
[00:48:33] fernandomm: has joined #RubyOnRails
[00:48:59] ahrs: has joined #RubyOnRails
[00:49:38] Pumukel: has joined #RubyOnRails
[00:50:26] Pumukel: has joined #RubyOnRails
[00:51:14] Pumukel: has joined #RubyOnRails
[00:52:02] Pumukel: has joined #RubyOnRails
[00:52:59] aajjbb: has joined #RubyOnRails
[00:53:12] Pumukel: has joined #RubyOnRails
[00:56:04] sevenseacat: has joined #RubyOnRails
[00:57:27] Radar: amperry: sorry, I had to run off.
[00:57:47] irishfromua: has joined #RubyOnRails
[01:00:24] truenito: has joined #RubyOnRails
[01:02:13] romeoh: has joined #RubyOnRails
[01:05:06] Rodya_: has joined #RubyOnRails
[01:07:19] Radar: I'm still in "run off mode" as I'm about to give a lecture at a uni.
[01:07:49] nya: has joined #RubyOnRails
[01:11:21] patarr: has joined #RubyOnRails
[01:19:09] cam27: has joined #RubyOnRails
[01:19:40] patarr: has joined #RubyOnRails
[01:21:10] Guest96: has joined #RubyOnRails
[01:24:41] dblessing: has joined #RubyOnRails
[01:27:45] chouhoul_: has joined #RubyOnRails
[01:29:27] patarr: has joined #RubyOnRails
[01:30:02] `: has joined #RubyOnRails
[01:38:17] dblessing: has joined #RubyOnRails
[01:39:52] uksio: has joined #RubyOnRails
[01:40:54] romeoh: has joined #RubyOnRails
[01:41:47] romeoh: has joined #RubyOnRails
[01:42:32] xibalba: has joined #RubyOnRails
[01:42:33] knight33: has joined #RubyOnRails
[01:43:40] quazimodo: has joined #RubyOnRails
[01:48:22] romeoh: has joined #RubyOnRails
[01:54:09] duderonomy: has joined #RubyOnRails
[01:56:49] Technodrome: has joined #RubyOnRails
[01:57:23] pwnd_nsfw`: has joined #RubyOnRails
[01:58:44] nya: has joined #RubyOnRails
[02:00:22] chouhoulis: has joined #RubyOnRails
[02:01:35] chouhoulis: has joined #RubyOnRails
[02:02:18] Jameser: has joined #RubyOnRails
[02:04:25] jeyraof^mbpr: has joined #RubyOnRails
[02:05:27] libastral: has joined #RubyOnRails
[02:15:21] naprimer: has joined #RubyOnRails
[02:16:22] mices: has joined #RubyOnRails
[02:18:26] Ericx2x: has joined #RubyOnRails
[02:22:41] quazimodo: has joined #RubyOnRails
[02:24:31] mazeinmaze_: has joined #RubyOnRails
[02:24:45] bruce_lee: has joined #RubyOnRails
[02:27:50] DoctorMonocular: has joined #RubyOnRails
[02:28:05] nya: has joined #RubyOnRails
[02:36:52] unreal_: has joined #RubyOnRails
[02:37:30] hahuang65: has joined #RubyOnRails
[02:45:38] hahuang65: has joined #RubyOnRails
[02:47:01] mices: Radar: i took your advice and replaced the nested resources with basic resources
[02:47:40] mices: Radar: and i also took the profiles model out of my sn app as you advised
[02:49:09] pwnd_nsfw: has joined #RubyOnRails
[02:50:09] mices: what's the best way to build a link or form to update a boolean attribute while i iterate through an object and print rows to table in view, i'm listing @addresses in the index view and need a button to set the address to be the current address
[02:51:22] mices: i previously had this working with link_to and a route that included params i decided it was better to use a form
[02:56:08] hndk: has joined #RubyOnRails
[02:57:22] jarray52: has left #RubyOnRails: ()
[03:10:33] jenrzzz: has joined #RubyOnRails
[03:10:33] jenrzzz: has joined #RubyOnRails
[03:20:14] erlend: has joined #RubyOnRails
[03:24:18] gambl0re: has joined #RubyOnRails
[03:37:37] ElSif: has joined #RubyOnRails
[03:39:25] Mia: has joined #RubyOnRails
[03:40:16] jaequery: has joined #RubyOnRails
[03:42:48] arBmind1: has joined #RubyOnRails
[03:59:21] jenrzzz: has joined #RubyOnRails
[04:01:54] xall: has joined #RubyOnRails
[04:04:47] AnoHito_: has joined #RubyOnRails
[04:05:46] AnoHito_: has joined #RubyOnRails
[04:06:47] AnoHito_: has joined #RubyOnRails
[04:13:53] FCser: has left #RubyOnRails: ()
[04:17:06] irishfromua: has joined #RubyOnRails
[04:19:50] uks: has joined #RubyOnRails
[04:20:32] pulkit4tech: has joined #RubyOnRails
[04:22:54] djbkd: has joined #RubyOnRails
[04:25:34] Pumukel: has joined #RubyOnRails
[04:31:31] jdm_: has joined #RubyOnRails
[04:34:14] AnoHito: has joined #RubyOnRails
[04:36:44] zpe: has joined #RubyOnRails
[04:38:16] AnoHito: has joined #RubyOnRails
[04:39:43] AnoHito: has joined #RubyOnRails
[04:48:06] byteflam1: has joined #RubyOnRails
[04:48:07] byteflame: has joined #RubyOnRails
[05:04:12] hahuang65: has joined #RubyOnRails
[05:06:58] patarr: has joined #RubyOnRails
[05:10:11] mochiyoda_: has joined #RubyOnRails
[05:14:26] Guest96: has joined #RubyOnRails
[05:15:34] nahtnam: has joined #RubyOnRails
[05:24:18] neohunter: has joined #RubyOnRails
[05:24:43] Rodya_: has joined #RubyOnRails
[05:26:12] neohunter: has joined #RubyOnRails
[05:38:53] xall: has joined #RubyOnRails
[05:42:01] arBmind: has joined #RubyOnRails
[06:08:39] itsgokul: has joined #RubyOnRails
[06:09:45] pwnd_nsfw: has joined #RubyOnRails
[06:11:44] volix: has joined #RubyOnRails
[06:11:44] volix: has joined #RubyOnRails
[06:17:09] harfangk: has joined #RubyOnRails
[06:26:06] Rodya_: has joined #RubyOnRails
[06:28:16] Pumukel: has joined #RubyOnRails
[06:30:14] naprimer: has joined #RubyOnRails
[06:47:35] ReBa_: has joined #RubyOnRails
[06:48:36] byteflam1: has joined #RubyOnRails
[06:48:36] byteflame: has joined #RubyOnRails
[06:50:59] jusa: has joined #RubyOnRails
[06:51:11] conta: has joined #RubyOnRails
[06:51:33] antgel: has joined #RubyOnRails
[07:05:19] hahuang65: has joined #RubyOnRails
[07:06:21] jhfisc1: has joined #RubyOnRails
[07:07:20] AzaToth: has joined #RubyOnRails
[07:07:52] patarr: has joined #RubyOnRails
[07:08:51] zero1one0: has joined #RubyOnRails
[07:09:46] zero1one0: has joined #RubyOnRails
[07:15:34] jgt: has joined #RubyOnRails
[07:16:03] MasterAsia: has joined #RubyOnRails
[07:16:29] phikes: has joined #RubyOnRails
[07:18:24] Guest96_: has joined #RubyOnRails
[07:22:50] aganov: has joined #RubyOnRails
[07:28:01] Rodya_: has joined #RubyOnRails
[07:29:16] neilfse: has joined #RubyOnRails
[07:30:33] mark_66: has joined #RubyOnRails
[07:30:38] artto: has joined #RubyOnRails
[07:40:47] Qchmqs: has joined #RubyOnRails
[07:41:46] dionysus69: has joined #RubyOnRails
[07:49:05] artto: has joined #RubyOnRails
[07:53:39] pLaTo0n: has joined #RubyOnRails
[07:54:32] zpe: has joined #RubyOnRails
[07:55:46] Toledo: has joined #RubyOnRails
[08:03:15] Qchmqs: has joined #RubyOnRails
[08:03:29] blackmesa: has joined #RubyOnRails
[08:07:07] darutoko: has joined #RubyOnRails
[08:08:20] zpe: has joined #RubyOnRails
[08:08:22] gloscombe: has joined #RubyOnRails
[08:10:08] codelahoma: has joined #RubyOnRails
[08:10:49] jsrn_: has joined #RubyOnRails
[08:11:28] Technodrome: has joined #RubyOnRails
[08:21:37] kassav_: has joined #RubyOnRails
[08:25:31] jenrzzz: has joined #RubyOnRails
[08:25:31] jenrzzz: has joined #RubyOnRails
[08:31:04] lxsameer: has joined #RubyOnRails
[08:32:58] kassav_: has joined #RubyOnRails
[08:35:10] blackmesa: has joined #RubyOnRails
[08:39:32] jusa: has joined #RubyOnRails
[08:39:41] nya: has joined #RubyOnRails
[08:39:43] codelahoma: has joined #RubyOnRails
[08:41:10] marr: has joined #RubyOnRails
[08:41:58] kitsuneyo: has joined #RubyOnRails
[08:47:23] srinidhi: has joined #RubyOnRails
[08:49:03] byteflam1: has joined #RubyOnRails
[08:49:03] byteflame: has joined #RubyOnRails
[08:49:28] Guest96: has joined #RubyOnRails
[08:49:51] gambl0re: has joined #RubyOnRails
[08:54:16] zpe: has joined #RubyOnRails
[08:59:39] jenrzzz: has joined #RubyOnRails
[09:00:32] hahuang65: has joined #RubyOnRails
[09:02:46] zpe: has joined #RubyOnRails
[09:08:49] patarr: has joined #RubyOnRails
[09:08:53] arBmind1: has joined #RubyOnRails
[09:20:15] xpl0iter: has joined #RubyOnRails
[09:26:53] arBmind: has joined #RubyOnRails
[09:29:17] Rodya_: has joined #RubyOnRails
[09:32:23] Pumukel: has joined #RubyOnRails
[09:34:03] stamina: has joined #RubyOnRails
[09:36:32] naftilos76: has joined #RubyOnRails
[09:38:43] nya: has joined #RubyOnRails
[09:50:20] kitsuneyo: has joined #RubyOnRails
[09:51:50] workmad3: has joined #RubyOnRails
[09:59:03] Pumukel: has joined #RubyOnRails
[10:02:10] ejnahc: has joined #RubyOnRails
[10:08:53] artto: has joined #RubyOnRails
[10:15:55] patarr: has joined #RubyOnRails
[10:23:22] Guest96: has joined #RubyOnRails
[10:30:54] artto: has joined #RubyOnRails
[10:31:49] tvw: has joined #RubyOnRails
[10:34:22] roshanavand: has joined #RubyOnRails
[10:35:25] hardwin: has joined #RubyOnRails
[10:35:41] hardwin: это русскоязычный канал?
[10:37:29] makmende: has joined #RubyOnRails
[10:37:54] makmende: has left #RubyOnRails: ()
[10:38:01] FastJack: hardwin: nyet
[10:39:12] srinidhi: has joined #RubyOnRails
[10:39:17] tbuehlmann: hardwin: только английский
[10:41:47] hardwin: esli pisat' translitom - norm?
[10:43:48] blackmesa: has joined #RubyOnRails
[10:45:02] Fernando-Basso: has joined #RubyOnRails
[10:49:33] byteflam1: has joined #RubyOnRails
[10:49:33] byteflame: has joined #RubyOnRails
[10:52:48] Ergo: has joined #RubyOnRails
[10:53:01] Guest96: has joined #RubyOnRails
[10:54:34] kitsuneyo: has joined #RubyOnRails
[11:02:54] hahuang65: has joined #RubyOnRails
[11:07:16] jgt: has joined #RubyOnRails
[11:18:08] makmende: has joined #RubyOnRails
[11:18:25] makmende: has left #RubyOnRails: ()
[11:21:43] jgt: has joined #RubyOnRails
[11:23:49] gk_1wm_su: has joined #RubyOnRails
[11:24:09] gk_1wm_su: has left #RubyOnRails: ()
[11:25:53] nya: has joined #RubyOnRails
[11:26:59] ReBa_: I've been able to structure my tempfiles ("/tmp/exports/export_#{user_id}.xml") but the extension is before the added has so you get export_1.xml20170405-27899-9fyfvl | I would like to have export_1-20170405-27899-9fyfvl.xml so the extension is at the back
[11:27:35] ReBa_: I've seen you can do it with Tempfile.new(['export', '.xml']), but that doesn't include the subfolder /exports to keep it structured
[11:29:06] ReBa_: If I doe Tempfile.new(['exports/export', '.xml']) I get the message that the file or folder doesn't exists (although it really does exist)
[11:30:20] artto: has joined #RubyOnRails
[11:30:50] Rodya_: has joined #RubyOnRails
[11:30:59] ReBa_: Or is it better to use File.new if I want to achieve that?
[11:33:01] matthewd: ReBa_: Wanting to build a directory structure with generated names seems odd
[11:34:04] ReBa_: matthewd: So you would just use Tempfile.new(['export', '.xml') to keep it simple?
[11:34:20] ReBa_: (['export', '.xml'])*
[11:35:05] spyder55: has joined #RubyOnRails
[11:35:46] matthewd: ReBa_: I'd generally expect either flat filenames, where you don't care about dirs, or to be building a more intentional tree, where you want to fully control the files' basenames
[11:36:18] ldnunes: has joined #RubyOnRails
[11:37:11] ReBa_: matthewd: It's just temporary storage to upload to the amazon s3 bucket. With that in mind, not caring about dirs is in fact logical :)
[11:37:24] ReBa_: I will implement it as intended
[11:40:38] ReBa_: matthewd: Thank you for your insights & help!
[11:48:38] byteflame: has joined #RubyOnRails
[11:48:39] byteflam1: has joined #RubyOnRails
[11:50:44] kitsuneyo: has joined #RubyOnRails
[11:51:04] dionysus69: has joined #RubyOnRails
[11:55:48] experymental: has joined #RubyOnRails
[11:56:20] experymental: hi everyone. anyone knows how i can change the with of the textfield here? i’m using bootstrap what i have done doesn’t seem to work https://i.gyazo.com/5a3d96a6d5912ee1517d2ae29f1a8e1d.png
[11:56:47] artto: has joined #RubyOnRails
[11:58:06] experymental: the textfield generates this: https://i.gyazo.com/ed7fd8d9ed625d20a4043405dcebe437.png
[11:59:49] fmcgeough: has joined #RubyOnRails
[12:02:13] kitsuneyo: has joined #RubyOnRails
[12:03:31] HoierM: has joined #RubyOnRails
[12:03:41] ReBa_: experymental: You can use width: 661
[12:03:49] ReBa_: in stead of size: 661
[12:04:12] ReBa_: Or you can add a class to style your text_field in css
[12:04:29] experymental: ok that should do
[12:05:18] knight33: has joined #RubyOnRails
[12:06:08] experymental: strange :/ not working
[12:06:23] experymental: looks like it’s not allowing itself to be overriden
[12:07:16] blackmesa: has joined #RubyOnRails
[12:09:14] experymental: ReBa_: got it to work by using .controls > input { width: 95%; }
[12:19:29] King_Rex: has joined #RubyOnRails
[12:20:06] Pumukel: has joined #RubyOnRails
[12:21:11] Pumukel: has joined #RubyOnRails
[12:23:10] fmcgeough: has joined #RubyOnRails
[12:24:18] artto: has joined #RubyOnRails
[12:25:56] nya: has joined #RubyOnRails
[12:28:56] truenito: has joined #RubyOnRails
[12:29:01] max_v: has joined #RubyOnRails
[12:31:35] Rodya_: has joined #RubyOnRails
[12:31:46] buckrockwell: has joined #RubyOnRails
[12:40:39] centrx: has joined #RubyOnRails
[12:40:57] centrx: has joined #RubyOnRails
[12:42:59] pupsicle: has joined #RubyOnRails
[12:43:54] hahuang65: has joined #RubyOnRails
[12:56:29] xall: has joined #RubyOnRails
[12:57:15] gambl0re: has joined #RubyOnRails
[13:00:39] ramortegui: has joined #RubyOnRails
[13:04:04] workerbeetwo: has joined #RubyOnRails
[13:04:48] artto: has joined #RubyOnRails
[13:09:04] shinnya: has joined #RubyOnRails
[13:17:28] byteflame: has joined #RubyOnRails
[13:18:00] ReBa_: Anyone had this issue before: an .xlsx as paperclip attachment is saved as content_type 'application/zip' in stead of 'application/excel' | 'application/vnd.ms-excel' | "application/x-excel" | "application/x-msexcel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
[13:18:17] ReBa_: I had to add 'application/zip' as allowed content type
[13:18:26] ReBa_: But if I look at the file, it's just a normal xlsx file
[13:20:13] centrx: has joined #RubyOnRails
[13:20:14] centrx: has joined #RubyOnRails
[13:20:27] ReBa_: It's not such a big deal, but it would be nice if it only included the right type :)
[13:22:10] byteflam1: has joined #RubyOnRails
[13:30:57] epochwolf: ReBa_: xlsx files are zip files.
[13:31:20] ReBa_: epochwolf: only the xlsx versions, or the .xls too?
[13:31:21] epochwolf: The MIME type is controlled by the client.
[13:31:37] epochwolf: ReBa_: only xlsx, xls is a binary format.
[13:32:01] ReBa_: Which would make use of one of the other allowed content_types, right?
[13:32:03] DLSteve: has joined #RubyOnRails
[13:32:06] epochwolf: But you can give any spreadsheet format a .xls extension and excel will attempt to open it by guessing what the filetype is.
[13:32:25] Rodya_: has joined #RubyOnRails
[13:32:34] epochwolf: ReBa_: Should.
[13:33:02] epochwolf: I'm pretty sure paperclip only checks the MIME the browser sends. It's not reliable.
[13:33:21] epochwolf: I could write a script that uploads a php file as application/x-excel
[13:33:24] ReBa_: epochwolf: It's a generated file from axlsx that is being saved with paperclip
[13:34:20] ReBa_: Interesting
[13:35:07] epochwolf: Interesting, Paperclip has a couple of content type detector options: https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/content_type_detector.rb
[13:35:27] epochwolf: So it's guessing and getting zip file... because it's a zip file.
[13:35:46] epochwolf: Even though it's specificly a xlsx, the container is zip.
[13:36:22] epochwolf: ReBa_: there should be a way to manually set the type.
[13:36:27] ReBa_: And because I have full control of the rendered file, extra validation from my part isn't needed I suppose...
[13:36:45] epochwolf: I would manually set the correct type though.
[13:36:48] ReBa_: Wouldn't that be spoofing then?
[13:37:05] ReBa_: Because it is in fact the correct type I'm setting
[13:37:18] epochwolf: You're setting it as application/zip?
[13:37:52] ReBa_: No, now I'm saving it temporarily and then adding it as attachment to my model
[13:38:13] epochwolf: You'll need to manually set the MIME as application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[13:38:41] ReBa_: I'll try that
[13:39:06] ReBa_: It's the most robust way of doing it, as you state :)
[13:41:09] epochwolf: ReBa_: I think I found the problem: http://stackoverflow.com/questions/10808734/paperclip-uploads-for-office-files-docx-pptx-are-being-downloaded-as-zip-files
[13:42:32] ReBa_: Owkay, I'll add it to config/initializers/mime_types.rb
[13:42:34] epochwolf: If you add the proper extensions to the MIME list, it should automatically pick up on them.
[13:43:28] ReBa_: Even better than changing the content type :)
[13:44:01] epochwolf: Sorry for suggesting that one. Didn't have anything else at the moment.
[13:44:41] hahuang65: has joined #RubyOnRails
[13:45:13] Pumukel: has joined #RubyOnRails
[13:45:23] ReBa_: epochwolf: Dang. The mime type is already initizalized
[13:45:30] ReBa_: So it keeps using /zip
[13:45:39] epochwolf: What do you mean?
[13:45:58] ReBa_: If I add it to the mime types, it states it's already adde
[13:46:07] gloscombe: has joined #RubyOnRails
[13:46:14] ReBa_: So it should already accept it in fact, would be my understanding
[13:46:33] ReBa_: Back to changing the type then :P
[13:47:23] epochwolf: Why would it be already added? https://github.com/rails/rails/blob/5-1-stable/actionpack/lib/action_dispatch/http/mime_types.rb
[13:48:51] ReBa_: It states that on line 163, the xlsx is already added: ruby-2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/http/mime_type.rb:163: warning: already initialized constant Mime::XLSX
[13:49:04] DaveTaboola: has joined #RubyOnRails
[13:49:19] epochwolf: I wonder if PaperClip adds those.
[13:49:49] wopi: Hi, how I can get the name of my rails app from inside of an included gem ? I'm writing kind of a logger gem, and plan to use it in multiple rails apps, it should log as well the name of the app
[13:51:05] epochwolf: wopi: I think you could look for ::Rails.application.class.name
[13:51:50] ReBa_: epochwolf: Only reference in sin the content_type_detector_spec inside papercli 5.0.0
[13:56:07] mrgreenfur: has joined #RubyOnRails
[13:57:23] epochwolf: ReBa_: I haven't been able to find anything. My rails 4 app doesn't have any additional mimes.
[13:57:47] ReBa_: Maybe the axlsx_rails gem adds it
[13:58:01] bahamas: has joined #RubyOnRails
[13:59:59] donnib: i am trying do to rake db:create and i get an error, i have no idea how to get over this, any ideas ? https://gist.github.com/donnib/9bba299563ee5992dec92b794012a3e5
[14:00:10] harfangk: has joined #RubyOnRails
[14:00:27] donnib: this works on a mac but now trying to install on windows where i have specified latest ruby and did a gem update
[14:00:47] epochwolf: C:/Users/xx/repo/moodapp2/config/initializers/rollbar.rb:1 is where your error appears to be.
[14:00:51] ReBa_: epochwolf: Yep, the axlsx_rails gem adds it for me!
[14:01:06] epochwolf: ReBa_: and it still doesn't work? :/
[14:01:14] ReBa_: Unfortunately not, no :s
[14:01:57] ReBa_: Still application/zip ...
[14:02:08] ReBa_: But changing the content type will do the trick (although not perfect)
[14:02:51] donnib: epochwolf: well there is nothing wrong as far as i can see in that file https://bitbucket.org/nmuldoon/moodapp2/src/072da1ff37c2020f0f50dffd2e12dcfd1321fc8a/config/initializers/rollbar.rb?at=master&fileviewer=file-view-default
[14:03:37] pLaTo0n: has joined #RubyOnRails
[14:04:27] epochwolf: donnib: looks relavent: https://github.com/rollbar/rollbar-gem/issues/396
[14:04:46] epochwolf: Found it by googling "rollbar NoMethodError: undefined method `split' for nil:NilClass"
[14:05:03] donnib: epochwolf: funny coz i did almost same search
[14:05:09] donnib: i think without rollbar
[14:05:20] epochwolf: Yeah, you needed to include rollbar.
[14:05:33] donnib: but, weird enough i have everything up to date
[14:05:38] donnib: that issue is from 2016
[14:06:00] donnib: i use rake 12
[14:06:07] epochwolf: whoops, misread the date as 2017.
[14:06:13] Guest96: has joined #RubyOnRails
[14:06:17] donnib: and rollbar 2.4.0
[14:06:35] donnib: np, weird anyway, there must be some incompability issue
[14:06:40] donnib: since no code change is made
[14:06:57] epochwolf: 2.4.0 is very out of date.
[14:07:07] epochwolf: The version in that issue is 2.8.2
[14:07:29] epochwolf: I would imagine 2.4.0 has the same incompatiablity as 2.8.2
[14:07:41] donnib: gem 'rollbar', '~> 2.4.0' should this not be updated to latest if i do gem update
[14:07:59] epochwolf: It'll update to the latest patch of 2.4
[14:08:04] donnib: ahh i see
[14:08:26] donnib: let me try again
[14:08:42] epochwolf: donnib: for your reference: http://bundler.io/v1.5/gemfile.html
[14:09:01] ReBa_: epochwolf: Thank you for your help! Really appreciated :)
[14:09:12] epochwolf: You're welcome. :)
[14:09:21] knight33: has joined #RubyOnRails
[14:10:13] Guest96: has joined #RubyOnRails
[14:10:24] donnib: epochwolf: same here ;)
[14:11:43] kaspergr1bbe: has joined #RubyOnRails
[14:11:47] kitsuneyo: has joined #RubyOnRails
[14:12:34] kitsuneyo: has joined #RubyOnRails
[14:12:55] SirCmpwn: has joined #RubyOnRails
[14:13:16] SirCmpwn: in HAML, `= field_set_tag class: 'fields-group' do` seems to be the wrong thing to do
[14:13:27] kitsuneyo: has joined #RubyOnRails
[14:13:28] SirCmpwn: because it doesn't set the attribute, it dumps the text {:class=>"fields-group"} into the HTML
[14:13:56] epochwolf: SirCmpwn: http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-field_set_tag
[14:14:06] kitsuneyo: has joined #RubyOnRails
[14:15:14] SirCmpwn: got it, needed to pass the empty string in
[14:15:19] SirCmpwn: or give it a proper label I guess
[14:17:12] epochwolf: or nil if you don't want a label.
[14:23:17] kitsuneyo: has joined #RubyOnRails
[14:24:41] rakm: has joined #RubyOnRails
[14:26:14] Guest96: has joined #RubyOnRails
[14:27:33] rakm_: has joined #RubyOnRails
[14:33:54] polishdub: has joined #RubyOnRails
[14:36:23] Guest37211: has joined #RubyOnRails
[14:37:02] Qchmqs: has joined #RubyOnRails
[14:39:17] agent_white: has joined #RubyOnRails
[14:40:13] makmende1: has joined #RubyOnRails
[14:47:23] patarr: has joined #RubyOnRails
[14:53:18] Spami: has joined #RubyOnRails
[14:53:18] Spami: has joined #RubyOnRails
[14:59:39] Guest96: has joined #RubyOnRails
[14:59:55] dionysus70: has joined #RubyOnRails
[15:00:30] ahrs: has joined #RubyOnRails
[15:03:18] SirCmpwn: has left #RubyOnRails: ("WeeChat 1.7")
[15:05:18] agent_white: Mornin' folks
[15:07:45] patarr: has joined #RubyOnRails
[15:08:32] aajjbb: has joined #RubyOnRails
[15:10:43] [Butch]: has joined #RubyOnRails
[15:12:45] Rodya_: has joined #RubyOnRails
[15:13:01] patarr: has joined #RubyOnRails
[15:14:15] kitsuneyo: has joined #RubyOnRails
[15:15:01] knight33: has joined #RubyOnRails
[15:16:02] Arkentias: has joined #RubyOnRails
[15:18:02] patarr1: has joined #RubyOnRails
[15:19:15] mr-spoon: has joined #RubyOnRails
[15:21:59] chouhoulis: has joined #RubyOnRails
[15:32:36] patarr: has joined #RubyOnRails
[15:38:39] Technodrome: has joined #RubyOnRails
[15:42:50] handicraftsman: has joined #RubyOnRails
[15:42:51] handicraftsman: has joined #RubyOnRails
[15:43:43] yaw: has joined #RubyOnRails
[15:44:30] patarr: has joined #RubyOnRails
[15:45:32] hahuang65: has joined #RubyOnRails
[15:47:18] dennydenny: has joined #RubyOnRails
[15:47:44] dennydenny: hello chan, i have a question about activerecord
[15:48:43] blackmesa: has joined #RubyOnRails
[15:49:30] dennydenny: Given a finite set of tables in a sql-like db, is there an optimal limit to the number of relationships the tables can have?
[15:49:55] dennydenny: aka, say there is a performance hit for writes with the more foreign keys you add
[15:50:14] dennydenny: does that mean you should always try to reduce the number of associations in your models?
[15:50:48] dennydenny: or, put another way, with 10 tables all having_and_belonging to eachother, is that bad?
[15:51:30] irishfromua: has joined #RubyOnRails
[15:54:11] bbrowning: has joined #RubyOnRails
[15:54:42] rakm: has joined #RubyOnRails
[15:55:03] epochwolf: dennydenny: if you're doing a lot of joins across tables, it can hurt preformance.
[15:55:11] epochwolf: If you're just writing data, it's not a huge problem.
[15:55:43] epochwolf: It all depends how the data is written and retrieved.
[15:55:56] dennydenny: is it standard rails-style to try and reduce the number of associations?
[15:56:24] arBmind1: has joined #RubyOnRails
[15:56:32] dennydenny: or is that more a db thing?
[15:56:32] epochwolf: Well, you shouldn't use more or less than you need.
[15:57:17] dblessing: has joined #RubyOnRails
[15:57:32] epochwolf: You're better off telling us exactly what you're trying to build and having us try to help you come up with a solution.
[15:57:47] epochwolf: Because there's no right answer. :)
[15:57:57] epochwolf: Well, no one right answer for your question.
[15:58:10] dennydenny: nothing specific i guess, was more just realizing that I have no clue how db performance works
[15:58:42] epochwolf: dennydenny: ah, now that's something I can try to help with.
[15:58:57] dennydenny: i was just imaging say given 10 tables and a fixed set of relations
[15:59:06] dennydenny: that implies some sort of optimal number of relationships
[15:59:22] epochwolf: dennydenny: first problem with preformance: every database is different.
[15:59:22] irishfromua: has joined #RubyOnRails
[15:59:35] epochwolf: Now, in general, joins are expensive.
[16:00:01] dennydenny: but if say, your use case means you need best write performance, and more relationships hurt that, then it implies fewer relationships
[16:00:05] epochwolf: A database will load tables and indexes into memory as it works on them.
[16:00:22] epochwolf: If you can load fewer things, it should work faster.
[16:00:39] yaw: or if you can increase working memory you should be fine
[16:00:44] epochwolf: If your query can't use indexes properly, preformance hurts.
[16:01:06] epochwolf: yaw: only if you tuned the database properly.
[16:01:15] yaw: if your query can't use indexes properly it could mean your indexes are not set up properly
[16:01:47] epochwolf: You can have 128gb of ram but you have the buffers set for 12mb and you're bottlenecked.
[16:02:22] mlt-: has joined #RubyOnRails
[16:02:57] dennydenny: ok, well, has anyone done a comparison of a sql-like DB of all tables being has_and_belonging_to's and a graph DB, and measured performance?
[16:03:13] dennydenny: like, for 3 tables, one is better
[16:03:20] epochwolf: It's not about tables.
[16:03:28] epochwolf: It's about the data. How are you accessing it??
[16:03:40] dennydenny: say in this example, using active record
[16:03:41] epochwolf: For facebook, they use both graph databases and mysql databases.
[16:03:57] epochwolf: ActiveRecord only works with the major SQL databases.
[16:04:07] patarr: has joined #RubyOnRails
[16:04:30] dennydenny: uh i guess, i meant
[16:04:42] yaw: databases are extremely good at handling large amount of data. I don't see the point in comparing performance with 3 tables
[16:05:18] dennydenny: ah nevermind i am more thoroughly confused now
[16:05:23] epochwolf: Don't worry about performance of graph databases unless you're looking at millions of records.
[16:06:10] epochwolf: Now, what are you building that you're expecting to have performance problems?
[16:06:13] dennydenny: how do people model or predict use cases for db's
[16:06:37] epochwolf: Um. We look at past experience and guess.
[16:07:19] epochwolf: If we don't have past experience, we ask people who do.
[16:07:43] epochwolf: And we learn by doing and eventually running into walls.
[16:08:21] dennydenny: has anyone ever tried to make a rails app
[16:08:29] dennydenny: with 1,000 has_many through's in one table
[16:08:34] dennydenny: and what would happen
[16:08:43] tercenya: has joined #RubyOnRails
[16:08:44] dennydenny: would that person get slapped and told to use nosql
[16:09:02] epochwolf: No. They would get asked what they are tryign to do.
[16:09:23] dennydenny: uh, lets just say its an old app
[16:09:24] epochwolf: Because it's clear by that question you don't understand how to use the tools you have properly.
[16:10:10] epochwolf: Or there's a constraint that's causing tools to be misused.
[16:11:10] epochwolf: Let me know when you're ready to talk specifics about the application you're trying to build.
[16:11:35] yaw: dennydenny: what case are you dealing with?
[16:12:06] dennydenny: this isnt anything specific, I was more just wondering if there are any sorts of laws for rails/db performance to obey
[16:12:08] bbrowning: has joined #RubyOnRails
[16:12:15] dennydenny: or like, things taken to the logical extreme
[16:12:24] gusrub: has joined #RubyOnRails
[16:12:29] dennydenny: i think this has helped
[16:13:53] bbrowning: has joined #RubyOnRails
[16:19:40] cschneid_: has joined #RubyOnRails
[16:19:41] yaw: dennydenny: ActiveRecord doesn't solve all problems but until you have them don't bother
[16:21:02] epochwolf: ActiveRecord does very little to solve performance problems.
[16:21:40] epochwolf: About the only thing I can think of is query caching and assocation prefetching, both of which have their own issues.
[16:22:20] epochwolf: ActiveRecord also uses an awful amount of memory.
[16:22:44] epochwolf: But it makes life so much easier for basic DB operations.
[16:23:36] epochwolf: Instead of spending a day on making a complex form, I can do it in an hour or two.
[16:27:24] jaequery: has joined #RubyOnRails
[16:28:15] yaw: AR has its own issues but there's other issues of people using it wrongly
[16:28:56] epochwolf: I think there's more issues with people using things wrong than things actually being bad.
[16:29:37] centrx: Yeah the 15% overhead or whatever it is normal
[16:30:11] centrx: not as thin as Sequel, but it's a constant overhead, not log n, etc.
[16:31:36] kitsuneyo: has joined #RubyOnRails
[16:32:12] marr: has joined #RubyOnRails
[16:36:45] patarr: has joined #RubyOnRails
[16:36:51] ResidentBiscuit: I'm consuming an engine that has rdoc as a dependency in the gemspec. Is this normal? It seems like that shouldn't be forced on to consumers
[16:38:39] adavia: has joined #RubyOnRails
[16:40:44] naftilos76: Hi everyone, i have a class method named foo that returns a hash like this: {"id"=>1, "name"=>"some_string", "title"=>"some_title"} . This means that i can do foo["id"] and get the id. What if i want to do foo.id and get the id?
[16:40:54] tvw: has joined #RubyOnRails
[16:41:25] havenwood: ResidentBiscuit: #add_dependency or #add_development_dependency in the gemspec?
[16:43:16] artto: has joined #RubyOnRails
[16:43:24] bbrowning: has joined #RubyOnRails
[16:46:03] zpe: has joined #RubyOnRails
[16:46:26] DoctorMonocular: has joined #RubyOnRails
[16:48:00] makmende1: has left #RubyOnRails: ()
[16:49:58] Rodya_: has joined #RubyOnRails
[16:50:07] [Butch]_: has joined #RubyOnRails
[16:51:08] epochwolf: ResidentBiscuit: what's wrong with rdoc?
[16:51:35] Destru: has joined #RubyOnRails
[16:51:43] [Butch]_: has joined #RubyOnRails
[16:51:45] ResidentBiscuit: Nothing. But since it's declared in the gemspec as 4.0, we're locked into that version. Why does it need to be declared there? We don't need rdoc to use the engine
[16:52:11] username1: has joined #RubyOnRails
[16:52:15] kallisti5: is there a way to catch a .find non-match and continue with a fake record?
[16:52:18] kallisti5: aka - order = "(id='#{sbmids.join("', id='")}') DESC"
[16:52:33] [Butch]_: has joined #RubyOnRails
[16:52:36] kallisti5: whoops.. sorry :-( ActiveRecord::RecordNotFound
[16:53:09] epochwolf: kallisti5: not as such, using find means it should exist.
[16:53:43] kallisti5: bah. ok I guess I can run a where over the array first and delete_if it doesn't exist
[16:53:45] epochwolf: Use where(id: sbmids)
[16:54:02] kallisti5: epochwolf: that won't work. I need to keep ordering intact. :-)
[16:54:09] bbrowning: has joined #RubyOnRails
[16:54:12] epochwolf: kallisti5: reorder in memory after querying.
[16:54:28] kallisti5: epochwolf: oh.. right :-)
[16:55:01] gambl0re: has joined #RubyOnRails
[16:55:23] kallisti5: epochwolf: you don't have that example still in your history do ya? :-)
[16:55:48] epochwolf: records.sort_by{|r| sbmids.index(r.id) }
[16:56:54] kallisti5: epochwolf: so if a record wasn't returned, sort_by will just omit the sort for that item?
[16:58:14] kallisti5: oh yeah... that works great
[16:58:22] kallisti5: epochwolf: see? you did have the best solution :-P
[17:00:49] tercenya: has joined #RubyOnRails
[17:00:51] fluxsource: has joined #RubyOnRails
[17:01:08] matthewd: You could also just do https://github.com/rails/rails/blob/4277047018af90d3f6ba5ec2f7ead7b9d6d11040/activerecord/lib/active_record/relation/finder_methods.rb#L516-L517 for yourself -- which is basically the same thing, but has a better big-O
[17:01:52] matthewd: If your list is short enough, though, the sort_by is likely clearer
[17:05:24] cpruitt: has joined #RubyOnRails
[17:06:05] lupine: has joined #RubyOnRails
[17:08:52] epochwolf: matthewd: you'd need a lot of records to justify building a hash over just sorting in place. :)
[17:09:37] patarr: has joined #RubyOnRails
[17:09:45] matthewd: Define "in place"?
[17:09:54] `: has joined #RubyOnRails
[17:10:57] epochwolf: matthewd: nevermind, sort_by! is not in place, it creates a new array.
[17:11:06] Spami: has joined #RubyOnRails
[17:11:14] hahuang65: has joined #RubyOnRails
[17:11:24] havenwood: ResidentBiscuit: I'd suggest a PR to the gem to change the rdoc #add_dependency to a #add_development_dependency
[17:12:03] knight33: has joined #RubyOnRails
[17:13:17] tercenya: has joined #RubyOnRails
[17:17:28] SteenJobs: has joined #RubyOnRails
[17:20:20] cnk: has joined #RubyOnRails
[17:21:11] narval: Can i clean up this a bit? https://gist.github.com/adavia/f207322a2dec5e4b48fc8d8607bb17ba
[17:21:33] narval: wrong enter
[17:26:03] SteenJobs: has joined #RubyOnRails
[17:26:49] DoctorMonocular: has joined #RubyOnRails
[17:29:32] centrx: narval: Notice a.question == f.question is repeated a lot
[17:29:35] centrx: in every case even
[17:30:28] narval: centrx: yes
[17:33:55] snickers: has joined #RubyOnRails
[17:35:12] Technodrome: has joined #RubyOnRails
[17:35:22] Puffball: has joined #RubyOnRails
[17:40:06] narval: centrx: something like this?
[17:40:07] narval: https://gist.github.com/adavia/f207322a2dec5e4b48fc8d8607bb17ba
[17:40:49] Spami: Am I tripping or `after_initialize` isn't called with build?
[17:41:13] centrx: narval: It looks like that goes through all the filters in each inner loop
[17:41:16] havenwood: narval: Seeing it there, seems more like it should be: next if a.question == f.question
[17:41:50] havenwood: narval: Please do say when you crosspost in multiple channels, so folk can find the discussion and other answers.
[17:42:46] callahanrts: has joined #RubyOnRails
[17:43:11] narval: havenwood: yeah somehow i double posted my question by mistake here
[17:50:09] duderonomy: has joined #RubyOnRails
[17:51:09] sunya7a: hi, I have a model Profile which I would like to update by calling profile.update(params). Profile belongs_to Organization and so there's profile.organization_id. I would like to overwrite when this gets set. I thought I would do this in model/profile.rb with def self.organization_id=() but it doesn't work
[17:51:20] Rodya_: has joined #RubyOnRails
[17:52:43] blackmesa: has joined #RubyOnRails
[17:58:51] patarr1: has joined #RubyOnRails
[18:01:38] xall: has joined #RubyOnRails
[18:02:09] bbrowning: has joined #RubyOnRails
[18:06:08] cnk: 'def self.orginization_id....' is invalid syntax so ya, wouldn't work
[18:06:44] cnk: sunya7a: show your code - the controller where you are updating profile and the Profile model
[18:07:54] DoctorMonocular: has joined #RubyOnRails
[18:09:22] snickers: has joined #RubyOnRails
[18:10:19] jahrichie1: has joined #RubyOnRails
[18:10:38] jahrichie1: any rails devs having issues with fb omni auth gem /fb login? seems the upgrades on 3/27 broke our fb login
[18:13:28] jgt: has joined #RubyOnRails
[18:14:54] sinequanon: has joined #RubyOnRails
[18:17:20] kallisti5: whhhhahhaaa
[18:17:26] kallisti5: ubuntu to drop unity!
[18:20:30] cnk: Is that their desktop manager?
[18:24:30] naftilos76: Assuming that i have a hash {"id"=>1, "title"=>"Happy new year"} and i do => local_var = {"id"=>1, "title"=>"Happy new year"} . Then i can do local_var["id"] . How can i convert the hash keys into hash methods so that i can do local_var.id ?
[18:31:25] xpl0iter_: has joined #RubyOnRails
[18:33:00] antgel: has joined #RubyOnRails
[18:37:53] jsrn_: has joined #RubyOnRails
[18:38:41] Sidoniuns: has joined #RubyOnRails
[18:40:11] jenrzzz: has joined #RubyOnRails
[18:40:11] jenrzzz: has joined #RubyOnRails
[18:40:36] michael_mbp: kallisti5: wow.
[18:42:13] Flipp`-: has joined #RubyOnRails
[18:42:50] Sidoniuns: has joined #RubyOnRails
[18:44:08] jahrichie: has joined #RubyOnRails
[18:45:40] NotDestru: has joined #RubyOnRails
[18:46:25] Flipp`-: hello, I am new to Ruby and Ruby on Rails and am trying to just run a program I have acquried, but the database.yml file just refers to "../.openshift/config/database.yml", which is not part of the zip I was sent, what do I do now?
[18:48:02] cnk: make yourself a new file
[18:48:17] cnk: What db engine do you want ot use?
[18:48:44] Flipp`-: from what I can tell it is using sqlite3, at least for development
[18:48:50] cnk: The easiest way to recreate a database.yml file is to generate a new rails project and copy that one
[18:48:59] Flipp`-: but the whole .openshift folder is missing
[18:49:03] cnk: OK I don't think that is the default when generating a new project
[18:49:18] cnk: Right - but it will only have the config files is my bet
[18:50:02] Flipp`-: let me try
[18:50:23] cnk: do `rails --help` and look for a flag to pass to specify the database type
[18:51:24] cnk: Or copy from http://guides.rubyonrails.org/configuring.html#configuring-a-database section 3.15.1
[18:53:03] futilegames: has joined #RubyOnRails
[18:54:03] ldnunes: has joined #RubyOnRails
[18:54:10] tildes: has joined #RubyOnRails
[18:54:20] jgt: has joined #RubyOnRails
[18:55:30] dionysus69: has joined #RubyOnRails
[18:58:17] Flipp`-: ok I fixed that
[18:58:25] Flipp`-: but now it can't find "../../.openshift/lib/session_store.rb"
[18:58:58] michael_mbp: Chaps, any leads on remote Rails work by any chance?
[18:59:01] Flipp`-: which is referenced by /config/initializers/session_store.rb:1
[18:59:56] cnk: Interesting
[19:00:11] Flipp`-: what is this openshift?
[19:00:20] cnk: Flipp`-: can you grep the project for any more references to openshift - to get a list of all the files you are missing
[19:00:36] cnk: https://docs.openshift.com/
[19:01:01] cnk: vaguely it's a RedHat container service
[19:01:09] michael_mbp: silver searcher is excellent for that `ag -l openshift`
[19:01:18] cnk: I have heard of it but don't really know anything about it
[19:01:40] cnk: michael_mbp: https://weworkremotely.com/
[19:01:57] michael_mbp: cnk: yeah been following that for a while
[19:02:09] michael_mbp: ironically, lot of the posts are for non-remote (go figure!)
[19:02:22] michael_mbp: or for US only.
[19:03:03] matthewd: US only, yes. Actual non-remote should be reported.
[19:03:28] michael_mbp: matthewd: oh? Will do, I see a lot of those.
[19:03:28] arBmind: has joined #RubyOnRails
[19:03:30] cnk: The job ads I see from StackOverflow look generally reasonable quality - but are almost all Python, not Ruby
[19:03:54] Flipp`-: aside from the mentioned session store
[19:03:56] cnk: clearly their algorithm has not figured out that I am on SO because my Python skilz are not as good as my Ruby
[19:04:13] kitsuneyo: has joined #RubyOnRails
[19:04:35] Flipp`-: ./lib/openshift_secret_generator.rb:1:../.openshift/lib/openshift_secret_generator.rb
[19:04:45] whatasunnyday: has joined #RubyOnRails
[19:04:48] Flipp`-: and then there are a bunch of hits in the readme
[19:04:57] tildes: has joined #RubyOnRails
[19:05:57] cnk: OK after reading that README, I would suggest using https://github.com/openshift-quickstart/rails4-example/blob/master/.openshift/lib/openshift_secret_generator.rb to get reasonable versions of the files
[19:06:18] srinidhi: has joined #RubyOnRails
[19:06:23] cnk: you will want your own secret anyway, but need to know what the file structure should look like
[19:06:50] raul782: has joined #RubyOnRails
[19:07:56] Flipp`-: will try that thanks
[19:09:01] raul782: Hello guys, Is there something wrong when calling a tooltip using bootstrap 2.x
[19:09:11] planigan: has joined #RubyOnRails
[19:09:12] raul782: %div.mytooltip{data: {toggle:'tooltip', title:"#{fmd.object.module_datum.tooltip}"}}
[19:09:12] raul782: %i.icon-question-sign
[19:09:49] whatasunnyday: Hello everyone, I had a conceptional modeling question that I'm looking for feedback on. I have a resource that's worked on by two different roles with two different views. I was thinking about making controller in terms of roles. Role1::ResourceController and Role2::ResourceController. Anyone have any idea how can I evaluate how to model this? Books, blog posts, general tips or whatever?
[19:11:02] whatasunnyday: Modeling in terms of the roles seems like a bad idea to me. Just to clarify, I don't think there will be additional roles.
[19:16:26] Spami: has joined #RubyOnRails
[19:17:08] fugee: has joined #RubyOnRails
[19:17:11] hahuang61: has joined #RubyOnRails
[19:18:27] cnk: whatasunnyday: From a technical standpoint - you just need to read the docs on how to namespace controllers. From a design perspective.... I sometimes do separate controllers by access / role, though I often do that on the same level, both controllers directly in app/controllers, rather than in subdirectories
[19:19:03] cnk: whether to nest largely depends on whether other controllers will also need to differ by role
[19:21:12] Flipp`-: ok it is starting up now, thanks for that
[19:23:00] fugee: is sacrificing the original scaffolding to users and creating new controllers for admins the convention?
[19:23:07] sunya7a: cnk: hi, here are my controller and models https://gist.github.com/anonymous/796dd9fa42e8c5c7d33ec708cf400b5b
[19:23:29] fugee: User Load (2.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 3 ORDER BY `users`.`id` ASC LIMIT 1 (0.5ms) BEGIN (0.7ms) ROLLBACK
[19:23:59] fugee: how can i find out why the transaction rolls back
[19:25:23] sunya7a: cnk: i think it's because i'm writing it in a circular way....so on line 59 i should use something like self.update_column(:organization_id, id)?
[19:26:52] cnk: High level, what are you trying to do? e.g. when I edit the user I want X to happen with org ids
[19:28:05] whatasunnyday: cnk, that's very helpful. In Ruby, can you subclass in the Controller and not the directory? Like Class Resource; Class Role1; end; ClassRole; end; end?
[19:29:25] cnk: In ruby you definitely can - but you need to do some reading to see how that plays with Rails autoloading conventions
[19:29:46] sunya7a: cnk: when i edit the user he can pick from a list of organizations. the list is loaded via ajax and updated when the user types. soemtimes there are no hits in which case the json returned puts a dummy variable with the query string embedded as <<<query>>>. I want to save that to the organizations table.
[19:30:38] cnk: So if the user does not find his org, you create a new organization with whatever he typed?
[19:31:11] lxsameer: has joined #RubyOnRails
[19:31:22] sunya7a: cnk: stepping through the rails code for @profile.update(params) i see that it runs @profile.organization_id=() in attribute_assignment.rb
[19:31:27] sunya7a: cnk: correct!
[19:32:30] sunya7a: cnk: i think i solved it with update_column but it's not going through any callbacks it seems now
[19:32:55] cnk: I think that is what is expected from that method - but check the apidocs
[19:33:56] Technodrome: anyone deal with somewhat static pages in rails apps?
[19:34:32] Technodrome: is high voltage still the best way of dealing with that?
[19:35:21] whatasunnyday: cnk, thank you!
[19:38:28] tercenya: has joined #RubyOnRails
[19:40:04] ResidentBiscuit: has joined #RubyOnRails
[19:41:39] sunya7a: cnk: yea...i looked...it's not supposed to run callbacks...so it makes sense
[19:41:47] sunya7a: cnk: how do i trigger callback manually?
[19:42:04] cnk: just call the method that the callback is running
[19:42:23] imadrift: has joined #RubyOnRails
[19:42:23] cnk: e.g. if you have after_save XYZ, just call XYZ
[19:42:40] sunya7a: cnk: okay ty...i think this is working...not as pretty as i thought it would be
[19:43:21] cnk: I'm not super happy with the organization_id= in Profile, but not my code
[19:43:34] cnk: anyway: lunch!
[19:44:07] sunya7a: cnk: enjoy...thanks for your help
[19:47:51] imadrift: anyone have work available immediately? If so, msg me. I've got several years of experience building rails apps
[19:48:25] meoblast001: has joined #RubyOnRails
[19:48:44] planigan: has joined #RubyOnRails
[19:55:30] username: has joined #RubyOnRails
[19:55:49] tildes: has joined #RubyOnRails
[19:56:44] S1kx: has joined #RubyOnRails
[20:00:30] workmad3: has joined #RubyOnRails
[20:02:48] lupine: has joined #RubyOnRails
[20:04:41] jahrichie: has joined #RubyOnRails
[20:04:44] samdvr: has joined #RubyOnRails
[20:07:48] blackmesa: has joined #RubyOnRails
[20:10:07] br0d1n: has joined #RubyOnRails
[20:18:28] lupine: has joined #RubyOnRails
[20:19:22] futilegames: has joined #RubyOnRails
[20:22:07] planigan: has joined #RubyOnRails
[20:31:33] DoubleMalt: has joined #RubyOnRails
[20:33:29] planigan: has joined #RubyOnRails
[20:35:52] antgel: has joined #RubyOnRails
[20:41:42] username: has joined #RubyOnRails
[20:49:40] aperkins81: has joined #RubyOnRails
[20:53:21] Rodya_: has joined #RubyOnRails
[20:57:40] jahrichie: has joined #RubyOnRails
[20:58:23] Technodrome: anyone static pages?
[21:00:12] ldnunes: has joined #RubyOnRails
[21:01:54] jahrichie: mices raise the object.error.messages to see what validation isn't passing
[21:02:01] jahrichie: Technodrome: huh?
[21:02:18] patarr: has joined #RubyOnRails
[21:03:14] Technodrome: is high voltage the best solution for static content?
[21:06:23] jusa: has joined #RubyOnRails
[21:07:42] lupine: hv seems to be more about templated content, not static content
[21:07:54] buckrockwell: has joined #RubyOnRails
[21:12:19] Technodrome: thats what i mean, templated content lupine
[21:15:19] brendan^^: has joined #RubyOnRails
[21:15:33] lupine: I've never used it, but I generally approve of thoughtbots
[21:16:23] Rodya_: has joined #RubyOnRails
[21:30:03] ramortegui: has joined #RubyOnRails
[21:34:16] Guest96: has joined #RubyOnRails
[21:35:04] cagomez: has joined #RubyOnRails
[21:35:14] jenrzzz: has joined #RubyOnRails
[21:35:35] superlou: has joined #RubyOnRails
[21:42:51] bronson: has joined #RubyOnRails
[21:43:50] naprimer: has joined #RubyOnRails
[21:50:15] hnanon: has joined #RubyOnRails
[21:51:19] hnanon: I'm referencing Bootstrap from their CDN at: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css
[21:51:35] Kestrel-029: Hi, anybody who's familiar with Rails associations that can offer advice?
[21:52:04] hnanon: This link says I can customize the variables by using a _custom.scss file:
[21:52:06] hnanon: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css
[21:52:24] hnanon: https://v4-alpha.getbootstrap.com/getting-started/options/
[21:52:55] hnanon: I added a _custom.scss file into my stylesheets folder.
[21:53:00] Kestrel-029: Basically I'm making a form which includes radio buttons and the options available are handled by an admin page. The admin can create options and set the attribute true/false which determines whether it appears on the list of radio button options. I want to be able to filter the available radio button options depending on the true/false attribute, any idea how I can do this?
[21:53:13] Kestrel-029: on the simple_form I'm doing f.association :association etc
[21:53:36] hnanon: It contains this line: $body-color: $gray-lightest;
[21:53:57] hnanon: However, it's not getting picked up.
[21:55:08] hnanon: Bootstrap does come with its own _custom.scss file, though, according to: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_custom.scss
[21:55:40] hnanon: Does that imply that if I'm pulling from the CDN, I can't edit use my own?
[21:57:51] Spami: has joined #RubyOnRails
[21:57:52] Spami: has joined #RubyOnRails
[22:07:26] Technodrome: has joined #RubyOnRails
[22:08:57] jahrichie: has joined #RubyOnRails
[22:09:37] quazimodo: has joined #RubyOnRails
[22:11:35] kristofferR: has joined #RubyOnRails
[22:14:00] chouhoul_: has joined #RubyOnRails
[22:20:38] aajjbb: has joined #RubyOnRails
[22:24:49] kitsuneyo: has joined #RubyOnRails
[22:31:15] sloggerkhan: has joined #RubyOnRails
[22:34:34] daydream: has joined #RubyOnRails
[22:40:16] hahuang65: has joined #RubyOnRails
[22:43:43] username: has joined #RubyOnRails
[22:45:32] sloggerkhan: Is it expected that ruby or rails require open-uri behind the scenes somewhere?
[22:46:54] havenwood: SloggerKhan: https://github.com/rails/rails/blob/master/railties/lib/rails/generators/app_base.rb#L5
[22:47:15] havenwood: SloggerKhan: And then it's referenced in activesupport/test/multibyte_*several_files*.rb
[22:49:04] havenwood: SloggerKhan: But no, I'd require it myself.
[23:07:11] jusa: has joined #RubyOnRails
[23:11:37] sloggerkhan: havenwood: I was mostly wondering about what I considered to be a minor case of "unexpected behavior" in my test environment/console.
[23:13:14] messine: has joined #RubyOnRails
[23:15:27] messine: I have a dumb question and I'm out of my know-how
[23:15:43] messine: http://imgur.com/a/Hmv4K a picture is worth a 1000 words
[23:17:02] messine: I want to connect my app to spotify, so I'm kind of lost on how to go about it
[23:17:12] byteflame: has joined #RubyOnRails
[23:17:15] byteflam1: has joined #RubyOnRails
[23:20:28] messine: Will I be able to query the spotify api with an ajax request?
[23:22:18] cschneid_: has joined #RubyOnRails
[23:22:29] hahuang65: has joined #RubyOnRails
[23:23:31] K1NGREX: has joined #RubyOnRails
[23:26:42] Technodrome: has joined #RubyOnRails
[23:30:09] tercenya: has joined #RubyOnRails
[23:30:38] daydream: has joined #RubyOnRails
[23:32:00] camilasan: has joined #RubyOnRails
[23:32:35] codezomb: has joined #RubyOnRails
[23:34:13] hahuang61: has joined #RubyOnRails
[23:39:44] hndk: has joined #RubyOnRails
[23:43:39] chouhoulis: has joined #RubyOnRails
[23:52:46] Technodrome: has joined #RubyOnRails