« Back to channel list

#RubyOnRails - 12 April 2017

« Back 1 day Forward 1 day »
[00:00:03] sevenseacat: Rails 5 is fine to start with.
[00:00:53] xco: has left #RubyOnRails: ()
[00:01:42] rbpynet: do you know any online resources of rails 5?
[00:02:06] sevenseacat: the official guides http://guides.rubyonrails.org/ are a great place to start.
[00:03:17] renegadeandy: has joined #RubyOnRails
[00:03:57] rbpynet: thanks sevenseacat
[00:16:33] superlou: has joined #RubyOnRails
[00:17:20] rakm: has joined #RubyOnRails
[00:18:16] fernandomm: has joined #RubyOnRails
[00:25:48] rafaeldelucena: has joined #RubyOnRails
[00:26:44] Rodya_: has joined #RubyOnRails
[00:31:40] rakm: has joined #RubyOnRails
[00:32:37] chouhoulis: has joined #RubyOnRails
[00:39:11] rakm: has joined #RubyOnRails
[00:41:16] Nuck: has joined #RubyOnRails
[00:41:17] brent__: has joined #RubyOnRails
[00:43:01] jfelchner: has joined #RubyOnRails
[00:45:02] jgt3: has joined #RubyOnRails
[00:47:13] duderono_: has joined #RubyOnRails
[00:48:58] stevednd: has joined #RubyOnRails
[00:50:00] jenrzzz: has joined #RubyOnRails
[00:50:48] wethu: has joined #RubyOnRails
[00:54:50] cam27: has joined #RubyOnRails
[00:59:08] aajjbb: has joined #RubyOnRails
[01:01:42] byteflame: has joined #RubyOnRails
[01:14:04] erlend: has joined #RubyOnRails
[01:17:50] mooser: has joined #RubyOnRails
[01:18:22] Robtop__: has joined #RubyOnRails
[01:24:19] jenrzzz: has joined #RubyOnRails
[01:24:19] jenrzzz: has joined #RubyOnRails
[01:24:23] spicerack: has joined #RubyOnRails
[01:24:38] s2013: has joined #RubyOnRails
[01:26:15] marcdel: has joined #RubyOnRails
[01:38:28] brent__: has joined #RubyOnRails
[01:48:24] Jameser: has joined #RubyOnRails
[01:56:00] quazimodo: has joined #RubyOnRails
[01:56:03] quazimod1: has joined #RubyOnRails
[01:58:58] nya: has joined #RubyOnRails
[01:59:31] nya: has joined #RubyOnRails
[02:03:06] irishfromua: has joined #RubyOnRails
[02:04:39] libastral: has joined #RubyOnRails
[02:05:20] crystalneth: has joined #RubyOnRails
[02:07:41] patarr: has joined #RubyOnRails
[02:08:00] Technodrome: has joined #RubyOnRails
[02:09:34] irishfromua: has joined #RubyOnRails
[02:14:40] irishfromua: has joined #RubyOnRails
[02:18:45] jeyraof^mbpr: has joined #RubyOnRails
[02:25:14] inkshark: has joined #RubyOnRails
[02:25:22] jdm: has joined #RubyOnRails
[02:25:22] irishfromua: has joined #RubyOnRails
[02:26:54] workmad3: has joined #RubyOnRails
[02:27:16] pwnd_nsfw`: has joined #RubyOnRails
[02:29:21] Rodya_: has joined #RubyOnRails
[02:30:51] jochi: has joined #RubyOnRails
[02:31:35] jochi: FUCK ALL NIGGERS !!!!!!!
[02:32:48] huvax33kfu: has joined #RubyOnRails
[02:33:00] huvax33kfu: didn't mean to
[02:38:59] claudevandort: has joined #RubyOnRails
[02:42:30] jdm: has joined #RubyOnRails
[02:47:18] hndk: has joined #RubyOnRails
[02:53:27] quazimodo: has joined #RubyOnRails
[02:54:23] quazimod1: has joined #RubyOnRails
[02:57:47] jdm: has joined #RubyOnRails
[02:58:20] cjylj40exe: has joined #RubyOnRails
[02:58:25] cjylj40exe: hey i do drugs
[02:58:44] nya: has joined #RubyOnRails
[02:58:58] sevenseacat: has joined #RubyOnRails
[02:59:33] baweaver: hrm, no mute it is
[02:59:54] vfkds0qxm: has joined #RubyOnRails
[03:00:01] bsuej35uel: has joined #RubyOnRails
[03:00:08] oedoo5ocx: has joined #RubyOnRails
[03:01:33] ocrhb17pcw: has joined #RubyOnRails
[03:01:54] byteflame: has joined #RubyOnRails
[03:02:15] frqay26axq: has joined #RubyOnRails
[03:02:38] oqher36ejc: has joined #RubyOnRails
[03:02:53] gjows12gmr: has joined #RubyOnRails
[03:03:10] iaylu26mnu: has joined #RubyOnRails
[03:04:26] Destru: has joined #RubyOnRails
[03:05:07] aryz: has joined #RubyOnRails
[03:07:55] duderonomy: has joined #RubyOnRails
[03:09:19] jgt3: has joined #RubyOnRails
[03:12:25] ytovenyjucaf: has joined #RubyOnRails
[03:12:53] renegadeandy: has joined #RubyOnRails
[03:12:53] husivuhugib: has joined #RubyOnRails
[03:13:22] jydukos: has joined #RubyOnRails
[03:13:47] xawef: has joined #RubyOnRails
[03:14:15] yman: has joined #RubyOnRails
[03:14:34] Guest96: has joined #RubyOnRails
[03:15:01] ugew: has joined #RubyOnRails
[03:15:05] mostlybadfly: has joined #RubyOnRails
[03:15:57] jusa: has joined #RubyOnRails
[03:15:59] ugew: seriously whats the percentage of black people currently working on rails
[03:16:16] Cohedrin: has joined #RubyOnRails
[03:16:43] harfangk: has joined #RubyOnRails
[03:16:49] ugew: i dont think we have succeeded spreading the language to blacks, women and gays
[03:16:50] ugew: honestly
[03:17:18] sevenseacat: I think that's not really an appropriate line of discussion
[03:17:28] war_pigs: has joined #RubyOnRails
[03:18:02] ChanServ: +q *!*@185.156.174.84
[03:18:06] sevenseacat: because this is a help channel for rails.
[03:18:18] sevenseacat: that works too
[03:18:20] l: has joined #RubyOnRails
[03:18:25] baweaver: boring troll is boring
[03:18:39] jgt3: has joined #RubyOnRails
[03:18:52] jdm: has joined #RubyOnRails
[03:19:03] Guest2585: im brown myself and just wanted to know which brothers were working on it
[03:19:18] Guest2585: baweaver: are you brown
[03:19:35] ChanServ: +q *!*@185.93.183.220
[03:19:53] evul: has joined #RubyOnRails
[03:20:36] evul: plz don't.
[03:20:38] evul: i just wanna know who else is brown, why you gotta hate
[03:20:40] evul: you sound like a white man
[03:20:42] evul: stop acting like such a white man
[03:21:18] evul: i see MINASWAN doesnt apply to blacks
[03:21:55] ChanServ: +q *!*@194.54.80.108
[03:22:14] ymawedebesyjoq: has joined #RubyOnRails
[03:23:03] ymawedebesyjoq: you're only making my penis harder
[03:23:51] dumariwutoriz: has joined #RubyOnRails
[03:24:06] baweaver: K-Line it is
[03:24:29] sevenseacat: how is that supposed to be fun?
[03:24:38] dumariwutoriz: K-Line can't stop me
[03:24:40] dumariwutoriz: i'm too powerful
[03:24:42] dumariwutoriz: i thank matz and the ruby language for turning me into the most powerful hacker
[03:25:00] baweaver: Looks like we don't even have to bother now
[03:25:53] padywodyw: has joined #RubyOnRails
[03:26:37] Radar: +r means only users who are registered can join this channel
[03:26:37] padywodyw: i'll tell you guys who i am for 1 bitcoin and delete this software forever
[03:26:44] ChanServ: +q *!*@217.151.98.50
[03:26:48] baweaver: none for you
[03:27:01] ChanServ: +b *!*@217.151.98.50
[03:27:01] ChanServ: ChanServ kicked padywodyw: is banned from this channel
[03:27:06] Radar: Get a life.
[03:27:18] sevenseacat: ah cool, that wasnt one of the options I could see in textual's menus
[03:27:35] Radar: sevenseacat: I've been using IRC since before IRC clients had menus :P
[03:27:43] sevenseacat: yeah I'm an IRC noob
[03:28:06] sunrunner20: I'm installing redmine
[03:28:13] baweaver: ACTION puts down hammer slowly
[03:28:16] Radar: sunrunner20: ops are a little sensitive to walls of text at the moment so perhaps try to keep everything to one line?
[03:28:29] sunrunner20: sorry, bad habbit
[03:28:36] Radar: maybe "walls of text" isn't the right term there. Enter key shouldn't be used as a space bar.
[03:29:02] sunrunner20: anyway, whats the most up to date guide to getting RoR running on ubuntu server?
[03:29:10] Technodrome: has joined #RubyOnRails
[03:29:11] sunrunner20: I'm sure I can google for postgresql
[03:30:35] Rodya_: has joined #RubyOnRails
[03:31:00] sevenseacat: eh I don't think it's changed too much in recent years
[03:31:22] sunrunner20: the guide I had on pluralsight was 2014
[03:31:24] sevenseacat: though I don't know if you'd want chruby/ruby-install for a prod box - thats not my forte
[03:32:03] sunrunner20: I have two RoR books sitting in my car
[03:32:13] sunrunner20: haven't unboxed them yet
[03:32:51] sevenseacat: which books, out of curiosity?
[03:33:21] hfp_work: has joined #RubyOnRails
[03:34:07] sunrunner20: rails 4 in action and rails 4 way
[03:34:24] sevenseacat: <-- co-author of Rails 4 in Action
[03:34:55] sunrunner20: Just realized they were $40 each, maybe I should have work reimburse me for them
[03:35:17] sunrunner20: I have quite the bit of lee way on what I can expense
[03:35:46] war_pigs: has joined #RubyOnRails
[03:35:50] sunrunner20: I just submitted an expense report for a bounty I put on getting a question answered on the IRC channel
[03:35:57] Radar: <-- also co-author of Rails 4 in Action
[03:36:28] sunrunner20: I'm coming from a .net background
[03:36:56] sunrunner20: The pricing on gitlabs and redmine is just too attractive to ignore
[03:37:05] sevenseacat: I worked with .net once. it was awful. *insert grumpy cat
[03:37:21] sunrunner20: to each their own
[03:37:34] sunrunner20: just so long as its not a fucking java GUI framework
[03:37:40] sevenseacat: oh yeah, is just my opinion, and it was many moons ago, it's likely better now
[03:38:07] sunrunner20: I don't know why i hated java GUI so much
[03:38:43] sunrunner20: but we have a 4 person group for the final project of CS 1337 (201)
[03:39:08] sunrunner20: I told everybody get me the front end written 2 weeks before the due date and I'll take care of the rest
[03:39:31] sevenseacat: mmm group projects at uni typically suck
[03:39:51] sunrunner20: they delivered their part mostly good
[03:40:13] sunrunner20: they all seemed to like the GUI work it was 'easy' for them
[03:41:02] sunrunner20: getting classes to interact like the prof wanted and validation etc is what I'm good at
[03:41:11] cagomez: has joined #RubyOnRails
[03:41:37] Pumukel: has joined #RubyOnRails
[03:41:41] sunrunner20: I got points doc'd for being TOO good at my validation. TA didn't like that they couldn't be 200yrs old
[03:42:10] sunrunner20: I appealed to the professor and got the points back
[03:43:56] sunrunner20: any opinions on nginx vs apache here?
[03:44:03] s2013: has joined #RubyOnRails
[03:44:50] sunrunner20: I used to be good at apache, but it seems everything is using nginx now. so I better learn it
[03:45:35] xall: has joined #RubyOnRails
[03:47:50] rakm: has joined #RubyOnRails
[03:51:54] jdm: has joined #RubyOnRails
[03:53:48] Radar: I like nginx too :)
[03:56:21] chouhoulis: has joined #RubyOnRails
[04:00:47] quazimodo: has joined #RubyOnRails
[04:02:54] sunrunner20: redmine says ruby 2.3, can I do 2.4 instead?
[04:04:06] sunrunner20: looks like no
[04:04:23] sunrunner20: this forum post has some fairly substantial behavior changes
[04:04:30] bronson: has joined #RubyOnRails
[04:05:37] cagomez: has joined #RubyOnRails
[04:06:03] sunrunner20: and sorry, enter as space bar again... which is in vogue right now rbenv or rvm?
[04:06:18] havenwood: sunrunner20: chruby
[04:06:22] sevenseacat: depends on who you ask. I'd say neither.
[04:10:03] sunrunner20: install from source and just have one version?
[04:11:02] sunrunner20: These'll be one app VMs so I don't think I'll need to conflict versions
[04:19:10] war_pigs: has joined #RubyOnRails
[04:20:10] duderonomy: has joined #RubyOnRails
[04:21:22] sunrunner20: Is Phusion Passenger something I need or just a complication at this point?
[04:26:42] cagomez: has joined #RubyOnRails
[04:30:05] aajjbb: has joined #RubyOnRails
[04:31:16] Rodya_: has joined #RubyOnRails
[04:48:57] jhfisc: has joined #RubyOnRails
[04:50:09] xall: has joined #RubyOnRails
[05:02:02] byteflame: has joined #RubyOnRails
[05:02:04] bronson: has joined #RubyOnRails
[05:09:51] jhfisc: has joined #RubyOnRails
[05:11:46] patarr: has joined #RubyOnRails
[05:17:25] cseder: has joined #RubyOnRails
[05:21:12] sevenseacat: has joined #RubyOnRails
[05:21:51] xall: has joined #RubyOnRails
[05:41:52] brent__: has joined #RubyOnRails
[05:43:41] rafadc: has joined #RubyOnRails
[05:45:59] rafadc: has joined #RubyOnRails
[05:46:44] rafadc: has joined #RubyOnRails
[05:47:40] rafadc: has joined #RubyOnRails
[05:48:01] xpl0iter: has joined #RubyOnRails
[05:48:30] rafadc: has joined #RubyOnRails
[05:48:47] cagomez: has joined #RubyOnRails
[05:49:16] rafadc: has joined #RubyOnRails
[05:50:55] pLaTo0n: has joined #RubyOnRails
[06:03:33] AzaToth: has joined #RubyOnRails
[06:09:53] cagomez: has joined #RubyOnRails
[06:17:59] arBmind: has joined #RubyOnRails
[06:20:20] rafadc_: has joined #RubyOnRails
[06:22:46] DrYockel: has joined #RubyOnRails
[06:28:43] Pumukel: has joined #RubyOnRails
[06:29:32] Pumukel: has joined #RubyOnRails
[06:30:18] Pumukel: has joined #RubyOnRails
[06:31:07] Pumukel: has joined #RubyOnRails
[06:31:54] Pumukel: has joined #RubyOnRails
[06:34:08] Rodya_: has joined #RubyOnRails
[06:36:23] irishfromua: has joined #RubyOnRails
[06:37:05] conta: has joined #RubyOnRails
[06:53:54] Jameser: has joined #RubyOnRails
[06:56:47] djgraham: has joined #RubyOnRails
[06:56:53] Sirecote: has joined #RubyOnRails
[06:57:30] barnex: has joined #RubyOnRails
[06:58:36] fl4sh_: has joined #RubyOnRails
[06:58:52] veloutin: has joined #RubyOnRails
[06:59:15] nikivi: has joined #RubyOnRails
[06:59:40] Psy-Q: has joined #RubyOnRails
[06:59:55] alfie: has joined #RubyOnRails
[07:01:23] Davey: has joined #RubyOnRails
[07:02:08] byteflame: has joined #RubyOnRails
[07:02:17] eduardodeoh: has joined #RubyOnRails
[07:03:10] roshanavand: has joined #RubyOnRails
[07:12:37] patarr: has joined #RubyOnRails
[07:16:40] bbrowning: has joined #RubyOnRails
[07:27:50] Terens: has joined #RubyOnRails
[07:30:33] Terens: I initiate rails application update within app it self. My question is how can I reliably tell whether update is running , and get its status when finished/failed. (on a higher level) .
[07:34:52] Rodya_: has joined #RubyOnRails
[07:45:43] Radar: Terens: Can you please show us some code?
[08:07:05] armyriad: has joined #RubyOnRails
[08:08:43] sevenseacat: thats a negative, ghostrider
[08:11:40] mikecmpbll: has joined #RubyOnRails
[08:19:29] arBmind: has joined #RubyOnRails
[08:21:01] Qchmqs: has joined #RubyOnRails
[08:22:27] xall: has joined #RubyOnRails
[08:25:11] dionysus69: has joined #RubyOnRails
[08:27:22] Ayey_: has joined #RubyOnRails
[08:27:40] chouhoulis: has joined #RubyOnRails
[08:34:35] Jameser: has joined #RubyOnRails
[08:35:33] Rodya_: has joined #RubyOnRails
[08:38:24] marr: has joined #RubyOnRails
[08:52:47] ErhardtMundt: has joined #RubyOnRails
[08:55:39] lxsameer: has joined #RubyOnRails
[09:02:25] byteflame: has joined #RubyOnRails
[09:04:20] roshanavand: has joined #RubyOnRails
[09:12:09] deur-: Has anyone gotten the remotipart gem to work in Rails 5?
[09:13:32] patarr: has joined #RubyOnRails
[09:15:25] Sigyn: has joined #RubyOnRails
[09:21:47] xall: has joined #RubyOnRails
[09:25:32] pavelz: has joined #RubyOnRails
[09:26:10] pavelz: hello, I am tryuing to user ruby console but it doesn't really suspend on Ctrl-Z. seems like a severe bug
[09:26:22] pavelz: rails console I mean.
[09:28:04] sevenseacat: seems to suspend here - what shell are you using? what version of rails?
[09:30:58] pavelz: oh right its spring interfereing for some reason
[09:31:06] pavelz: DISABLE_SPRING=1
[09:31:22] pavelz: sevenseacat: rails 4.2.8 r 2.2.6 & macOS
[09:32:20] sevenseacat: odd. spring shouldnt be interfering (and doesnt on my machine)
[09:32:34] User458764: has joined #RubyOnRails
[09:35:12] bbrowning: has joined #RubyOnRails
[09:36:18] Rodya_: has joined #RubyOnRails
[09:38:57] ferr1: has joined #RubyOnRails
[09:49:57] srinidhi: has joined #RubyOnRails
[09:54:22] Doldge: has joined #RubyOnRails
[09:57:57] Doldge: Hey, is anyone able to point me in the direction of some good guides/tutorials on getting started with Ruby/Rails?
[09:59:14] Ayey_: Doldge: https://www.railstutorial.org/book
[10:02:22] byteflame: has joined #RubyOnRails
[10:03:19] Doldge: Ayey: Thanks for that.
[10:06:36] v|sh: has joined #RubyOnRails
[10:12:35] patarr: has joined #RubyOnRails
[10:17:09] arefaslani: has joined #RubyOnRails
[10:20:31] hamedtalebpoorb: has joined #RubyOnRails
[10:21:36] bronson: has joined #RubyOnRails
[10:23:54] Qchmqs: has joined #RubyOnRails
[10:32:34] hamedtalebpoorb: i have a problem in rails and docker
[10:32:45] hamedtalebpoorb: the problem is that:
[10:33:49] hamedtalebpoorb: `block in materialize': Could not find rake-12.0.0 in any of the sources (Bundler::GemNotFound)
[10:34:24] Pumukel: has joined #RubyOnRails
[10:34:27] hamedtalebpoorb: link to my dockerfile and gem.lock and gem file is:
[10:34:30] hamedtalebpoorb: https://gist.github.com/hamedtalebpoorb/cf4a84e87dadc3dea222f43216b86949
[10:36:09] universa1: hamedtalebpoorb: without having used rails in docker, error trace? command? ...
[10:36:56] hamedtalebpoorb: dont have any error
[10:37:04] Rodya_: has joined #RubyOnRails
[10:37:41] hamedtalebpoorb: when using docker then errors come
[10:37:43] xall: has joined #RubyOnRails
[10:38:04] hamedtalebpoorb: but someone in docker irc say that its ruby error not docker
[10:38:04] tbuehlmann: hamedtalebpoorb: I recommend not adding the Gemfile and other files like you do. instead, use docker-compose and mount the whole directory
[10:38:22] tbuehlmann: example: https://gist.github.com/tbuehlmann/51bb8c40f923368a0f6057cb2a8c92b2
[10:40:41] hamedtalebpoorb: i can not what do you mean please describe your solution a little more
[10:42:06] GodFather: has joined #RubyOnRails
[10:42:16] tbuehlmann: you are entering a world of pain when ADDing Gemfile and Gemfile.lock and the the app directory in the Dockerfile
[10:42:55] rgr: has joined #RubyOnRails
[10:43:49] dminuoso: 12:42 < tbuehlmann> you are entering a world of pain when ADDing Gemfile and Gemfile.lock and the the app directory in the Dockerfile
[10:45:06] dminuoso: tbuehlmann: All it means is that you have to rebuild the docker image every time you make changes to your Gemfile/Gemfile.lock -> that is not a world of trouble, it is just a rather trivial consequence.
[10:47:29] hamedtalebpoorb: dminuos:do you have a solution or idea what happend for me?
[10:51:21] dminuoso: hamedtalebpoorb: The problem is basically the same as with spring. The software does not know you modified those files. Just rebuild your container from scratch (or if you're a bit experienced just from the layer above "ADD Gemfile"
[10:54:09] Takumo: Hi all, I've got a model which has a custom serializer for a postgres `box` field
[10:54:19] Takumo: the serializer handles serialization into and out of a `Box` struct
[10:54:35] Takumo: however sometimes when I assign a value to that field, the created `Box` is all nil
[10:56:17] universa1: Takumo: specific value? does it always happen with that value?!
[10:56:34] Takumo: any value
[10:57:20] Takumo: or rather, any Box
[10:57:42] sevenseacat: codecodecodecodecode
[10:57:45] universa1: postgres field is nil? or ruby field is nil?
[10:58:28] universa1: anyway, off to lunch, bbl :-)
[10:59:02] sevenseacat: edocedocedocedocedoc
[10:59:14] centrx: has joined #RubyOnRails
[10:59:14] Takumo: https://gist.github.com/LeoAdamek/a7c477c766df6062390f6aa5b84dc930
[10:59:26] Takumo: yeah lunch more important!
[10:59:31] hamedtalebpoorb: <dminuoso>:i rebuild it many time after every changes but it not provide anything
[11:01:49] cagomez: has joined #RubyOnRails
[11:02:49] Takumo: might change Box from a struct to a plain object
[11:03:58] tbuehlmann: dminuoso: okay
[11:13:14] elsurudo: has joined #RubyOnRails
[11:13:49] elsurudo: Using Rails 5.1.rc1 with Vue… does anyone have any tips on how to get babel to process vue files before they get to UglifyJS in production?
[11:14:03] elsurudo: I know it has to do with the loaders, but I’m not quite sure what to change
[11:17:00] elsurudo: I tried changing the “test” in the babel loader to: /(\.js|\.vue)(\.erb)?$/ but still no dice
[11:28:14] universa1: Takumo: did you fix your problem in the meantime?
[11:30:18] workmad3: has joined #RubyOnRails
[11:30:20] Takumo: not yet, just refactoring my struct to a plain object so I don't have monkey patched methods on it
[11:32:50] cagomez: has joined #RubyOnRails
[11:35:48] Saukk: has joined #RubyOnRails
[11:36:06] yaw: has joined #RubyOnRails
[11:37:26] yaw: any idea why `timestamp without time zone` is the default datetime ActiveRecords' PostgreSQL adapter uses?
[11:37:48] Rodya_: has joined #RubyOnRails
[11:37:58] yaw: feel free to point me to articles, blogs, etc. I'll read them
[11:39:12] sevenseacat: because times are stored in UTC always, so the timezone is irrelevant
[11:40:08] Takumo: ^ AR will store times in UTC and use the currently set zone to adjust them
[11:40:27] Takumo: given that some DBs (like MySQL) don't support `with time zone`
[11:42:05] yaw: got it. thanks sevenseacat and Takumo :)
[11:42:15] hamedtalebpoorb: has joined #RubyOnRails
[11:42:27] Takumo: Its very rare that you'd actually want to store times with zones really
[11:43:37] harfangk: has joined #RubyOnRails
[11:47:09] yaw: Takumo: you mean there's only few occassion AR doesn't handle it well for you?
[11:47:49] Takumo: usually storing date/time in UTC and using code to adjust the value to display as per the user's preferences or app settings
[11:48:19] Takumo: and adjusting user input dates/times to UTC from another zone is fine too
[11:48:35] yaw: that's how I understood what you and sevenseacat said
[11:48:43] Takumo: only case I can think of where you would need to store zones against datetime fields is something like say
[11:48:56] Takumo: where you start in one zone and end in another
[11:49:05] matthewd: IMO you should really be using timestamptz ~always
[11:49:23] Takumo: ~always at in never or *always* ?
[11:49:38] matthewd: approximately always
[11:50:24] Takumo: never seen the need to use `timestamp with time zone` myself for the reasons above... you usually just want sortable, selectable and filterable chronology
[11:51:40] matthewd: Do you know what the difference between timestamp and timestamptz is? Because neither one stores a timezone.
[11:55:33] Takumo: isn't timestamptz just shorthand for `timestamp with time zone` ?
[11:55:42] User458764: has joined #RubyOnRails
[11:56:49] Takumo: universa1: So I thought changing my `Box` to a plain class rather than a struct would help but now even weirder things are happening
[11:58:35] Takumo: universa1: updated https://gist.github.com/LeoAdamek/a7c477c766df6062390f6aa5b84dc930 -- now even weirder :/
[12:00:48] yawboakye: has joined #RubyOnRails
[12:02:28] universa1: Takumo: yeah, it acts weirdly... have created a dummy app... i don't understand the behavior...
[12:03:14] matthewd: Takumo: What's your Rails version? I see ApplicationRecord, so 5.0?
[12:03:44] universa1: https://github.com/universal/boxTypeSerializerTest
[12:04:07] universa1: for me the serializer is called multiple times...
[12:05:04] Takumo: 5.0 indeed
[12:05:26] matthewd: You may be better served by the attributes & types API
[12:06:09] matthewd: Takumo: http://api.rubyonrails.org/classes/ActiveRecord/Attributes/ClassMethods.html#method-i-attribute
[12:06:18] Takumo: matthewd: Sounds like it
[12:06:32] Takumo: I was using serializes only because I didn't think I could implement a custom `type`
[12:08:18] universa1: yep, but given the documentation for serialize my guess is it should be possible using serialize... ...not the recommended way, but possible, right?
[12:08:32] wethu: has joined #RubyOnRails
[12:10:02] Takumo: yeah but let's register a type though
[12:10:15] universa1: for me for a: b = Box.new(...); Dummy.create(box: b) --- i get the following calls: load, load, dump, load, load, load, load, dump, sql insert, load, dump, commit, load, load ;)
[12:10:33] universa1: something is off there ;)
[12:11:04] wethu: has joined #RubyOnRails
[12:11:11] matthewd: universa1: Ah, the coder needs to support .load(nil)
[12:11:21] universa1: matthewd: it does for me
[12:11:23] matthewd: .. which a number of those will be
[12:11:37] universa1: matthewd: yes, most of them are, but why so many calls? ;)
[12:12:01] matthewd: https://github.com/rails/rails/blob/428d47adfed8d6aa7b21aec2bf5ad890961c9de3/activerecord/lib/active_record/type/serialized.rb#L53
[12:13:00] matthewd: Not worth trying to implement some generic caching just in case it's slow, I guess
[12:13:04] universa1: matthewd: that could be it :-)
[12:13:31] matthewd: If your coder is slow, and you can't even special-case nil to make it fast, you can add more contextually-aware caching for yourself
[12:13:46] Pumukel: has joined #RubyOnRails
[12:14:00] universa1: just trying that "dummy" example... never needed it...
[12:14:11] universa1: was curious about Takumo's problem ;)
[12:14:21] Pumukel: has joined #RubyOnRails
[12:14:26] matthewd: Yeah, sorry that was a generic "you"
[12:14:38] universa1: no worries...
[12:14:52] universa1: okay, now that we've solved that... back to writing the review...
[12:16:10] uksio: has joined #RubyOnRails
[12:18:41] King_Rex: has joined #RubyOnRails
[12:19:51] cagomez: has joined #RubyOnRails
[12:27:26] Rodya_: has joined #RubyOnRails
[12:34:56] v|sh: has joined #RubyOnRails
[12:35:23] cagomez: has joined #RubyOnRails
[12:42:03] brent__: has joined #RubyOnRails
[12:46:49] chouhoulis: has joined #RubyOnRails
[12:54:41] GodFather: has joined #RubyOnRails
[12:55:13] soule: has joined #RubyOnRails
[12:56:05] romeoh: has joined #RubyOnRails
[12:57:29] romeoh: has joined #RubyOnRails
[13:04:48] yaw: has joined #RubyOnRails
[13:11:03] mrgreenfur: has joined #RubyOnRails
[13:27:19] mustmodify: has joined #RubyOnRails
[13:30:20] teddysmoker: has joined #RubyOnRails
[13:32:27] elsurudo: Turbolinks: Do a standard form POST (non-JS response… simply get a re-render), the object has a validation error. Navigate to another page via turbolinks link (no page reload). Now press browser’s “reload” button. Get warning that form will be re-submitted. Is this normal? Do I need to make _all_ my form POSTs “turbolinky” to avoid this, or is there a fix?
[13:36:41] DLSteve: has joined #RubyOnRails
[13:41:07] teddysmoker: I'm having a problem with the cloudinary_gem (it's a SaaS for image / video processing). I'm using a initializer which stores the authentication details and that works well on a development environment but it fails on production. Note that if I run the rails console in production and check for the ENVs that store the auth details they are present. Any ideas?
[13:41:15] Technodrome: has joined #RubyOnRails
[13:43:20] teddysmoker: the error that I'm getting is "CloudinaryException (Must supply api_key)"
[13:46:15] safetypin: has joined #RubyOnRails
[13:49:52] mustmodify: has left #RubyOnRails: ()
[13:51:20] Pumukel: has joined #RubyOnRails
[13:53:54] Pumukel: has joined #RubyOnRails
[13:59:30] war_pigs: has joined #RubyOnRails
[14:07:08] war_pigs: has joined #RubyOnRails
[14:10:41] Jameser: has joined #RubyOnRails
[14:11:31] User458764: has joined #RubyOnRails
[14:11:35] patarr: has joined #RubyOnRails
[14:14:53] dblessing: has joined #RubyOnRails
[14:16:24] bronson: has joined #RubyOnRails
[14:17:51] Nimzowitsch: has joined #RubyOnRails
[14:18:10] Nimzowitsch: I'm reading up on autoloading in Rails
[14:19:04] war_pigs: has joined #RubyOnRails
[14:19:07] Nimzowitsch: when Rails starts up, among other controllers, it loads ControllerA because it is in app/ which is the default dir for config.autoload_path
[14:19:38] Nimzowitsch: in one of the methods in ControllerA I instantiate ModelA
[14:19:59] Nimzowitsch: which leads me to my question.. what happens when a controller is autoloaded?
[14:20:22] Nimzowitsch: do all methods get evaluated, and whenever a constant is encountered in one of the methods it gets evaluated as well
[14:20:50] Nimzowitsch: the reason I'm asking is because Rails fails to start and it shows that it fails in ModelA
[14:21:14] Nimzowitsch: deeper in the stacktrace it shows that it first required ControllerA
[14:21:17] fryguy: Nimzowitsch: depends on some settings, notably eagerloading
[14:21:27] fryguy: where is ModelA located
[14:21:32] Nimzowitsch: the reason why it's failing it's obvious to me and I know how to fix it, but I wanna understand what goes on
[14:21:41] Nimzowitsch: it is defined in a method in ControllerA
[14:21:55] Nimzowitsch: ControllerA << ApplicationController
[14:22:04] Nimzowitsch: there's no mention of ModelA in ApplicationController
[14:22:16] fryguy: where is modelA defined
[14:23:16] fryguy: would need to see some code then i guess
[14:23:23] fryguy: all code is executed in a file when it's loaded
[14:23:30] Nimzowitsch: when you say all code
[14:23:36] Nimzowitsch: do you mean the methods as well..?
[14:23:52] fryguy: `def index` will run
[14:23:55] fryguy: which defines that method
[14:23:57] Nimzowitsch: matthewd: that's what I thought!
[14:24:04] matthewd: Nimzowitsch: But the backtrace should tell you exactly which line has caused the load
[14:24:41] workmad3: has joined #RubyOnRails
[14:24:49] Nimzowitsch: fryguy: I've not been able to find that info online. Namely that index gets evaluated when autoloading a controller. If that's indeed the case then it's case solved
[14:25:02] Nimzowitsch: for I lazyload an instance of ModelA in index
[14:25:16] Nimzowitsch: matthewd: it always says required(top 1)
[14:25:31] matthewd: `def index` gets executed; the body of the method does not
[14:25:42] matthewd: !gist the whole backtrace
[14:25:42] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[14:26:19] yaw: has joined #RubyOnRails
[14:41:41] Leepoff: has joined #RubyOnRails
[14:42:25] Nimzowitsch: has joined #RubyOnRails
[14:42:55] Nimzowitsch: matthewd, fryguy: after taking another look at the Rails doc on autoloading I saw that index is definitely evaluated on controllers
[14:43:06] Nimzowitsch: that answers my question, and I can explain why ModelA is being called
[14:43:09] Nimzowitsch: thanks so much guys
[14:43:12] matthewd: It's really definitely not
[14:43:47] matthewd: If the doc suggests otherwise, I should fix it. Where are you looking?
[14:45:23] jonno112: has joined #RubyOnRails
[14:47:08] Nimzowitsch: matthewd: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[14:47:31] matthewd: Right.. but which part?
[14:47:35] Nimzowitsch: matthewd: it does not say it explicitly but all examples use index, and there it says that: Let's see how Rails autoloads the Post constant in the PostsController above assuming the application has a Post model defined in app/models/post.rb
[14:48:03] Nimzowitsch: the Post model is defined in index so I assumed index is being evaluated
[14:48:08] matthewd: Yes.. that happens when index is called
[14:48:12] Scient: I think one of the most retarded things ive ran into so far is rails basically blocking me from having a table named transactions
[14:48:15] Scient: and any associated associations
[14:48:20] Scient: facepalm worthy stuff
[14:49:13] Nimzowitsch: matthewd: so how else would you explain this -> Rails tries to start, it loads ControllerA then there's 0 application code in the stacktrace and then it shows up in ModelA
[14:49:23] Nimzowitsch: matthewd: ModelA is defined in index of ControllerA
[14:49:36] Nimzowitsch: fryguy: seemed pretty adamant that that's indeed the case - that index is being evaluated
[14:50:08] matthewd: Nimzowitsch: As I said, gist the backtrace
[14:50:57] matthewd: Nimzowitsch: Wait.. is this development or production?
[14:51:36] matthewd: Rails autoloads all constants in production (by default)
[14:52:27] Nimzowitsch: matthewd: so it scans a file and searches for constants, and the ones it encounters it autoloads?
[14:52:49] matthewd: No. It loads the files.
[14:53:28] matthewd: It is loading app/models/model_a.rb because that file exists, without regard to whether ModelA is ever referenced anywhere
[14:53:41] byteflame: has joined #RubyOnRails
[14:54:07] Nimzowitsch: umm.. well that was my initial hypthesis, however, how do you explain that deeper in the stacktrace there's reference to require<top1> of ControllerA
[14:54:48] DrYockel: has joined #RubyOnRails
[14:55:25] Nimzowitsch: Let's see how Rails autoloads the Post constant in the PostsController above assuming the application has a Post model defined in app/models/post.rb <- I think this is what's happening
[14:55:35] Nimzowitsch: it encounters ControllerA and it tries to load ModelA as well
[14:55:52] matthewd: I can only blindly accuse you of misreading it, sorry ¯\_(ツ)_/¯
[14:56:51] Technodrome: has joined #RubyOnRails
[14:58:01] patarr1: has joined #RubyOnRails
[14:58:25] Nimzowitsch: matthewd: misreading what? sorry I missed what you said
[14:58:55] Nimzowitsch: matthewd: would you agree that what I'm looking for is not clearly defined in the docs at least? :)
[14:59:24] Nimzowitsch: either that or I'm a patzer and am missing something really obvious..
[14:59:50] matthewd: I think you're inventing a more complex behaviour than is actually in play
[15:00:04] matthewd: In development, constants are autoloaded when their reference is encountered at runtime
[15:00:26] matthewd: In production, all files in app/* are loaded at startup
[15:00:29] Scient: wait what, are u claiming that when a controller is autoloaded, it evaluates the actions and loads constants referenced there?
[15:01:02] Scient: that is absolutely not the case
[15:01:08] Scient: the code is not evaluated, as matthewd said
[15:01:15] Scient: it just loads files and constants in them
[15:02:04] Scient: show me the stacktrace you are talking about Nimzowitsch
[15:02:07] Nimzowitsch: matthewd: in the prod scenario though, why am I seeing the ControllerA in the stacktrace? If that were the case, then the error would only show up in the ModelA
[15:02:22] Nimzowitsch: Scient: I am afraid I can't :/ take my word for it, I may lose my job if I did
[15:02:45] irishfromua: has joined #RubyOnRails
[15:04:05] matthewd: Nimzowitsch: You're misreading the backtrace.
[15:04:25] Scient: thats fine
[15:04:42] Scient: i can guarantee that your assumption is wrong though,
[15:04:58] Scient: seeing the stacktrace would help me explain to you whats happening, but i understand not being able to share it
[15:05:22] Nimzowitsch: no, I wanna understand this, let me go on a name changing spree and I'll post a gist
[15:05:43] workmad3: has joined #RubyOnRails
[15:05:57] matthewd: I'm mostly confused about "it loads ControllerA then there's 0 application code in the stacktrace and then it shows up in ModelA"
[15:06:20] matthewd: If there's 0 application code in there, I'm not sure what you can't share
[15:08:05] Nimzowitsch: so far I've traced the following call path: config.ru -> config/environment.rb (read about config.autoload_path and now I understand how ControllerA gets loaded) -> rails railties, initializable.. -> controllerA -> rails related code -> modelA
[15:10:25] matthewd: Nimzowitsch: I recommend seeking more info from your internal Rails support team / consultants, who can see what you're talking about.
[15:12:25] cagomez: has joined #RubyOnRails
[15:14:41] Scient: and when is this thing happening, during rails startup?
[15:15:23] Nimzowitsch: which gist service do you guys prefer?
[15:15:31] Nimzowitsch: matthewd Scient ^
[15:15:39] chouhoulis: has joined #RubyOnRails
[15:15:57] Scient: gist is fine
[15:16:15] chouhoulis: has joined #RubyOnRails
[15:17:15] Nimzowitsch: Scient matthewd: https://gist.github.com/anonymous/5102b83ec602ada07b2bad7da8debf99
[15:17:38] Scient: and this happens when? on app startup?
[15:17:44] Technodrome: has joined #RubyOnRails
[15:18:00] Scient: are the model and the controller in a namespace?
[15:18:04] Scient: or on the root level
[15:18:40] Leepoff: has joined #RubyOnRails
[15:19:30] Nimzowitsch: Scient, they are not explicitly in a namespace
[15:19:42] Nimzowitsch: I am just following rails' naming conventions
[15:19:53] Nimzowitsch: for naming the files and class names
[15:19:56] matthewd: Is line 1 of a_controller.rb something other than `class AController < ApplicationController`?
[15:20:22] Scient: being in the same namespace also would explain why the whole namespace gets loaded on the first reference
[15:20:35] Nimzowitsch: matthewd: nope
[15:21:13] Scient: wait, rails 3.2? :D
[15:21:39] Nimzowitsch: Scient: you better believe it :)
[15:22:03] Scient: i almost feel i should retract my comments because 3.x was a fucking wild-wild west :P
[15:23:14] lzap: has joined #RubyOnRails
[15:23:17] Nimzowitsch: ControllerA references two helpers which themselves do not reference ModelA
[15:23:25] matthewd: https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_controller/metal/params_wrapper.rb#L147
[15:23:45] matthewd: At the moment it's defined, FooController causes Foo to get loaded (if it exists)
[15:24:21] lzap: guys in our 4.x app we introduced ActiveRecord abstract model and now during dev reload things are going crazy, some models table_name is wrong: User.table_name => "application_records"
[15:24:54] matthewd: lzap: !gist your abstract model?
[15:24:54] helpa: lzap: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[15:25:21] lzap: matthewd: this is the code change I introduced https://github.com/theforeman/foreman/commit/4deab2f313841e4283469ce9faafc0cdf1775720
[15:25:52] lzap: matthewd: now the weird thing - the app boots fine, operates normally until development class reload happens, then other models go crazy (some of them)
[15:26:38] lzap: we are three digging in the codebase trying to find the root cause
[15:26:46] Nimzowitsch: matthewd Scient thanks for your time and help. From now on I'll make sure to consult the 3.2 docs/code
[15:27:35] matthewd: Nimzowitsch: No worries. Probably best to also open conversations with a mention of your versions when you're that far behind.
[15:28:53] matthewd: lzap: Inheriting from ApplicationRecord in your migrations is rather counter to the point of defining migration-local models in the first place
[15:28:55] lzap: was wondering if you guys haven't run into similar issue with R5
[15:29:00] matthewd: (though that's not related to your current issue)
[15:29:54] lzap: oh good obserevation yes
[15:30:11] matthewd: Nothing I've heard of. There isn't anything else that could be defining an ApplicationRecord class elsewhere?
[15:30:57] lzap: matthewd: ho! we have one
[15:31:01] matthewd: I don't see how it could "forget" the self.abstract_class bit, such that it goes looking for the wrong table :/
[15:31:05] lzap: friendly_id
[15:31:09] lzap: and also factory_girl
[15:32:01] lzap: well I just grepped our deps and those two appeared but loos like not big deal
[15:33:07] lzap: hmm we have gettext_i18n_rails that does some magic
[15:33:56] matthewd: If you're not certain, maybe try renaming ApplicationRecord to something else, just as a test?
[15:34:55] lzap: good call
[15:37:50] brent__: has joined #RubyOnRails
[15:38:05] brent__: has joined #RubyOnRails
[15:38:41] lzap: ok renaming did not help
[15:39:32] matthewd: It just started looking for the new class as the table name?
[15:40:10] byteflame: has joined #RubyOnRails
[15:46:21] lzap: matthewd: to your migration point - we do need it otherwise it is a class mismatch
[15:46:51] lzap: or do I miss the point?
[15:47:07] [Butch]: has joined #RubyOnRails
[15:47:35] VeryBewitching: has joined #RubyOnRails
[15:48:31] Technodrome: has joined #RubyOnRails
[15:49:10] lzap: like creating fake classes under different names?
[15:49:10] matthewd: lzap: That doesn't sound right.. the point of the nested classes is that they are separate from the 'real' models
[15:53:10] polishdub: has joined #RubyOnRails
[15:54:19] luckyruby: has joined #RubyOnRails
[15:55:45] rakm: has joined #RubyOnRails
[15:55:48] lzap: matthewd: a colleague of mine hit it https://github.com/theforeman/foreman/pull/4454#pullrequestreview-32417832
[15:59:27] lzap: root cause - we are using our "global settings" model quite early in the boot process
[16:09:20] war_pigs: has joined #RubyOnRails
[16:16:47] romeoh_: has joined #RubyOnRails
[16:16:55] arBmind: has joined #RubyOnRails
[16:18:41] gusrub: has joined #RubyOnRails
[16:20:27] Rodya_: has joined #RubyOnRails
[16:21:03] aajjbb: has joined #RubyOnRails
[16:26:03] workmad3: has joined #RubyOnRails
[16:26:28] dionysus69: has joined #RubyOnRails
[16:31:41] Technodrome: ruby on rails jobs are getting literally 50 applicants per job, its nuts, the market is now so saturated
[16:33:07] cagomez: has joined #RubyOnRails
[16:33:50] jaequery: has joined #RubyOnRails
[16:34:37] havenwood: Technodrome: Hmm, not seeing anything like that here in LA.
[16:34:57] havenwood: Technodrome: Where is that the case?
[16:36:26] Technodrome: the jobs i applied for got 30-50 applicants
[16:36:33] Technodrome: its like how can you even compete
[16:38:13] workmad3: has joined #RubyOnRails
[16:38:55] havenwood: Technodrome: Move to LA! :-)
[16:39:14] epochwolf: Technodrome: you compete by being good?
[16:39:15] havenwood: Technodrome: That's interesting.
[16:39:47] Technodrome: the hiring people get tired after 40 resumes, i dont care how good you are
[16:40:02] Technodrome: all these "bootcamp" learn to be a programmer shit creates probably 20 of those resumes
[16:40:05] Technodrome: everyone trying to cash in
[16:40:06] epochwolf: wait, 40 resumes is a lot?
[16:45:02] greengriminal: has joined #RubyOnRails
[16:45:38] cagomez: has joined #RubyOnRails
[16:47:08] yaw: has joined #RubyOnRails
[16:49:51] luckyrub_: has joined #RubyOnRails
[16:51:35] Doddlin: has joined #RubyOnRails
[16:51:46] Doddlin: Hi all! Is this not a valid regexp?
[16:51:52] Doddlin: f((key.match(/comp[0-9]/)) && (value != nil) or (value !=0))
[16:52:15] bronson: has joined #RubyOnRails
[16:54:24] Technodrome: has joined #RubyOnRails
[16:59:22] yaw: Doddlin: only the /comp[0-9]/ part is the regex
[17:00:04] Doddlin: yaw, yeah true, but if key = ”id” then it should return false, right?
[17:00:11] yaw: and it's valid regex. it matches comp0, comp1, comp2, ..., comp9
[17:01:03] yaw: Doddlin: yes
[17:01:35] Doddlin: aaah, it gives me ”No Products with Id = 74”
[17:05:50] Doddlin: Imagine what a tiny little && can do for the world - it works :D
[17:10:38] Technodrome: has joined #RubyOnRails
[17:12:16] hfp_work: has joined #RubyOnRails
[17:16:53] rakm: has joined #RubyOnRails
[17:19:00] jonno112: has joined #RubyOnRails
[17:21:59] cagomez: has joined #RubyOnRails
[17:24:49] greengriminal: has joined #RubyOnRails
[17:28:55] pLaToOn: has joined #RubyOnRails
[17:34:01] Doddlin: I’m trying to use signaturepad to accept signatures on forms, any idea on how to store it? Worth storing the JSON in db or should I use PNG’s? Which is the simplest?
[17:34:19] cagomez: has joined #RubyOnRails
[17:34:29] knight33: has joined #RubyOnRails
[17:36:46] gusrub: has joined #RubyOnRails
[17:38:26] gusrub: has joined #RubyOnRails
[17:38:46] byteflame: has joined #RubyOnRails
[17:49:47] yaw: has joined #RubyOnRails
[17:57:29] kristofferR: has joined #RubyOnRails
[18:01:00] kristofferR: has joined #RubyOnRails
[18:08:00] mikecmpbll: has joined #RubyOnRails
[18:08:27] s2013: has joined #RubyOnRails
[18:10:41] cagomez: has joined #RubyOnRails
[18:21:36] war_pigs: has joined #RubyOnRails
[18:23:03] cagomez: has joined #RubyOnRails
[18:25:09] pwnd_nsfw: has joined #RubyOnRails
[18:27:31] futilegames: has joined #RubyOnRails
[18:45:20] xpl0iter: has joined #RubyOnRails
[18:47:34] patarr: has joined #RubyOnRails
[18:48:03] war_pigs: has joined #RubyOnRails
[18:48:10] User458764: has joined #RubyOnRails
[18:50:11] roshanavand: has joined #RubyOnRails
[18:52:39] knight33: has joined #RubyOnRails
[18:52:42] war_pigs: has joined #RubyOnRails
[18:53:48] byteflame: has joined #RubyOnRails
[18:59:03] DrYockel: has joined #RubyOnRails
[18:59:20] cagomez: has joined #RubyOnRails
[19:01:11] Technodrome: has joined #RubyOnRails
[19:06:38] bronson: has joined #RubyOnRails
[19:07:43] patarr: has joined #RubyOnRails
[19:08:35] nir0: has joined #RubyOnRails
[19:11:11] nir0: hello guys, i'm trying to run "cap production deploy" and for some strange reason script goes out of working directory to hp/repo, runs git remote update and fails. this hp/repo is pretty dead thing. how do i find capistrano config? i searched throu files with "grep -rn repo ." still no luck
[19:11:42] cagomez: has joined #RubyOnRails
[19:15:19] romeoh: has joined #RubyOnRails
[19:18:13] rikkipitt: has joined #RubyOnRails
[19:19:07] DrYockel: has joined #RubyOnRails
[19:19:21] rikkipitt: hey folks, i've got a query about finding records from a model by using the relationships of two belongs_to models... can anyone shed some light on how to do so please? https://gist.github.com/rikkipitt/e50e21ab7cb0834aa93e3cba8e404ded
[19:20:07] rikkipitt: Essentially, I'll have the profile and the event IDs, but how do I get the visits filtered by both these things in the most efficient way?
[19:23:24] srinidhi: has joined #RubyOnRails
[19:27:46] patarr: has joined #RubyOnRails
[19:29:23] tbuehlmann: rikkipitt: given a profile and event ids you want all visits associated to the events with that event ids and the visits belonging to the tickets?
[19:29:23] rikkipitt: Nevermind, broke it up into bits and found the data
[19:30:02] rikkipitt: tbuehlmann: belonging to that profile, but I did it via the ticket
[19:30:08] rikkipitt: cheers any way
[19:30:13] tbuehlmann: but I.. used ms paint to scribble the associations, I was ready to help..
[19:30:25] rikkipitt: haha, really?
[19:30:31] rikkipitt: you're kidding me
[19:30:44] tbuehlmann: I'm not, it's adorable
[19:31:07] tbuehlmann: whatever, glad it works :)
[19:31:47] rikkipitt: i did it stepwise, did you manage to find a way to do a super fancy join or something?
[19:33:23] patarr1: has joined #RubyOnRails
[19:34:19] tbuehlmann: I think I haven't understood the problem yet
[19:35:53] tbuehlmann: is it just about the event's visits or also about the ticket's visits?
[19:36:06] tbuehlmann: because a profile can theoretically have visits through tickets
[19:38:02] rikkipitt: a double through?
[19:38:55] mcr-credil: has joined #RubyOnRails
[19:39:00] tbuehlmann: as a ticket has many visits and an event has many visits, yeah. but I don't know your usecase, so it's really up to you
[19:40:48] rikkipitt: i'll give it a whirl, i just need to ping in an event id somewhere in the lookup
[19:42:42] hahuang65: has joined #RubyOnRails
[19:45:42] bronson: has joined #RubyOnRails
[19:47:01] pupsicle: has joined #RubyOnRails
[19:49:32] yebyen: has joined #RubyOnRails
[19:49:53] yebyen: i have a question about a nonstandard model association...
[19:50:08] yebyen: "how do I get out of the mess I'm in"
[19:50:51] yebyen: i have these actions that are coded by two-letter codes
[19:50:54] GodFather: has joined #RubyOnRails
[19:51:29] yebyen: and the two letter codes have a model with a table where they get descriptions applied
[19:52:00] yebyen: the code field on the action, and the table that stores the codes with their descriptions, have the same name "reason_code"
[19:52:35] yebyen: so i had the bright idea of adding "has_one :reason_code_obj, foreign_key: 'code', primary_key: 'reason_code', class_name: 'ReasonCode'"
[19:53:12] yebyen: now my problem is, when I change the code on one of my Action models, it actually changes the value of "code" field on the ReasonCode table
[19:54:03] yebyen: i did this so I could display a table of actions with these codes in them, and look up their descriptions with a single query using eager_load
[19:54:34] yebyen: i can just take the has_one association off, but i'm hoping there's a better way so I don't lose that property
[19:55:05] yebyen: because the debug logs are a lot neater when you don't hit a page and see it spit out 25 queries instantly before it's rendered
[19:55:27] djbkd: has joined #RubyOnRails
[20:05:52] akshat: has joined #RubyOnRails
[20:16:41] yebyen: yep i found my problem
[20:16:45] yebyen: i did not understand the meaning of has_one
[20:16:49] yebyen: i should have used belongs_to
[20:18:26] yebyen: i don't understand why this didn't surface as an issue until i started eager_loading
[20:18:39] yebyen: but glad i caught it thanks to testing
[20:22:15] rgr: has joined #RubyOnRails
[20:23:44] yebyen: still not really sure i'm doing it right
[20:28:16] yebyen: aha : Is it a belongs_to or has_one association? https://apidock.com/rails/ActiveRecord/Associations/ClassMethods
[20:28:33] yebyen: and especially the part about :autosave
[20:28:45] yebyen: i think that's what got me
[20:32:24] kristofferR: has joined #RubyOnRails
[20:35:12] rikkipitt: has joined #RubyOnRails
[20:37:47] lxsameer: has joined #RubyOnRails
[20:37:48] User458764: has joined #RubyOnRails
[20:43:29] guacamole: has joined #RubyOnRails
[20:46:23] workmad3: has joined #RubyOnRails
[20:46:25] justAllgood: has joined #RubyOnRails
[20:47:32] justAllgood: hi folks, sorry for my novice question here but, I'm looking to look for the best practice for how to add a headers, to a routing scope (sorry bout terminology if that's incorrect)
[20:48:20] justAllgood: e.g: we have the following routing fille with a api prefix or scope
[20:48:47] justAllgood: I'd like to add the Access-Control-Allow-Origin on routes within this scope
[20:55:13] patarr: has joined #RubyOnRails
[20:56:16] rgr_: has joined #RubyOnRails
[20:58:29] jdm: has joined #RubyOnRails
[21:00:25] duderonomy: has joined #RubyOnRails
[21:03:39] cagomez: has joined #RubyOnRails
[21:03:46] xpl0iter: has joined #RubyOnRails
[21:05:26] Technodrome: has joined #RubyOnRails
[21:05:30] s2013: has joined #RubyOnRails
[21:10:15] snickers: has joined #RubyOnRails
[21:13:42] helpa: has joined #RubyOnRails
[21:18:09] Rodya_: has joined #RubyOnRails
[21:18:21] cagomez: has joined #RubyOnRails
[21:26:05] war_pigs: has joined #RubyOnRails
[21:32:07] guacamole: has joined #RubyOnRails
[21:37:10] rikkipitt: has joined #RubyOnRails
[21:38:20] mephistophocles: has joined #RubyOnRails
[21:40:18] pupsicle: has joined #RubyOnRails
[21:45:51] Technodrome: has joined #RubyOnRails
[21:58:00] bronson: has joined #RubyOnRails
[22:00:04] chrisgopher: has joined #RubyOnRails
[22:02:22] Leepoff: has joined #RubyOnRails
[22:07:55] Rodya_: has joined #RubyOnRails
[22:14:06] war_pigs: has joined #RubyOnRails
[22:14:21] roshanavand: has joined #RubyOnRails
[22:28:19] rakm: has joined #RubyOnRails
[22:30:03] patarr: has joined #RubyOnRails
[22:33:07] war_pigs: has joined #RubyOnRails
[22:34:29] Radar: GOOD MORNING
[22:34:40] Radar: oh right now that I'm inside I should take off my hat
[22:35:44] baweaver: you look better with a hat
[22:36:42] baweaver: I wonder if these fancy menu things work
[22:37:10] Technodrome: has joined #RubyOnRails
[22:45:04] rgr_: has joined #RubyOnRails
[22:46:42] jhack: has joined #RubyOnRails
[22:54:36] jdm: has joined #RubyOnRails
[23:07:18] dionysus69: has joined #RubyOnRails
[23:08:19] rakm: has joined #RubyOnRails
[23:09:01] patarr: has joined #RubyOnRails
[23:13:18] wethu: has joined #RubyOnRails
[23:14:44] war_pigs: has joined #RubyOnRails
[23:15:24] ztkz: has joined #RubyOnRails
[23:23:03] patarr: has joined #RubyOnRails
[23:34:39] jonno112: has joined #RubyOnRails
[23:49:26] wethu: has joined #RubyOnRails
[23:57:24] hahuang65: has joined #RubyOnRails