« Back to channel list

#RubyOnRails - 29 January 2016

« Back 1 day Forward 1 day »
[00:00:10] bruce_lee: I don't want to overwrite something from rails4...
[00:00:36] matt_d: bruce_lee: then use rvm, rbenv, chruby, docker
[00:01:21] bruce_lee: matt_d: I need to duckDuckGo that, thank you
[00:01:26] matt_d: bruce_lee: actually, i'm an idiot.. haha.. after intalling them gem you can rails _2.3.18_ rails
[00:01:37] matt_d: bruce_lee: i was thinking ruby for some reason
[00:01:37] Craigimus: has joined #RubyOnRails
[00:01:55] bruce_lee: sounds easier
[00:02:03] bruce_lee: I'll give it a try
[00:02:17] spyd3r: has joined #RubyOnRails
[00:02:31] matt_d: bruce_lee: errr. sorry, i'm really preoccupied: rails _2.3.18_ new <project_name>
[00:02:35] matt_d: bruce_lee: should work.
[00:02:39] musicnode: has joined #RubyOnRails
[00:03:38] dexter_: has joined #RubyOnRails
[00:04:28] matt_d: bruce_lee: at least it does with newer versions. let me know.
[00:04:42] gbgdev: has joined #RubyOnRails
[00:05:57] bklane: has joined #RubyOnRails
[00:06:48] bruce_lee: matt_d: it doesn't work for me, a "rails _2.3.18_ new oldschool_site" returns an error: uninitialized constant AppGenerator::Config
[00:08:28] bruce_lee: I destroyed my rails, a "rails new a_test" doesn't work anymore...
[00:08:38] spyd3r: has joined #RubyOnRails
[00:09:11] matt_d: bruce_lee: I just tried, it looks like when you answer "N," it stops installing them gem versions.
[00:12:25] Ropeney: has joined #RubyOnRails
[00:13:12] K_r3aPeR: has joined #RubyOnRails
[00:14:31] sakix: has joined #RubyOnRails
[00:17:30] Craigimus: has joined #RubyOnRails
[00:19:32] atomical: has joined #RubyOnRails
[00:21:51] jgt: has joined #RubyOnRails
[00:22:30] kies^: has joined #RubyOnRails
[00:23:31] lemur: has joined #RubyOnRails
[00:26:45] mikeiniowa: has joined #RubyOnRails
[00:28:04] xardion: has joined #RubyOnRails
[00:28:31] DLSteve: has joined #RubyOnRails
[00:30:16] mikeiniowa: has joined #RubyOnRails
[00:32:52] yoongkang: has joined #RubyOnRails
[00:33:09] herbst: has joined #RubyOnRails
[00:37:24] pawnbox: has joined #RubyOnRails
[00:41:54] codedmart: has joined #RubyOnRails
[00:42:29] mrbubbles: has joined #RubyOnRails
[00:43:38] musicnode: has joined #RubyOnRails
[00:45:48] atomical_: has joined #RubyOnRails
[00:46:15] bklane: has joined #RubyOnRails
[00:47:25] rickmasta: has joined #RubyOnRails
[00:50:13] bklane_: has joined #RubyOnRails
[00:51:51] jgpawletko: has joined #RubyOnRails
[00:52:30] mices: has joined #RubyOnRails
[00:56:12] ebbflowgo: has joined #RubyOnRails
[00:56:49] Coldblackice: has joined #RubyOnRails
[00:57:05] sevenseacat: has joined #RubyOnRails
[01:02:03] sakix: has joined #RubyOnRails
[01:09:02] Hans267: has joined #RubyOnRails
[01:09:10] pulgalipe: has joined #RubyOnRails
[01:13:30] mices: has joined #RubyOnRails
[01:14:01] Limix: has joined #RubyOnRails
[01:16:09] musicnode: has joined #RubyOnRails
[01:18:11] phantummm: has joined #RubyOnRails
[01:24:46] spyd3r: has joined #RubyOnRails
[01:26:26] baweaver: has joined #RubyOnRails
[01:27:04] pawnbox: has joined #RubyOnRails
[01:28:56] mices: has joined #RubyOnRails
[01:29:05] ElFerna_: has joined #RubyOnRails
[01:29:13] bklane: has joined #RubyOnRails
[01:30:15] nickjj_: has joined #RubyOnRails
[01:30:58] dtordable: has joined #RubyOnRails
[01:33:46] herbst: has joined #RubyOnRails
[01:36:32] blackmes1: has joined #RubyOnRails
[01:38:03] griffindy: has joined #RubyOnRails
[01:38:29] htmldrum: has joined #RubyOnRails
[01:41:30] sankaber: has joined #RubyOnRails
[01:42:38] rhizome: i can't even with the rails guide for database.yml
[01:42:55] superlou: has joined #RubyOnRails
[01:43:48] sankaber: has joined #RubyOnRails
[01:50:13] spyd3r: has joined #RubyOnRails
[01:54:17] titeiko: has joined #RubyOnRails
[01:55:10] bklane_: has joined #RubyOnRails
[01:56:46] pawnbox: has joined #RubyOnRails
[02:01:27] tape88: has joined #RubyOnRails
[02:05:19] musicnode: has joined #RubyOnRails
[02:09:00] mices: has joined #RubyOnRails
[02:10:45] chipotle: has joined #RubyOnRails
[02:17:53] odd13: has joined #RubyOnRails
[02:20:51] ElFerna_: has joined #RubyOnRails
[02:24:09] Limix: has joined #RubyOnRails
[02:24:15] gambl0re: has joined #RubyOnRails
[02:24:15] gambl0re: has joined #RubyOnRails
[02:24:22] lemur: has joined #RubyOnRails
[02:25:55] Maletor: has joined #RubyOnRails
[02:26:35] shmilan: has joined #RubyOnRails
[02:26:38] yoongkang: has joined #RubyOnRails
[02:26:41] pawnbox: has joined #RubyOnRails
[02:29:51] creaked: has joined #RubyOnRails
[02:33:05] musicnode: has joined #RubyOnRails
[02:33:22] hnanon: has joined #RubyOnRails
[02:35:13] smathy: has joined #RubyOnRails
[02:39:37] bklane: has joined #RubyOnRails
[02:39:42] MarkAValdez: has joined #RubyOnRails
[02:40:31] creaked: has joined #RubyOnRails
[02:41:02] ur5us: has joined #RubyOnRails
[02:43:19] jtong: has joined #RubyOnRails
[02:44:23] paradisaeidae: has joined #RubyOnRails
[02:47:06] MarkAValdez: has joined #RubyOnRails
[02:51:46] dexter_: has joined #RubyOnRails
[02:52:52] okdas: has joined #RubyOnRails
[02:52:52] okdas: has joined #RubyOnRails
[02:54:08] Bloomer: has joined #RubyOnRails
[02:55:25] ur5us_: has joined #RubyOnRails
[02:57:45] htmldrum: has joined #RubyOnRails
[03:04:50] shmilan: has joined #RubyOnRails
[03:05:15] A124: has joined #RubyOnRails
[03:05:18] User458764: has joined #RubyOnRails
[03:05:18] dopamean_: has joined #RubyOnRails
[03:06:02] pawnbox: has joined #RubyOnRails
[03:09:31] duncannz: has joined #RubyOnRails
[03:11:24] ur5us: has joined #RubyOnRails
[03:11:40] dstarh: has joined #RubyOnRails
[03:12:26] tjbiddle: has joined #RubyOnRails
[03:12:35] altair118: has joined #RubyOnRails
[03:22:51] MarkAValdez: has joined #RubyOnRails
[03:25:36] iateadonut: has joined #RubyOnRails
[03:25:37] enkristoffer: has joined #RubyOnRails
[03:27:44] musicnode: has joined #RubyOnRails
[03:30:06] nerium: has joined #RubyOnRails
[03:31:24] musicnode: has joined #RubyOnRails
[03:32:56] spyd3r: has joined #RubyOnRails
[03:36:12] herbst: has joined #RubyOnRails
[03:37:03] shmilan: has joined #RubyOnRails
[03:40:00] musicnode: has joined #RubyOnRails
[03:42:11] gaustin: has joined #RubyOnRails
[03:43:19] baweaver: has joined #RubyOnRails
[03:45:48] emchamp: has joined #RubyOnRails
[03:45:49] pawnbox: has joined #RubyOnRails
[03:49:18] quazimodo: If a rails app is being served under http://sub1.domain.com, then it won't know about 'sub1' being a subdomain will it
[03:49:39] quazimodo: this rails app is *not* being served under http://domain.com
[03:49:44] quazimodo: that's another app
[03:50:56] El3ktra: has joined #RubyOnRails
[03:50:56] El3ktra: has joined #RubyOnRails
[03:51:10] LambdaSource: has joined #RubyOnRails
[03:56:23] mbreedlove: has joined #RubyOnRails
[03:57:30] Radar: I believe it would know. Check request.subdomains.
[04:00:38] juddey: Just calculate the field in javascript and pass it to a rails controller me thinks, what could possibly go wrong in the js? A: Everything.
[04:02:06] pulgalip1: has joined #RubyOnRails
[04:04:35] Radar: juddey: are you doing "5" + 5 in your JS?
[04:04:40] Radar: Try it out in the JS console for some lols
[04:06:02] pulgalipe: has joined #RubyOnRails
[04:07:06] juddey: Radar: lol yep thats about the result I need
[04:12:00] baweaver: has joined #RubyOnRails
[04:12:31] treaki: has joined #RubyOnRails
[04:12:45] Vert`: has joined #RubyOnRails
[04:14:11] duncannz: has joined #RubyOnRails
[04:14:18] Vert`: Hey guys, I have a set of five routes that I need to repeat X amount of times. They are all identical save for one word in the URI, and a corresponding word in the controller name. Is there any way I can do this programmatically instead of repeating the code for each manually?
[04:15:43] pawnbox: has joined #RubyOnRails
[04:16:33] Radar: Vert`: Show us the routes?
[04:17:40] braincrash: has joined #RubyOnRails
[04:17:42] Vert`: Radar, here's an excerpt http://pastebin.com/daKBu9gi
[04:18:56] Radar: Vert`: pastebin.com is blocked on my machine. Please follow the bot's instructons.
[04:20:01] Vert`: Radar, http://pastie.org/private/agsdlefkikt3laiosjw0xq
[04:20:18] Radar: why is your show action called read?
[04:20:51] Vert`: Just the term I chose to represent reading a single record.
[04:21:25] Radar: Why not follow Rails standards?
[04:21:41] Vert`: So far this repeats two pages vertically in my IDE and is about to get much lengthier, I'd love it if there were a DRY alternative
[04:22:12] Radar: There is.
[04:22:20] Vert`: Radar, I scrapped most the scaffold and didn't really think about using that term
[04:23:25] Radar: Vert`: here's almost the same routes, but in 5 lines: https://gist.github.com/radar/a0a44681161a278afb9e
[04:23:33] Radar: Vert`: You should really follow the rails convention of naming your "read" action as "show"
[04:23:46] Radar: Oops, I missed the module on the controllers
[04:24:13] arup_r: has joined #RubyOnRails
[04:24:25] Vert`: Yeah I was thinking.. This loads the separate controllers?
[04:24:47] Radar: https://gist.github.com/radar/a0a44681161a278afb9e Added the module
[04:25:29] Vert`: Mechanically it's just separate controllers for each entity so I can define them manually and set individual accessors, abstrating a base controller that provides all the REST functionality and defines the actual methods.
[04:25:42] Vert`: *abstracting
[04:26:02] Radar: Yeah you can still do that in this case. Just define all those controllers to inherit from the same base.
[04:26:54] Vert`: Is that how "resource" in routes works? It defines these default actions?
[04:27:21] Vert`: I was looking into ActiveResource at first, I don't know in how far that's related, but hit a snag earlier on - I can't recall what it was though.
[04:27:28] duncannz: has joined #RubyOnRails
[04:27:29] Radar: Vert`: yes, look at the output of "rake routes"
[04:27:48] Radar: ActiveResource was an attempt to build a gem that could speak to a certain kind of REST endpoint... but it didn't work very well.
[04:28:05] Radar: the "resources" method in config/routes.rb is very different to that.
[04:28:13] Radar: !routes has more info
[04:28:13] helpa: http://guides.rubyonrails.org/routing.html
[04:28:30] juddey: Radar: as a ps. to the js. conversation, two lines in ruby and all my problems magically disappear :D
[04:28:32] matthewd: I think you should be able to put the except: on the namespace too.. maybe?
[04:28:57] Vert`: Alright so to recap, the actions you're excluding there would be the views for create/update forms, and to make this connect properly I need to rename update to show, yes?
[04:29:04] Radar: matthewd: oh yes you're right.
[04:29:04] Vert`: I mean read to show
[04:29:29] Radar: Vert`: it'd be the new and edit actions that are excluded there, which are the views that usually present stuff for the create/update actions
[04:29:35] Radar: and yes, rename read to show to follow rails conventions
[04:29:52] Vert`: Alright, thanks Radar, you've been very helpful
[04:30:03] matthewd: .. at which point it's probably compact enough for `resources :contacts, :clients, :cities` to be a viable option, depending on how you want to trade-off clarity vs brevity
[04:31:05] Vert`: matthewd, at the moment there's probably going to be about 20 entities there. I really like the idea of minimizing code and maintenance, but I think it'd get cluttered at this point yes.
[04:31:44] Vert`: Also, is there a way to include two actions? I'm going to break convention and add in bulk create and update actions.
[04:32:03] lexileo: has joined #RubyOnRails
[04:32:17] matthewd: Vert`: See the guide.
[04:32:42] Radar: Vert`: particularly the collection method.
[04:33:36] quazimodo: Radar: it's odd, i have 1 app serving sub1.domain.com and sub2.domain.com but not domain.com
[04:33:47] matthewd: Vert`: Also, while "follow conventions" is infinitely the right answer to address your current situation, do note that the file you're looking at is ruby code. The easy answer to solve your original issue would've been to Just Use A Loop.
[04:33:50] Vert`: Oh cool, thanks Radar, that took me right to what I needed
[04:34:09] quazimodo: and then i have to make rules that also do localhost for sub1 and localhost/sub2 for sub2 for dev
[04:34:30] Vert`: matthewd, I was wondering if that were possible.
[04:35:33] codedmart: has joined #RubyOnRails
[04:37:02] Radar: quazimodo: what are you talking about
[04:37:05] Radar: quazimodo: sub1.lvh.me
[04:37:08] herbst: has joined #RubyOnRails
[04:37:09] Radar: quazimodo: sub2.lvh.me
[04:37:19] Radar: quazimodo: Are you telling me you haven't yet read multitenancy with Rails and learned about lvh.me?!
[04:40:18] sankaber: has joined #RubyOnRails
[04:41:05] quazimodo: Radar: coworkers ...
[04:41:49] quazimodo: i know i know...
[04:43:21] quazimodo: I set it up under dev.local in my hosts file
[04:43:46] quazimodo: but i guess I should just bite the bullet and tell them they need to use lvh.me
[04:44:19] sakix: has joined #RubyOnRails
[04:45:06] Radar: yeah you should. It's less setup.
[04:45:55] pawnbox: has joined #RubyOnRails
[04:46:26] sankaber: has joined #RubyOnRails
[04:58:59] johnflux: has joined #RubyOnRails
[04:58:59] johnflux: has joined #RubyOnRails
[05:02:10] tego101: has joined #RubyOnRails
[05:07:55] bruce_lee: I would loke to deploy my first rails-site with apache, is there a recommended way to do that?
[05:08:00] bruce_lee: I would like....
[05:10:40] jahbrewski: has joined #RubyOnRails
[05:15:54] enkristoffer: has joined #RubyOnRails
[05:19:15] barhum2013: has joined #RubyOnRails
[05:25:00] bklane: has joined #RubyOnRails
[05:28:20] lyoshajapan: has joined #RubyOnRails
[05:29:04] duncannz: has joined #RubyOnRails
[05:30:24] gaustin: has joined #RubyOnRails
[05:32:44] srinidhi: has joined #RubyOnRails
[05:36:07] rvanlieshout: has joined #RubyOnRails
[05:41:28] barhum2013: I am thinking of doing a rewrite of a php app on rails. Anyone has had any experience with the rewrite?
[05:41:58] rvanlieshout: i've got experience with a lot of rewrites
[05:42:04] shmoon: hi, just had a nginx/unicorn setup question. So I did an nginx reverse proxy setup that would send requests to the unicorn app server. Now this is done with the upstream module where a single socket file is specified using "server unix:/home/ubuntu/www/uber-hack/shared/sockets/unicorn.sock" - so is a single unicorn socket file enough to serve 1000s of requests ? how does it work exactly ?
[05:42:08] rvanlieshout: is this going to be your first rails app, barhum2013?
[05:42:42] Denarii: has joined #RubyOnRails
[05:42:45] barhum2013: rvanlieshout: I have built about 5 rails projects
[05:42:51] duncannz: has joined #RubyOnRails
[05:43:12] rvanlieshout: barhum2013: treat this as a complete new one too
[05:43:22] rvanlieshout: only use the knowledge you have from building and using the former app
[05:44:14] gambl0re: if im using reactjs with ruby on rails, can i use npm together with ruby gems?
[05:44:33] rvanlieshout: gambl0re: npm has no relationship with ruby
[05:44:44] barhum2013: rvanlieshout: I have read that it could be a nightmare, but I wonder. I don???t necessarly need to integrate the old records into the new db, I am guessing this would make it a lot easier. What do you think?
[05:45:06] rvanlieshout: barhum2013: indeed. don't try to be backwards compatiable. migrate stuff when you need it
[05:45:14] rvanlieshout: shmoon: http://stackoverflow.com/questions/9644251/how-do-unix-domain-sockets-differentiate-between-multiple-clients
[05:45:44] gambl0re: how would i make devise work inside a react component?
[05:45:54] gambl0re: is it possible?
[05:46:23] rvanlieshout: can't say anything sane about that. never used react :)
[05:46:31] gambl0re: question for those whos familiar with react,,
[05:47:08] barhum2013: rvanlieshout: thanks for the shot of courage, hope for the best!
[05:48:50] rvanlieshout: take time to think about the data structure
[05:49:20] barhum2013: yeah I am going to draw it out!
[05:49:32] barhum2013: gambl0re: is this react native or plain react?
[05:52:06] gambl0re: plain react
[05:52:19] jahbrewski: has joined #RubyOnRails
[05:53:07] barhum2013: are you just rendering the component on the views?
[05:53:12] barhum2013: or using an api?
[05:53:27] fromalphtozen: has joined #RubyOnRails
[05:53:31] krz: has joined #RubyOnRails
[05:54:07] pramsky: has joined #RubyOnRails
[05:54:07] jscheel: has joined #RubyOnRails
[05:56:54] gambl0re: rendering component on views
[05:57:55] gambl0re: i basically want to able to use react to connect to rails backend and to be able to use ruby gems such as devise with react components. i dont know if its possible and how difficult it would be..
[05:58:00] greengriminal: has joined #RubyOnRails
[05:59:16] barhum2013: Couldn???t you use devise outside the component?
[05:59:30] pawnbox: has joined #RubyOnRails
[06:01:22] gambl0re: not sure to be honest how it would all tie together...
[06:02:27] barhum2013: I wonder if you can pass the logged in user into the component
[06:05:27] nodejunkie: has joined #RubyOnRails
[06:05:29] gambl0re: do you use react?
[06:05:50] barhum2013: I played with it a couple of hours or so.
[06:07:10] fromalphtozen: has joined #RubyOnRails
[06:07:15] _djbkd: has joined #RubyOnRails
[06:09:54] lemur: has joined #RubyOnRails
[06:10:52] baweaver_: has joined #RubyOnRails
[06:14:51] musicnode: has joined #RubyOnRails
[06:14:56] yoongkang: has joined #RubyOnRails
[06:20:19] lyoshajapan: has joined #RubyOnRails
[06:20:34] dionysus69: has joined #RubyOnRails
[06:21:09] johann_sb: has joined #RubyOnRails
[06:25:55] czerasz: has joined #RubyOnRails
[06:28:31] _3by8: has joined #RubyOnRails
[06:30:54] tjbiddle: has joined #RubyOnRails
[06:30:55] lyoshajapan: has joined #RubyOnRails
[06:33:04] duncannz: has joined #RubyOnRails
[06:33:16] jscheel: has joined #RubyOnRails
[06:33:44] adavia: is it necessary now to use params.fetch(:user, {}).permit(:name, :photo) when passing strong parameters?
[06:33:51] adavia: with carrierwave
[06:34:00] jahbrewski: has joined #RubyOnRails
[06:34:16] aganov: has joined #RubyOnRails
[06:35:59] _3by8: In the destroy method of one of my controllers, I'm trying to reassign the IDs of some records that belong to the record being deleted. E.g. a department has many orders and I'm trying to reassign the orders another ID before the deletion occurs. Is there an easy way to do that or do I have to iterate over all of the orders and change each one?
[06:37:25] _3by8: All I'm wondering is if there's like some sort of cool built-in function that Rails has that I'm unaware of.
[06:37:35] _3by8: Like a mass assignment function.
[06:38:17] matthewd: _3by8: So you want to change all the members of a Relation at once?
[06:38:24] lyoshajapan: has joined #RubyOnRails
[06:38:43] herbst: has joined #RubyOnRails
[06:39:26] _3by8: matthewd: that sounds about right. Change a single foreign key of a number of records sharing the same foreign key.
[06:40:33] neshmi: has joined #RubyOnRails
[06:40:57] _3by8: matthewd: update_all?
[06:42:15] matthewd: _3by8: Yeah, either update or update_all, depending on whether it's safe to skip callbacks
[06:42:40] KucukMubasir: has joined #RubyOnRails
[06:42:55] sleungcy: has joined #RubyOnRails
[06:42:56] _3by8: matthewd: does update_all skip model callbacks?
[06:43:16] _3by8: matthewd: thanks
[06:43:17] piotrj: has joined #RubyOnRails
[06:43:37] matthewd: No worries!
[06:44:55] duncannz: has joined #RubyOnRails
[06:45:45] duncannz: has joined #RubyOnRails
[06:46:56] _3by8: matthewd: does it make more sense to do the assignment in the destroy controller or in the model's destroy callback?
[06:47:02] sandstrom: has joined #RubyOnRails
[06:48:06] matthewd: I guess that might vary on the nature of the assignment
[06:48:45] matthewd: i.e., is it intrinsically true that if this record doesn't exist, then they belong to that-particular-other-record, or is it a more explicit "re-assignment"
[06:48:53] maqr: has joined #RubyOnRails
[06:50:28] yogeshrt: has joined #RubyOnRails
[06:51:40] qwrobins: has joined #RubyOnRails
[06:51:42] matthewd: I think I would generally tend towards the latter: put it in the controller, and leave the relationship as restrict
[06:52:02] rvanlieshout: it depends on why you're doing that
[06:52:32] rvanlieshout: reading this i think it should be in the model
[06:52:39] rvanlieshout: cause it's part of the normal destroy procedure
[06:52:46] rvanlieshout: not something related to particular this one
[06:53:03] _3by8: rvanlieshout: I'm trying not to break my order pages. If you delete a department and try to pull up an order, all of that department information is gone forever so I'm just covering my bases. Maybe I'm going about it the wrong way though. Would you do it differently?
[06:53:05] rvanlieshout: see it as 2 separate people. 1 is your controller, 1 your model. your controller should take care of the task itself
[06:53:20] rvanlieshout: does it perform that id rearrange or does he/she thinks it's the job of person 2
[06:53:42] rvanlieshout: _3by8: you should also store department info in your order
[06:54:01] matthewd: _3by8: How do you determine which department the orders now belong to?
[06:54:04] rvanlieshout: when looking at orders / invoices, you don't want to use actual data. it uses a snapshot
[06:54:11] _3by8: matthewd: currently it's just a foreign key.
[06:54:32] matthewd: _3by8: I mean how do you choose for the reassignment, during the delete
[06:54:50] _3by8: matthewd: every organization has a hidden, default department
[06:56:18] matthewd: Okay, so you're basically using a special value to mean "no department"
[06:56:30] matthewd: That seems reasonable to me to put in the model
[06:57:05] matthewd: Though note rvanlieshout's point about invoice-like things wanting to snapshot everything they care about
[06:58:10] _3by8: matthewd: like order item prices and such in case a sale changes the price?
[06:58:14] matthewd: Here, I suspect it depends whether the department appears on a printed / customer-visible order display of some sort, or is only used for internal accounting/tracking purposes
[06:59:07] matthewd: Yes, but also description etc. You generally want an unchanging copy of everything you showed the customer at the time of their transaction.
[07:00:01] duncannz: has joined #RubyOnRails
[07:00:55] bklane_: has joined #RubyOnRails
[07:00:58] duncannz: has joined #RubyOnRails
[07:01:53] lyoshajapan: has joined #RubyOnRails
[07:01:54] _3by8: matthewd: good point. I'll make sure that's the case. Here's a random question: if I know a particular query will only return 1 record is it still a good idea to use limit? E.g. departments.where(hidden: true).limit(1) even if there's only one hidden department per organization?
[07:02:48] matthewd: If you're expecting exactly one, it seems unusual to still want a relation, rather than just taking the record itself
[07:05:37] bklane: has joined #RubyOnRails
[07:05:57] visudo: has joined #RubyOnRails
[07:06:31] altair118: has joined #RubyOnRails
[07:06:39] _3by8: matthewd: I'm not sure what you mean but honestly it's not that important, I can manage. I'm just not sure what you mean by wanting a relation. Are you talking about gathering records like current_user.department.where rather than doing something like Department.find?
[07:07:22] ereslibre: has joined #RubyOnRails
[07:08:40] _3by8: And thanks to the both of you for the help.
[07:08:44] ur5us: has joined #RubyOnRails
[07:08:48] duncannz: has joined #RubyOnRails
[07:11:48] nocontrol: has joined #RubyOnRails
[07:12:18] Bloodberet: has joined #RubyOnRails
[07:12:51] sleungcy: has joined #RubyOnRails
[07:14:50] apotry: has joined #RubyOnRails
[07:15:42] yoongkang: has joined #RubyOnRails
[07:15:43] jahbrewski: has joined #RubyOnRails
[07:17:25] rvanlieshout: i was away for a min, but np
[07:17:44] piotrj: has joined #RubyOnRails
[07:23:43] Janno: does rails 3 support end when rails 5 is released?
[07:23:49] krz: has joined #RubyOnRails
[07:24:31] sleungcy: has joined #RubyOnRails
[07:25:23] sevenseacat: it only gets major security fixes atm anyway.
[07:25:44] Janno: Okay, thanks!
[07:25:55] sevenseacat: http://rubyonrails.org/security/ see supported versions
[07:27:53] quazimodo: has joined #RubyOnRails
[07:28:51] altair118: has joined #RubyOnRails
[07:30:06] JohnBat26: has joined #RubyOnRails
[07:32:47] solars: has joined #RubyOnRails
[07:34:18] AimlessRAven: has joined #RubyOnRails
[07:41:42] pyemkey: has joined #RubyOnRails
[07:43:40] deweysdecimal: has joined #RubyOnRails
[07:44:44] tego101: has joined #RubyOnRails
[07:45:16] AimlessRAven: i have product and category model product belongs_to category, category has_many product, ok what dependet: i need to add, to not destroy product when destroy category
[07:46:43] lyoshajapan: has joined #RubyOnRails
[07:52:16] srinidhi: has joined #RubyOnRails
[07:54:38] arBmind: has joined #RubyOnRails
[07:56:01] yogeshrt: has joined #RubyOnRails
[07:56:04] sandstrom: has joined #RubyOnRails
[07:56:34] rvanlieshout: AimlessRaven: then don't tell rails to use dependent destroy
[07:58:38] blackhuey: has joined #RubyOnRails
[08:00:51] duncannz: has joined #RubyOnRails
[08:02:19] ryohashimoto: has joined #RubyOnRails
[08:03:58] arup_r: has joined #RubyOnRails
[08:09:49] Bloodberet: has joined #RubyOnRails
[08:11:24] rogue_koder: has joined #RubyOnRails
[08:13:26] darutoko: has joined #RubyOnRails
[08:14:25] futilegames: has joined #RubyOnRails
[08:14:59] spyd3r: has joined #RubyOnRails
[08:18:10] Radar: GOOD EVENING
[08:18:18] Radar: I am waiting for my checkin counter to open. Bring out your dead.
[08:18:27] yoongkang: has joined #RubyOnRails
[08:20:42] sarink: has joined #RubyOnRails
[08:20:57] tbuehlmann: had to google that saying
[08:22:32] yogeshrt: has joined #RubyOnRails
[08:22:43] PedramT_: has joined #RubyOnRails
[08:26:11] dtordable: what libraries in the OS or what do I need for installing therubyracer gem?
[08:26:13] Brother_Emmett: has joined #RubyOnRails
[08:26:51] dtordable: (FreeBSD OS here)
[08:26:53] sevenseacat: Radar: where you going?
[08:29:41] mdw: has joined #RubyOnRails
[08:29:53] pulgalipe: has joined #RubyOnRails
[08:31:32] tetraktys: has joined #RubyOnRails
[08:35:20] PedramT: has joined #RubyOnRails
[08:35:34] artto: has joined #RubyOnRails
[08:39:24] quazimodo: has joined #RubyOnRails
[08:39:42] gbgdev: has joined #RubyOnRails
[08:40:14] Dbugger: has joined #RubyOnRails
[08:40:16] herbst: has joined #RubyOnRails
[08:40:45] zpe: has joined #RubyOnRails
[08:42:43] User458764: has joined #RubyOnRails
[08:43:10] andchar: has joined #RubyOnRails
[08:45:45] jtong: has joined #RubyOnRails
[08:49:24] K_r3aPeR_: has joined #RubyOnRails
[08:54:58] gbgdev: has joined #RubyOnRails
[08:55:22] mrd_: has joined #RubyOnRails
[08:58:27] krz: has joined #RubyOnRails
[08:58:56] AzaToth: has joined #RubyOnRails
[09:04:16] mdw: has joined #RubyOnRails
[09:08:13] Pumukel: has joined #RubyOnRails
[09:08:44] User458764: has joined #RubyOnRails
[09:10:34] jsrn_: has joined #RubyOnRails
[09:12:28] Oog: has joined #RubyOnRails
[09:12:45] lxsameer: has joined #RubyOnRails
[09:12:55] kerunaru: has joined #RubyOnRails
[09:13:58] nerium: has joined #RubyOnRails
[09:14:17] yogeshrt: has joined #RubyOnRails
[09:14:35] mark2: has joined #RubyOnRails
[09:16:15] pydave6367: has joined #RubyOnRails
[09:16:28] defsdoor: has joined #RubyOnRails
[09:16:36] titeiko_: has joined #RubyOnRails
[09:16:54] Radar: sevenseacat: off to rome
[09:17:11] Radar: :D Thanks, I will!
[09:17:19] Radar: Shaz is over there at the moment and she's got her last day of teaching placement today
[09:18:46] Palsson: has joined #RubyOnRails
[09:21:12] CornishPasty: Radar: eat lots of pizze
[09:21:16] AimlessRAven: has joined #RubyOnRails
[09:21:20] PedramT: has joined #RubyOnRails
[09:21:37] AimlessRAven: hello evryone when i try to run migration for devise gem i get this
[09:21:39] marr: has joined #RubyOnRails
[09:21:53] AimlessRAven: home/niko/Desktop/sellor/sellor/config/initializers/devise.rb:3:in `<top (required)>' /home/niko/Desktop/sellor/sellor/spec/dummy/config/environment.rb:5:in `<top (required)>'
[09:21:53] rodfersou: has joined #RubyOnRails
[09:21:58] AimlessRAven: where i need to require
[09:22:02] drptbl: has joined #RubyOnRails
[09:22:05] rvanlieshout: AimlessRaven: !debug
[09:22:05] helpa: AimlessRaven: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[09:22:44] tetraktys: has joined #RubyOnRails
[09:23:13] snowy: has joined #RubyOnRails
[09:23:46] Pumukel: has joined #RubyOnRails
[09:24:57] Radar: totes agree with that
[09:25:08] Radar: What error are you seeing exactly? You've shown the stack trace only
[09:25:14] Radar: CornishPasty: oh I absolutely will :)
[09:25:50] barhum2013: has joined #RubyOnRails
[09:27:05] barhum2013: has joined #RubyOnRails
[09:28:26] robbyoconnor: has joined #RubyOnRails
[09:30:01] piotrj_: has joined #RubyOnRails
[09:32:56] PedramT: has joined #RubyOnRails
[09:33:01] Terens: has joined #RubyOnRails
[09:37:14] Ergo: has joined #RubyOnRails
[09:37:20] jahbrewski: has joined #RubyOnRails
[09:37:26] joy4u: has joined #RubyOnRails
[09:38:15] joy4u: has left #RubyOnRails: ()
[09:39:16] LambdaSource: has joined #RubyOnRails
[09:40:38] joy4u1: has joined #RubyOnRails
[09:41:57] yfeldblum: has joined #RubyOnRails
[09:42:55] joy4u1: has joined #RubyOnRails
[09:42:57] joy4u1: has left #RubyOnRails: ()
[09:44:34] pulgalipe: has joined #RubyOnRails
[09:45:13] User458764: has joined #RubyOnRails
[09:47:03] kitsuneyo: has joined #RubyOnRails
[09:48:02] tjbiddle: Hey all. Bit stuck. Testing an application on a new server (New server is in China behind Great Firewall) - Things normally run smoothly on AWS. My app is just hanging after starting up. I've tried running it in development mode and I'm getting zero logs - It says "Starting GET..." and my curl request is just hanging and doing nothing.
[09:48:19] tjbiddle: At a loss on where to go - checked all the logs I could find; nothing is showing up
[09:48:48] rvanlieshout: how is the server started?
[09:48:53] rvanlieshout: did you try using a plain rails server?
[09:49:10] tjbiddle: Wewps - finally returned; must've had a long timeout. Hold on - reading through this novel it just dumped
[09:49:44] ryohashimoto: has joined #RubyOnRails
[09:50:15] spyd3r: has joined #RubyOnRails
[09:50:26] tjbiddle: Ah, easy fix - Forgot to open up MySql to these servers
[09:50:30] tjbiddle: Spoke too soon :)
[09:51:47] nettoweb: has joined #RubyOnRails
[09:52:05] bruce__lee: has joined #RubyOnRails
[09:53:38] piotrj: has joined #RubyOnRails
[09:56:27] piotrj_: has joined #RubyOnRails
[09:56:54] joy4u: has joined #RubyOnRails
[09:57:01] joy4u: has left #RubyOnRails: ()
[09:57:05] kerunaru: has joined #RubyOnRails
[10:02:51] fbandov: has joined #RubyOnRails
[10:03:19] PedramT: has joined #RubyOnRails
[10:06:19] theod: has joined #RubyOnRails
[10:08:28] dragonkh: has joined #RubyOnRails
[10:08:47] blackmes1: has joined #RubyOnRails
[10:11:15] lyoshajapan: has joined #RubyOnRails
[10:16:33] arBmind: has joined #RubyOnRails
[10:17:59] mrbubbles: has joined #RubyOnRails
[10:20:58] spyd3r: has joined #RubyOnRails
[10:22:05] sonOfRa: has joined #RubyOnRails
[10:24:23] drptbl: has joined #RubyOnRails
[10:25:17] ElFerna_: has joined #RubyOnRails
[10:27:05] KucukMubasir: has joined #RubyOnRails
[10:27:38] PedramT: has joined #RubyOnRails
[10:27:49] drptbl: has joined #RubyOnRails
[10:27:50] baweaver: has joined #RubyOnRails
[10:28:14] nocontrol: has left #RubyOnRails: ()
[10:28:16] nocontrol: has joined #RubyOnRails
[10:28:36] nocontrol: has left #RubyOnRails: ()
[10:28:37] nocontrol: has joined #RubyOnRails
[10:28:43] nocontrol: anyone please http://stackoverflow.com/questions/35082177/return-the-error-status-messages-from-cancan-accessdenied-instead-of-redirection?
[10:31:46] Radar: nil? with else is just asking for trouble.
[10:32:07] drptbl: has joined #RubyOnRails
[10:32:16] Radar: "a 500 error instead" typically means that you're seeing a stacktrace of some description
[10:32:16] Radar: nocontrol: ^
[10:33:18] nocontrol: Radar: right after the query, Completed 500 Internal Server Error in 374ms (ActiveRecord: 0.8ms)
[10:33:38] Radar: nocontrol: Are you running in development or production?
[10:33:50] arup_r: has joined #RubyOnRails
[10:34:17] nocontrol: Started GET "/api/trackings" for 192.168.33.1 at 2016-01-29 10:24:06 +0000 Processing by Api::V1::TrackingsController#index as JSON
[10:34:24] Radar: oh it's an API call, great.
[10:34:31] nocontrol: and then Completed 500 Internal Server Error in 374ms (ActiveRecord: 0.8ms)
[10:34:37] Radar: And there's nothing underneath that that shows a stacktrace
[10:35:10] nocontrol: If I visit the /api/trackings link, I see the json with the status 500 and the error
[10:36:40] noodman: has joined #RubyOnRails
[10:36:42] Radar: ok then, I am not sure what is wrong here
[10:37:32] sonOfRa: has joined #RubyOnRails
[10:39:49] arup_r: nocontrol: check your rails log.. and give the stacktrace..here using a gist
[10:45:12] theod: has joined #RubyOnRails
[10:45:27] PedramT: has joined #RubyOnRails
[10:48:43] artto: has joined #RubyOnRails
[10:50:06] gbgdev: has joined #RubyOnRails
[10:52:10] PedramT: has joined #RubyOnRails
[10:53:42] yoongkang: has joined #RubyOnRails
[10:53:51] subr00t: has joined #RubyOnRails
[10:54:05] arup_r: subr00t: welcome
[10:54:22] subr00t: arup_r: thx
[10:54:33] nocontrol: Radar: this shit is on my head for two days
[10:54:38] nocontrol: Radar: render json: { status: "401", error: "Unauthorized", logged_in: true }, status: 401
[10:55:00] namxam: has joined #RubyOnRails
[10:55:06] nocontrol: Radar: it was not rendering json but html, so I have no template for this inside Rails and it couldn't find it
[10:55:21] piotrj: has joined #RubyOnRails
[10:55:29] nocontrol: Radar: sad to say I'm an idiot because the stacktrace was long enough to scroll all the way up and find it
[10:56:13] subr00t: Is it possible to use two counter cache on same model having has_many & has_many through?
[10:56:24] fbandov: has joined #RubyOnRails
[10:56:49] nocontrol: Radar: thanks for triggering this chain of thoughts within my head... the in-head butterfly effect
[10:58:41] norc: has joined #RubyOnRails
[10:59:58] ldnunes: has joined #RubyOnRails
[11:01:34] herbst: has joined #RubyOnRails
[11:02:20] norc: I want to use a nested resource under namespace, but refer to a top level controller. https://gist.github.com/anonymous/49de3e1504c8dba82af7
[11:02:38] norc: Can I override this automatic prefix somehow without using scope?
[11:05:49] PedramT: has joined #RubyOnRails
[11:06:43] subr00t: Is it possible to use two counter cache on same model having has_many & has_many through? https://gist.github.com/thesubr00t/ae9c5ce3e70424d6bded
[11:07:10] arup_r: subr00t: possible.
[11:08:00] czerasz: has joined #RubyOnRails
[11:09:20] subr00t: arup_r: can you please explain to me the way to do it? Here is my implementation so far, but i got wrong counts. https://gist.github.com/thesubr00t/ae9c5ce3e70424d6bded
[11:09:52] namxam: has joined #RubyOnRails
[11:11:42] arup_r: subr00t: you need to create 2 columns having datatype as integer. read 4.1.2.3 :counter_cache ( http://guides.rubyonrails.org/association_basics.html )
[11:13:12] arup_r: in Hotspot table create one column answers_count and Question table also have answers_count
[11:13:34] arup_r: subr00t: ^^ read the link I gave, which will guide you
[11:14:04] User458764: has joined #RubyOnRails
[11:14:17] yogeshrt: has joined #RubyOnRails
[11:17:41] subr00t: arup_r: Thank you, adding answers_count to hotspots table did the trick. still not understanding why?
[11:17:57] kitsuneyo: has joined #RubyOnRails
[11:20:50] arup_r: means? did the trick or didn't ?
[11:21:05] norc: Ah I figured it out.
[11:21:23] norc: Apparently '/apples' is understood as a top level controller. :)
[11:21:33] subr00t: arup_r, Yes it did! But why I needed the answers_count column on hotspots table?
[11:21:55] sevenseacat: has joined #RubyOnRails
[11:21:59] AimlessRAven: has joined #RubyOnRails
[11:22:02] subr00t: arup_r, Its not clear on the guides
[11:22:09] arup_r: because there it caches the count.. otherwise, how it will work. Did you read the link I gave. it explains how it works
[11:22:33] AimlessRAven: hello evryone, i wanna use faker to generate my fake passwords like this Faker::Internet.password(8) but there isnt faker password_confirmation .. in this case faker generate me 2 different password
[11:22:38] AimlessRAven: how to make equal
[11:22:48] nerium: has joined #RubyOnRails
[11:23:04] subr00t: arup_r, I thought that having answers_count & hotpots_count on the question table is enough
[11:23:15] arup_r: subr00t: Rails internally calls this method http://api.rubyonrails.org/classes/ActiveRecord/CounterCache/ClassMethods.html for you to do the update..
[11:23:56] arup_r: subr00t: no... those columns go to the opposite side of the belongs_to assoc
[11:24:13] arup_r: that is the Rails convention. this is how they implemented
[11:24:58] subr00t: arup_r, Sure! Remeber that Question has many hotspots through answers.
[11:25:02] DoubleMalt: has joined #RubyOnRails
[11:25:07] subr00t: arup_r, It was a bit confusing for me :)
[11:25:36] arup_r1: has joined #RubyOnRails
[11:25:41] treaki: has joined #RubyOnRails
[11:25:46] arup_r1: AimlessRaven: Are you using FactoryGirl ?
[11:27:03] arup_r1: has joined #RubyOnRails
[11:28:25] Cervajz: has joined #RubyOnRails
[11:29:11] theod: has joined #RubyOnRails
[11:30:20] Palsson: has joined #RubyOnRails
[11:30:34] Cervajz__: has joined #RubyOnRails
[11:32:05] futilegames: has joined #RubyOnRails
[11:36:13] Cervajz: has joined #RubyOnRails
[11:36:22] AimlessRAven: arup___: yea but i make decision to make equal strings to password and pass confirm
[11:36:52] arup_r1: AimlessRaven: use FactoryGirl lazy attribute scheme plz :)
[11:37:24] arup_r1: where is the `r` in my nick :/ ?
[11:37:40] Cervajz__: has joined #RubyOnRails
[11:39:16] drptbl: has joined #RubyOnRails
[11:39:50] AimlessRAven: arup___: mm idk i use sequence :) for name email phone .. is easy too
[11:40:36] mices: has joined #RubyOnRails
[11:40:54] arup_r1: AimlessRaven: http://www.rubydoc.info/gems/factory_girl/file/GETTING_STARTED.md#Lazy_Attributes
[11:41:26] arup_r1: you will first define password as you are doing , then password_confirmation using *lazy attribute* technique..
[11:41:36] drptbl: has joined #RubyOnRails
[11:41:39] codedmart: has joined #RubyOnRails
[11:42:56] namxam: has joined #RubyOnRails
[11:43:17] pulgalipe: has joined #RubyOnRails
[11:44:34] blackmes1: has joined #RubyOnRails
[11:44:48] tvw: has joined #RubyOnRails
[11:46:31] piotrj: has joined #RubyOnRails
[11:47:19] arup_r1: AimlessRaven: sorry I meant http://www.rubydoc.info/gems/factory_girl/file/GETTING_STARTED.md#Dependent_Attributes
[11:50:19] KucukMubasir: radar, hi. I am trying to build your multitenant 2nd edition source, however 18 tests fail, due to error of ???No such file or directory & unlink internal - ???/repos/radar/markdown_book_test ??? . Is this because I haven???t implemented webhooks ?
[11:50:39] AimlessRAven: arup___: yea i make it this way
[11:50:50] AimlessRAven: thanks man, today all my task works without debug.. i cant believe :D
[11:53:42] Cervajz: has joined #RubyOnRails
[11:54:17] ddv: AimlessRaven: there are no coincidences in software
[11:55:14] ElFerna_: has joined #RubyOnRails
[11:56:29] tetraktys: has joined #RubyOnRails
[11:58:21] andchar: has joined #RubyOnRails
[12:00:58] greengriminal: has joined #RubyOnRails
[12:01:48] jgt: has joined #RubyOnRails
[12:02:03] piotrj: has joined #RubyOnRails
[12:05:03] antonakischris: has joined #RubyOnRails
[12:06:04] antonakischris: has left #RubyOnRails: ()
[12:06:42] bookies: has joined #RubyOnRails
[12:06:59] bookies: I get a strange behaviour from the jQuery datepicker. Any clue? http://stackoverflow.com/questions/35083064
[12:12:42] ql6wlld: has joined #RubyOnRails
[12:14:25] PedramT: has joined #RubyOnRails
[12:14:30] keekri: has joined #RubyOnRails
[12:14:43] fsteim: has joined #RubyOnRails
[12:15:15] enkristoffer: has joined #RubyOnRails
[12:17:44] FooMunki: has joined #RubyOnRails
[12:19:07] titeiko: has joined #RubyOnRails
[12:19:14] yogeshrt: has joined #RubyOnRails
[12:22:33] titeiko__: has joined #RubyOnRails
[12:24:23] theod: has joined #RubyOnRails
[12:24:37] titeiko_: has joined #RubyOnRails
[12:25:08] titeiko__: has joined #RubyOnRails
[12:32:37] theod: has joined #RubyOnRails
[12:32:46] fox_mulder_cp: has joined #RubyOnRails
[12:33:53] FooMunki: has joined #RubyOnRails
[12:37:11] artto: has joined #RubyOnRails
[12:38:05] atomical: has joined #RubyOnRails
[12:41:13] kitsuneyo: has joined #RubyOnRails
[12:42:36] kitsuneyo: has joined #RubyOnRails
[12:43:31] Bloomer: has joined #RubyOnRails
[12:44:05] scepticulous: has joined #RubyOnRails
[12:45:22] blackmes1: has joined #RubyOnRails
[12:45:38] scepticulous: does somebody know the current state of the art logging extensions for rails. I used to use lograge and/or logstash. Are there general logging setups for configurable and/or structured logging.
[12:47:22] c355E3B: has joined #RubyOnRails
[12:48:23] fbandov: has joined #RubyOnRails
[12:52:35] renews: has joined #RubyOnRails
[12:53:00] lyoshajapan: has joined #RubyOnRails
[12:54:16] `aspiRe: has joined #RubyOnRails
[12:55:56] atomical_: has joined #RubyOnRails
[12:56:10] namxam: has joined #RubyOnRails
[12:59:36] PedramT: has joined #RubyOnRails
[13:03:11] herbst: has joined #RubyOnRails
[13:05:57] barhum2013: has joined #RubyOnRails
[13:06:08] astrofog: has joined #RubyOnRails
[13:06:53] theod: has joined #RubyOnRails
[13:09:38] Sigfrid: has joined #RubyOnRails
[13:10:19] JohnBat26|2: has joined #RubyOnRails
[13:12:56] CassioAlmeidas: has joined #RubyOnRails
[13:15:06] symbole: has joined #RubyOnRails
[13:16:03] CassioAlmeidas: has joined #RubyOnRails
[13:16:10] CassioAlmeidas: as completely save the object "LegacyQueue.find_by_name(view).nodes.includes(:images, :files, :terms date)" in Rails.cache ?
[13:17:09] JohnBat26: has joined #RubyOnRails
[13:17:36] JohnBat26|2: has joined #RubyOnRails
[13:17:48] sandstrom: has joined #RubyOnRails
[13:20:18] CassioAlmeidas: has joined #RubyOnRails
[13:21:40] CassioAlmeidas: has left #RubyOnRails: ()
[13:21:56] artto: has joined #RubyOnRails
[13:25:18] drptbl: has joined #RubyOnRails
[13:26:04] Dbugger: has joined #RubyOnRails
[13:27:50] akaiiro: has joined #RubyOnRails
[13:28:12] pyemkey: has joined #RubyOnRails
[13:28:22] jkamenik: has joined #RubyOnRails
[13:29:56] stannard: has joined #RubyOnRails
[13:32:50] titeiko: has joined #RubyOnRails
[13:34:45] titeiko_: has joined #RubyOnRails
[13:35:00] brendan-: has joined #RubyOnRails
[13:36:08] titeiko__: has joined #RubyOnRails
[13:38:16] titeiko: has joined #RubyOnRails
[13:38:37] artto: has joined #RubyOnRails
[13:39:57] Craigimus: has joined #RubyOnRails
[13:40:04] bookies: I get a strange behaviour from the jQuery datepicker. Any clue? http://stackoverflow.com/questions/35083064
[13:40:14] Macaveli: has joined #RubyOnRails
[13:40:45] titeiko_: has joined #RubyOnRails
[13:41:29] rvanlieshout: it doesn't use your dateFormat-thing, right?
[13:42:26] syzygy_: has joined #RubyOnRails
[13:45:58] titeiko: has joined #RubyOnRails
[13:46:56] zpe: has joined #RubyOnRails
[13:49:33] k13nox: has joined #RubyOnRails
[13:49:36] mary5030: has joined #RubyOnRails
[13:52:29] workmad3: has joined #RubyOnRails
[13:53:18] namxam: has joined #RubyOnRails
[13:57:56] ramortegui: has joined #RubyOnRails
[13:58:27] renanoronfle: has joined #RubyOnRails
[14:00:24] sandstrom: has joined #RubyOnRails
[14:01:18] lacrymology: has joined #RubyOnRails
[14:02:52] jottr: has joined #RubyOnRails
[14:08:07] VeryBewitching: has joined #RubyOnRails
[14:08:23] VeryBewitching: Good morning folks.
[14:08:33] snowy: has joined #RubyOnRails
[14:15:48] PedramT: has joined #RubyOnRails
[14:20:04] yoongkang: has joined #RubyOnRails
[14:20:25] tetraktys: has joined #RubyOnRails
[14:20:59] fox_mulder_cp: wow. one year ago i start learn rails..
[14:21:27] fox_mulder_cp: no wildcard?(((
[14:22:13] sandstrom: has joined #RubyOnRails
[14:22:44] ElFerna_: has joined #RubyOnRails
[14:22:46] titeiko: has joined #RubyOnRails
[14:24:32] titeiko: has joined #RubyOnRails
[14:24:38] silverdust: I expected my_route_alias_path(10) to give me a link like my/path/10 but I get my/path. 10
[14:25:43] fox_mulder_cp: silverdust: user_path(@user), user_path(user) etc
[14:26:23] silverdust: with <%= link_to 'Delete', admins_collection_path(10), method: 'delete' %>
[14:26:44] titeiko: has joined #RubyOnRails
[14:27:06] silverdust: I'm looping @collections.each do |collection| so I have collection
[14:28:45] silverdust: so I tried admins_collections_path(collection) and I still get /admins/collections.10
[14:30:12] silverdust: ok I had to change to admins_collection_path(collection)
[14:30:30] fox_mulder_cp: silverdust: use "dmins_collection_path(collection)"
[14:30:58] silverdust: yes I did :)
[14:31:01] matthewd: silverdust: That's what you said you were already using in the delete link
[14:31:15] arup_r: has joined #RubyOnRails
[14:31:28] titeiko_: has joined #RubyOnRails
[14:31:48] silverdust: matthewd: I said I was using admins_collections_path(collection) before
[14:32:09] matthewd: [00:56:22] <silverdust> with <%= link_to 'Delete', admins_collection_path(10), method: 'delete' %>
[14:34:31] herbst: has joined #RubyOnRails
[14:34:31] herbst: has joined #RubyOnRails
[14:35:49] silverdust: oh I wrote that fine here but I actually had collections in my code
[14:37:15] mordof_work: has joined #RubyOnRails
[14:39:17] sevenseacat: y u no copy and paste code???
[14:39:19] helpa: ლ(ಠ_ಠლ)
[14:44:07] ryanRT: has joined #RubyOnRails
[14:45:13] kitsuneyo: has joined #RubyOnRails
[14:45:43] CornishPasty: ACTION pastes code all over sevenseacat's controllers
[14:46:24] harly__: has joined #RubyOnRails
[14:46:49] Megamos: has joined #RubyOnRails
[14:46:53] bookies: has left #RubyOnRails: ()
[14:47:58] jtong: has joined #RubyOnRails
[14:53:19] tiagobarreto: has joined #RubyOnRails
[14:53:20] sandstrom: has joined #RubyOnRails
[14:58:35] griffindy: has joined #RubyOnRails
[14:59:52] sandstrom: has joined #RubyOnRails
[15:00:37] jscheel: has joined #RubyOnRails
[15:03:31] matthias_: has joined #RubyOnRails
[15:03:49] atomical: has joined #RubyOnRails
[15:06:06] teaearlgraycold: Is there an easy way to connect rails to an existing dB with non "rails-y" table and column names?
[15:07:28] uris: has joined #RubyOnRails
[15:07:46] CornishPasty: teaearlgraycold: http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-table_name-3D should help
[15:07:59] CornishPasty: (It's at the bottom)
[15:08:36] arup_r: My tests are getting hang when I am running the full suite.. so found some suggestions though https://github.com/rspec/rspec-rails/issues/1353#issuecomment-93118092 .. but rspec \spec is throwing error. Does he mean rspec spec/ ?
[15:08:38] mary5030: has joined #RubyOnRails
[15:09:17] CornishPasty: teaearlgraycold: As for columns, you can use alias_attribute - http://apidock.com/rails/ActiveModel/AttributeMethods/ClassMethods/alias_attribute
[15:10:12] nettoweb: has joined #RubyOnRails
[15:15:28] sasasekaric: has joined #RubyOnRails
[15:15:42] czerasz: has joined #RubyOnRails
[15:15:53] jkamenik: has joined #RubyOnRails
[15:18:43] harly: has joined #RubyOnRails
[15:21:01] gbgdev: has joined #RubyOnRails
[15:21:13] adavia: has joined #RubyOnRails
[15:22:13] mordof_work: has joined #RubyOnRails
[15:22:33] PaulePanter: Hi. I wanted to be smart and set up newrelic_rpm support for an free software app. As not everybody is going to want to use New Relic, I added it like `gem 'newrelic_rpm', group: :new_relic` to `Gemfile`, so that `bundle install --without new_relic` will not install it for people not wanting to use it.
[15:22:59] PaulePanter: Now testing this, it turns out `bundle install` installs it like intended, but Rails does not load it.
[15:23:08] PaulePanter: What is the best practice for this kind of issue?
[15:23:36] namxam: has joined #RubyOnRails
[15:24:31] visudo: has joined #RubyOnRails
[15:25:51] kallisti5: ok.. I need to migrate a ActiveRecord object id from integer into a uuid
[15:26:17] adavia: is it necessary now to use params.fetch(:user, {}).permit(:name, :photo) when passing strong parameters with carrierwave?
[15:26:17] kallisti5: anyone have a good way to do it? I know i'll lose my valid id assoc. I can fix that manually
[15:26:27] PaulePanter: http://bundler.io/groups.html kind of says, I need to load it then specifically in Rails, but that is exactly what I wanted to avoid.
[15:26:54] ddv: kallisti5: probably by writing a simple ruby program/script
[15:27:04] ddv: kallisti5: should be easy enoough
[15:27:11] ddv: enough*
[15:27:21] kallisti5: ddv, it has to be in the migration though... right?
[15:27:29] kallisti5: i've done it before and it ended up being a big mess
[15:28:17] hobodave: has joined #RubyOnRails
[15:29:37] kallisti5: https://gist.github.com/avongluck-r1soft/4c9109b6476fb32a06d8 I think something like that
[15:33:04] chrisarcand: arup_r: He means `rspec ./spec` if you're in the directory (or just `rspec spec`). He meant just a generic path.
[15:33:19] arup_r: kallisti5: create a column, and then take all values from old column to new column, and then once done.. restore again, and delete the helper column ..
[15:33:27] arup_r: chrisarcand: :) ok
[15:33:38] kallisti5: arup_r: the issue is uuid's don't translate to integers
[15:34:08] arup_r: chrisarcand: but what is the diff between rspec spec and rspec ./spec ?
[15:35:08] chrisarcand: [Essentially] nothing. That's a shell concern, not rspec's.
[15:36:46] rogue_koder: has joined #RubyOnRails
[15:37:19] arup_r: as he said, rspec ./spec will give stacktrace which other command does not.
[15:37:33] arup_r: kallisti5: ok
[15:38:04] ElFerna_: has joined #RubyOnRails
[15:38:59] dopamean_: has joined #RubyOnRails
[15:39:35] ziyadb: has joined #RubyOnRails
[15:40:39] kallisti5: hm... that migration does a strange column addition with id: false
[15:40:54] kallisti5: I think I need to use change_table and do id: :uuid but I can't figure out the syntax
[15:42:35] fox_mulder_cp: kallisti5: you can create new app and make a test for this migration
[15:43:18] kies^: has joined #RubyOnRails
[15:43:42] kallisti5: fox_mulder_cp: ahh! figured it out
[15:43:50] kallisti5: scary though one-way migration :-)
[15:44:06] aaronr: has joined #RubyOnRails
[15:44:12] kallisti5: https://gist.github.com/avongluck-r1soft/2404408f57454435e0f2
[15:45:08] fox_mulder_cp: kallisti5: uep, after int64 id is full - app is fails (
[15:45:33] kallisti5: fox_mulder_cp: i'm actually polling a rest api and everything has a UUID as the id
[15:45:40] kallisti5: (except for the top-level node)
[15:46:00] fox_mulder_cp: so i write my apps with pg-sql based ads with uuid as id from scratch
[15:46:01] kallisti5: problem is, i'm now doing relations of every object type onto common objects
[15:46:23] kallisti5: that works for everything except the top level which is integer instead of uuid :-X
[15:47:12] workmad3: has joined #RubyOnRails
[15:47:45] nettoweb: has joined #RubyOnRails
[15:47:48] rogue_koder: has joined #RubyOnRails
[15:48:42] mary5030: has joined #RubyOnRails
[15:49:42] mary5030: has joined #RubyOnRails
[15:52:14] AlexJakeGreen: has joined #RubyOnRails
[15:55:03] PedramT: has joined #RubyOnRails
[15:57:30] tubbo: ql6wlld: .
[15:57:32] tubbo: ql6wlld: ..
[15:57:34] tubbo: ql6wlld: porn/
[15:57:48] ql6wlld: damn it, you got me
[15:57:54] tubbo: figured i'd try a guess
[15:58:18] adavia: is it necessary now to use params.fetch(:user, {}).permit(:name, :photo) when passing strong parameters with carrierwave?
[15:59:19] cschneid_: has joined #RubyOnRails
[15:59:57] polishdub: has joined #RubyOnRails
[16:00:12] drptbl: has joined #RubyOnRails
[16:01:38] tubbo: think you should just be able to do params.require(:user).permit(:name, :photo)
[16:03:24] adavia: well for some reason when i add a form field and i submit an empty form i get param is missing or the value is empty: user
[16:03:28] dionysus69: has joined #RubyOnRails
[16:03:37] adavia: file field sorry
[16:04:15] visudo: has joined #RubyOnRails
[16:04:37] adavia: seems like an issue with rails 5.0 and carrierwave
[16:04:41] drptbl: has joined #RubyOnRails
[16:04:43] Cervajz: has joined #RubyOnRails
[16:06:11] sasasekaric: has joined #RubyOnRails
[16:06:39] meoblast001: has joined #RubyOnRails
[16:07:17] fox_mulder_cp: kallisti5: fix relations - ohoho. i think about this algo: make a new uuid field, migrate relations to uuid by external sql code - select from child field, upgrade it relation field key to parent uuid. drop int field
[16:07:42] mordof_work: has joined #RubyOnRails
[16:07:52] moeabdol: has joined #RubyOnRails
[16:08:26] KensoDev: has joined #RubyOnRails
[16:09:51] zarubin: has joined #RubyOnRails
[16:11:27] sankaber: has joined #RubyOnRails
[16:12:53] disgrntld: has joined #RubyOnRails
[16:13:27] tego101: has joined #RubyOnRails
[16:14:51] Cervajz__: has joined #RubyOnRails
[16:16:09] Cervajz__: has joined #RubyOnRails
[16:16:52] pulgalipe: has joined #RubyOnRails
[16:19:03] zarubin: has joined #RubyOnRails
[16:19:35] Bloomer: has joined #RubyOnRails
[16:21:49] mordof_work: has joined #RubyOnRails
[16:25:14] smathy: has joined #RubyOnRails
[16:25:50] PedramT: has joined #RubyOnRails
[16:29:39] lacrymology: has joined #RubyOnRails
[16:34:45] workmad3: has joined #RubyOnRails
[16:36:08] herbst: has joined #RubyOnRails
[16:36:27] MarkAValdez: has joined #RubyOnRails
[16:39:46] chouhoulis: has joined #RubyOnRails
[16:40:44] [Butch]: has joined #RubyOnRails
[16:40:45] sasasekaric: has joined #RubyOnRails
[16:41:38] pec: has joined #RubyOnRails
[16:41:59] mwlang: has joined #RubyOnRails
[16:42:17] sandstrom: has joined #RubyOnRails
[16:43:00] lacrymology: does Hash#merge work recursively with dicts?
[16:43:05] atomical_: has joined #RubyOnRails
[16:44:14] smathy: lacrymology, dict = Hash ?
[16:44:21] matthewd: lacrymology: !try
[16:44:21] helpa: lacrymology: Why don't you try it and find out for yourself?
[16:44:45] chubijs: has joined #RubyOnRails
[16:44:51] phantummm: has joined #RubyOnRails
[16:44:54] MarkAValdez: has left #RubyOnRails: ()
[16:45:45] ziggy: has joined #RubyOnRails
[16:45:47] PedramT_: has joined #RubyOnRails
[16:45:50] sonofdirt: has joined #RubyOnRails
[16:47:23] mwlang: How do I change a controller actions??? response so that Content-Type is ???text/xml; charset=???utf-8?????? instead of ???application/xml; charset=???utf-8?????? ??? I am not directly setting Content-Type at the moment, that I???m aware of, but I am rendering with the xml option??? that is: ???render xml: responder.response, layout: false???
[16:48:58] Jasaka: has joined #RubyOnRails
[16:49:42] mwlang: last time I had to muck with headers was Rails 1.x and that involved simply changing the entry in a config/mime.rb file IIRC ??? or at least something equally hacky as that...
[16:52:49] tubbo: mwlang: well you can add mime types in config/initializers/mime_types.rb, but not sure if you can edit the ones that come pre-packaged with rails.
[16:53:04] pipework: ACTION adds the panto mimetype to his applications
[16:53:54] hobodave: has joined #RubyOnRails
[16:54:21] mwlang: hmmm???I will experiment???I just saw in the Guides that a :content_type option is available on render to explicitly set it.
[16:54:54] tubbo: mwlang: why do you need to do this/
[16:55:05] AckZ: has joined #RubyOnRails
[16:55:09] rogue_koder: has joined #RubyOnRails
[16:55:33] mwlang: tubbo: because somebody who coded his client in .Net 4 can???t seem to make his app accept ???application/xml???
[16:55:58] djbkd: has joined #RubyOnRails
[16:56:16] mwlang: hopefully I won???t have to change it???I gave him some ???research??? materials (links to MSDN KB) to follow up on.
[16:56:50] hobodave: has joined #RubyOnRails
[16:56:52] YankNYC: has joined #RubyOnRails
[16:57:00] tubbo: i haven't had to work with .NET much
[16:57:49] Cervajz: has joined #RubyOnRails
[16:58:00] mwlang: me, either. but I???ve been building SOAP apps of late (this is 4th one in the last year)
[16:58:13] renanoronfle: has joined #RubyOnRails
[16:58:14] mwlang: seems like everybody connecting to ???em are using .Net apps.
[16:59:26] mwlang: or at least all the people having difficulties figuring out how to interface are .Net??? (yeah, I???m ranting a bit)
[16:59:51] tubbo: mwlang: .net 4 isn't too old, it must have support for RESTful web services?
[17:00:02] bklane: has joined #RubyOnRails
[17:01:41] mwlang: I really have no idea ??? I just build the servers and let my client deal with the, ahem, lame devs. ;-)
[17:02:04] visudo: has joined #RubyOnRails
[17:03:28] PedramT: has joined #RubyOnRails
[17:03:48] EvanR: has joined #RubyOnRails
[17:04:19] snowy: has joined #RubyOnRails
[17:05:02] PedramT: has joined #RubyOnRails
[17:05:40] tubbo: i have to integrate this store i'm about to build with an order management system which only exposes its API to .net
[17:05:41] pulgalipe: has joined #RubyOnRails
[17:05:53] tubbo: so somehow i have to get orders placed on the rails-based store into this OMS
[17:06:23] tubbo: thankfully i can get someone on the client's team to build the web service for me, and they'll just send back orders to me via our RESTful API)
[17:07:10] mwlang: tubbo: you got lucky???I faced a similar scenario last year (Navision was the order management system) ??? interfaced that system with SOAP.
[17:07:17] piotrj: has joined #RubyOnRails
[17:08:31] lyoshajapan: has joined #RubyOnRails
[17:09:36] nodejunkie: has joined #RubyOnRails
[17:09:56] tubbo: mwlang: yeah this client is using M.O.M. www.dydacomp.com/Products/Multichannel-Order-Manager-MOM
[17:10:55] mwlang: ???Dydacomp??? ??? nuts ??? I built a product a few years back called ???Datacomp??? Weird seeing that spun name.
[17:12:44] arup_r: has joined #RubyOnRails
[17:13:35] namxam: has joined #RubyOnRails
[17:15:02] tubbo: well it looks like they just changed it anyway
[17:15:18] lacrymology: can I have rspec jump into byebug when there's a failure?
[17:15:23] nerium: has joined #RubyOnRails
[17:15:59] smathy: lacrymology, not sure if "when there's a failure", but you can definitely put a `byebug` in your code and your test will break and drop you to a debug console.
[17:16:38] lacrymology: smathy: yeah, but I have a test that's failing randomly
[17:16:53] lacrymology: and I haven't been able to see it fail when stopping before
[17:17:14] diegoviola: has joined #RubyOnRails
[17:17:31] uris: has joined #RubyOnRails
[17:17:42] tbuehlmann: there's https://github.com/ConradIrwin/pry-rescue for pry(, but that didn't really worked well for me)
[17:18:08] tubbo: lacrymology: try running the test (or suite) with `rspec --seed 12345`
[17:18:08] lacrymology: tbuehlmann: I'll look into that, thanks
[17:18:30] tubbo: that will reproduce the order in which your tests were run when they failed
[17:18:47] tubbo: lacrymology: where 12345 is the number next to "Randomized with seed number" in your test output from the random failure.
[17:21:49] lacrymology: tubbo: thanks, that's really usefulk
[17:24:15] moeabdol: has joined #RubyOnRails
[17:25:37] sandstrom: has joined #RubyOnRails
[17:26:27] workmad3: has joined #RubyOnRails
[17:27:37] crystal77: has joined #RubyOnRails
[17:28:40] rakm: has joined #RubyOnRails
[17:29:26] ferr: has joined #RubyOnRails
[17:29:30] PedramT: has joined #RubyOnRails
[17:31:25] barhum2013: has joined #RubyOnRails
[17:35:23] baweaver: has joined #RubyOnRails
[17:36:38] Dbugger: Hello everyone
[17:37:18] Dbugger: I have a 2 part question... Does anyone know how it is called that style of search where you just type the beginning of a word, and it starts showing results before you are even finished? I thought it was "lazy search" but I was wrong...
[17:37:43] baweaver: has joined #RubyOnRails
[17:39:03] tubbo: dbugger: auto-complete, type-ahead, etc.
[17:39:05] ahmgeek: has joined #RubyOnRails
[17:39:57] piotrj: has joined #RubyOnRails
[17:40:14] Dbugger: tubbo, thanks
[17:40:36] Dbugger: Here is the second part... is there any sort of gem or way to implement it easily with the default scaffolded resources?
[17:41:27] tubbo: it really depends on your data, the scale of what you're searching, how you want it to be displayed, etc.
[17:41:27] hobodave: has joined #RubyOnRails
[17:41:29] K1SWR: has joined #RubyOnRails
[17:41:41] safety_cut: has joined #RubyOnRails
[17:43:07] Dbugger: I just want to search "PersoN" through name
[17:43:12] Dbugger: Nothing really convoluted
[17:43:27] musicnode: has joined #RubyOnRails
[17:43:38] ahmgeek: if I have something like https://gist.github.com/adam12/7e6db5840980da918dde/6e0bf26582a45f117b43c8310cde922b432a9c9a#file-image-rb how can I make the :optimize_image takes parameters ?
[17:43:48] atomical: has joined #RubyOnRails
[17:46:13] Frem: has joined #RubyOnRails
[17:47:28] piotrj: has joined #RubyOnRails
[17:48:14] armyriad: has joined #RubyOnRails
[17:48:20] titeiko: has joined #RubyOnRails
[17:48:20] musicnode: has joined #RubyOnRails
[17:48:55] mdw: has joined #RubyOnRails
[17:51:56] ahmgeek: any any any one ?
[17:52:57] atomical_: has joined #RubyOnRails
[17:53:02] visudo: has joined #RubyOnRails
[17:54:17] tubbo: dbugger: well it's basically a combination of binding to the 'change' event of a given form field and submitting the form asynchronously, then returning results in a clickable list.
[17:54:28] chrisarcand: arup_r: Catching up... "rspec ./spec will give stacktrace which other command does not." He made the distinction of using the rspec bin (rspec spec) instead of the rake task (rake spec), ./spec vs spec won't matter.
[17:54:31] sloggerkhan: has joined #RubyOnRails
[17:54:48] tubbo: how you choose to implement that search is up to you. some people use ILIKE queries, i personally use pg_search, and when i'm at work i'd use something like elasticsearch.
[17:55:35] Dbugger: tubbo, I was just wondering if there was a gem to do so
[17:55:41] Dbugger: or I had to implement it myself
[17:56:34] arup_r: chrisarcand: ahh, I see. thanks for your follow up..
[17:56:49] sleungcy: has joined #RubyOnRails
[18:00:26] judetucker: has joined #RubyOnRails
[18:00:48] ElFerna_: has joined #RubyOnRails
[18:00:59] mary5030: has joined #RubyOnRails
[18:02:35] titeiko_: has joined #RubyOnRails
[18:02:58] Sylario: has joined #RubyOnRails
[18:04:04] KensoDev: has joined #RubyOnRails
[18:04:36] titeiko_: has joined #RubyOnRails
[18:05:02] mordof_work: has joined #RubyOnRails
[18:05:32] ur5us: has joined #RubyOnRails
[18:05:36] JakFrist: has joined #RubyOnRails
[18:08:30] davidw: has joined #RubyOnRails
[18:08:34] JakFrist: has joined #RubyOnRails
[18:08:44] afroboy: has joined #RubyOnRails
[18:09:06] p8m_: has joined #RubyOnRails
[18:09:16] PedramT: has joined #RubyOnRails
[18:13:47] arup_r: anybody willing to help http://stackoverflow.com/questions/35091230/how-to-build-a-route-that-has-a-in-it .. I would also like to see the answer, that is why forwarding here.. :)
[18:14:24] smathy: arup_r, you can't have a # in a URL it's a local in-page anchor.
[18:15:01] arup_r: hum, I knew, but not confident.. :) You can say him the same..
[18:15:33] k13nox: has joined #RubyOnRails
[18:16:25] titeiko: has joined #RubyOnRails
[18:17:25] titeiko__: has joined #RubyOnRails
[18:17:33] corioliss: has joined #RubyOnRails
[18:17:40] smathy: Ok, done.
[18:17:54] juddey: has joined #RubyOnRails
[18:20:11] titeiko_: has joined #RubyOnRails
[18:21:53] yoongkang: has joined #RubyOnRails
[18:22:14] adre: has joined #RubyOnRails
[18:22:19] arup_r: smathy: thanks
[18:24:29] cmckee: has joined #RubyOnRails
[18:26:23] JakFrist: has joined #RubyOnRails
[18:29:43] atomical: has joined #RubyOnRails
[18:30:34] rogue_koder: has joined #RubyOnRails
[18:30:35] Bloomer: has joined #RubyOnRails
[18:31:13] ferr: has joined #RubyOnRails
[18:33:08] titeiko: has joined #RubyOnRails
[18:33:40] titeiko__: has joined #RubyOnRails
[18:33:52] matthias_: has joined #RubyOnRails
[18:37:52] herbst: has joined #RubyOnRails
[18:43:03] KensoDev: has joined #RubyOnRails
[18:43:52] djbkd: has joined #RubyOnRails
[18:43:55] duderon__: has joined #RubyOnRails
[18:44:29] bklane: has joined #RubyOnRails
[18:45:17] mostlybadfly: has joined #RubyOnRails
[18:46:00] cmckee: has joined #RubyOnRails
[18:48:41] titeiko: has joined #RubyOnRails
[18:49:38] mdw: has joined #RubyOnRails
[18:50:00] spyd3r: has joined #RubyOnRails
[18:50:15] musicnode: has joined #RubyOnRails
[18:51:06] barajasfab: has joined #RubyOnRails
[18:52:48] Swappticon: has joined #RubyOnRails
[18:52:58] lyoshajapan: has joined #RubyOnRails
[18:55:09] mephistophocles: has joined #RubyOnRails
[18:55:37] titeiko_: has joined #RubyOnRails
[18:56:23] manfrin: has joined #RubyOnRails
[18:56:24] Cervajz_: has joined #RubyOnRails
[18:58:04] mary5030: has joined #RubyOnRails
[18:58:55] mary5030_: has joined #RubyOnRails
[18:59:57] Cervajz__: has joined #RubyOnRails
[19:00:14] hobodave: has joined #RubyOnRails
[19:00:34] mary5030: has joined #RubyOnRails
[19:00:41] BhavyaM: has joined #RubyOnRails
[19:00:54] ferr: I need a daily calendar to display activities for 8 separate users which should be seen at single screen, any recommendations?
[19:06:00] teaearlgraycold: ferr: I'm using full calendar
[19:06:05] voidDotClass: has joined #RubyOnRails
[19:06:06] teaearlgraycold: It's got a lot of features
[19:06:27] teaearlgraycold: I pass it events using the gon gem
[19:06:52] voidDotClass: If you're trying to do Children.all.includes(:parent).order(parent.name, :asc), why doesn't that work?
[19:06:54] barhum2013: has joined #RubyOnRails
[19:07:05] voidDotClass: How can you get all children including their parent, sorted by parent's name?
[19:08:28] visudo: has joined #RubyOnRails
[19:10:44] ss_much: has joined #RubyOnRails
[19:10:48] ferr: teaearlgraycold: do you implement use fullcalendar gem or native lib?
[19:10:57] p8m_: has left #RubyOnRails: ()
[19:11:09] teaearlgraycold: I'm using gem 'fullcalendar-rails'
[19:11:55] barhum2013: has joined #RubyOnRails
[19:12:27] p8m: has joined #RubyOnRails
[19:12:28] smathy: voidDotClass, order("parents.name ASC").references(:parent)
[19:12:46] smathy: ...although maybe you wanted `joins` instead of `includes`
[19:12:56] n00bDev: has joined #RubyOnRails
[19:14:19] baweaver: has joined #RubyOnRails
[19:14:51] ferr: thanks teaearlgraycold
[19:15:38] bbrowning: has joined #RubyOnRails
[19:16:01] DoubleMalt: has joined #RubyOnRails
[19:17:30] USvER: has joined #RubyOnRails
[19:18:08] Detch: has joined #RubyOnRails
[19:18:51] apotry: has joined #RubyOnRails
[19:19:34] USvER: i have form with nested attributes for related items.
[19:20:02] USvER: How can i get this items in model before_save?
[19:20:14] USvER: I mean before they went into db?
[19:20:47] USvER: If i use relation i'm geting old items from db and not new items that user has passed
[19:20:47] smathy: USvER, by the time your before_save is called the in-memory objects should be populated.
[19:21:25] USvER: smathy, i was thouth so.. but in fact i see SQL statemt to get items from db
[19:21:34] sandstrom: has joined #RubyOnRails
[19:21:50] cmckee: has joined #RubyOnRails
[19:23:07] mikecmpbll: has joined #RubyOnRails
[19:23:53] smathy: USvER, !gist the models, controller and form involved
[19:23:53] helpa: USvER: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:25:44] fmcgeough: has joined #RubyOnRails
[19:26:02] crankharder: has joined #RubyOnRails
[19:26:22] USvER: smathy, sorry to bother you =\ i found problem
[19:26:29] smathy: USvER, np.
[19:26:38] USvER: smathy, i was using reverse on relation
[19:26:40] davidw: has joined #RubyOnRails
[19:27:08] nerium: has joined #RubyOnRails
[19:27:10] USvER: smathy, even though there is reverse on in-memory objects it uses database to order
[19:27:38] USvER: smathy, thanks for your help
[19:28:02] smathy: USvER, you're welcome.
[19:28:23] titeiko: has joined #RubyOnRails
[19:29:28] mary5030: has joined #RubyOnRails
[19:31:18] titeiko__: has joined #RubyOnRails
[19:35:31] Moeh_: has joined #RubyOnRails
[19:37:38] voidDotClass: if you have a map with label keys (e.g :foo), and you have user params so e.g params[:something] = 'foo', can you check if the map contains :foo?
[19:38:42] sandstrom: has joined #RubyOnRails
[19:39:30] Moeh_: has joined #RubyOnRails
[19:40:18] USvER: smathy, heh, i'm sorry problem still not solved
[19:40:43] USvER: smathy, i will prepare gist
[19:41:13] baweaver: has joined #RubyOnRails
[19:41:33] IrishGringo: has joined #RubyOnRails
[19:41:39] arup_r: has joined #RubyOnRails
[19:44:27] smathy: arup_r, FYI - the real issue was a little more involved: http://stackoverflow.com/a/35091347/152786
[19:44:46] srinidhi: has joined #RubyOnRails
[19:44:59] arup_r: let me read smathy
[19:45:34] USvER: smathy, https://gist.github.com/USvER/4004b6b31281c869dc85
[19:46:11] voidDotClass: if you have symbols as the keys of a hash, can you try to retrieve the values if you then look for strings?
[19:46:34] voidDotClass: e.g if you have {:foo => bar}, can you then do bar = my_hash['foo'] ?
[19:46:52] smathy: voidDotClass, map = hash, label = symbol and here are the docs for hashes: http://devdocs.io/ruby~2.2/hash
[19:47:13] voidDotClass: smathy, can you answer my specific q?
[19:47:19] naim___: has joined #RubyOnRails
[19:47:23] musicnode: has joined #RubyOnRails
[19:47:25] smathy: USvER, re-read what I asked for above.
[19:47:36] smathy: voidDotClass, I can, but I choose not to. Go learn Ruby instead.
[19:48:11] voidDotClass: smathy, no you can't
[19:48:21] titeiko: has joined #RubyOnRails
[19:48:25] voidDotClass: smathy: irb(main):001:0> foo = {bar: 'test'}
[19:48:25] voidDotClass: => {:bar=>"test"}
[19:48:25] voidDotClass: irb(main):002:0> foo[:bar]
[19:48:25] voidDotClass: irb(main):003:0> foo['bar']
[19:48:47] voidDotClass: and because 'params' have everything as strings, this wont work
[19:49:09] ur5us: has joined #RubyOnRails
[19:49:35] arup_r: voidDotClass: params can be accessed using symbol and strings.
[19:50:00] voidDotClass: arup_r, i have a param 'sort_col' whose value will be e.g 'name, email, etc'
[19:50:14] voidDotClass: and i have a hash containing whitelists of columns who are sortable
[19:50:27] voidDotClass: so i want to do sort = whitelist [ params[:sort_by]
[19:50:32] voidDotClass: so whitelist will have to have string keys
[19:51:16] smathy: voidDotClass, !rule7 - the rest of the rules are linked to in the /TOPIC
[19:51:16] helpa: voidDotClass: Anything more than 2 lines goes in a Gist (http://gist.github.com) or a Pastie (http://pastie.org). Spamming the channel with walls of text is not welcome.
[19:51:34] smathy: voidDotClass, also, when I said that I can I was answering your question of whether I could answer your specific question.
[19:52:22] smathy: voidDotClass, if you learnt some more ruby then you'd know how to find out what `params` actually is.
[19:52:42] yoongkang: has joined #RubyOnRails
[19:52:46] smathy: ...so you wouldn't be asking your question about a hash, let alone a "map" or "dict"
[19:53:01] kies^: has joined #RubyOnRails
[19:53:12] voidDotClass: smathy, i googled ruby map, and i got results about the map method
[19:53:18] voidDotClass: so i figured you guys call maps hashes
[19:53:27] Papierkorb: we don't have "maps"
[19:53:38] nerium: has joined #RubyOnRails
[19:53:41] treehug88: has joined #RubyOnRails
[19:55:02] smathy: voidDotClass, that makes absolutely no sense. If I google "ruby to_s" then I'll get results about the `to_s` method, so I should conclude that Ruby people call strings to_ss ?
[19:55:25] voidDotClass: smathy, umm, but strings are not called to_s, maps are maps
[19:56:25] Papierkorb: voidDotClass: We Don't Have "Maps". Check if the class exists.
[19:56:35] smathy: voidDotClass, "maps" has no meaning in Ruby, `map` is a method name, not really sure what point you think you're making.
[19:56:56] voidDotClass: i forgot i'm talking to sixth grades aka ruby coders
[19:57:16] voidDotClass: I'm kidding, sorry
[19:57:16] smathy: Oh fuck off.
[19:57:20] smathy: +b *!~ali@115.167.66.222
[19:57:20] smathy: smathy kicked voidDotClass: enough now.
[19:57:22] smathy: -o smathy
[19:58:36] FernandoBasso: has joined #RubyOnRails
[20:02:07] gbgdev: has joined #RubyOnRails
[20:02:59] Bloodberet: has joined #RubyOnRails
[20:03:44] jtong_: has joined #RubyOnRails
[20:04:51] titeiko_: has joined #RubyOnRails
[20:05:12] arup_r: haha.. no one knows, what will happen, how and when .. :)
[20:05:25] blackmes1: has joined #RubyOnRails
[20:07:20] gbgdev: has joined #RubyOnRails
[20:10:16] doublemalt_: has joined #RubyOnRails
[20:11:43] piotrj: has joined #RubyOnRails
[20:12:02] barhum2013: What would be the easiest way to implement a a small secondary screen for customer feedback after a transaction in a rails app? We have built a POS system in rails and would like to get user feedback on a secondary small screen.
[20:12:25] titeiko: has joined #RubyOnRails
[20:13:10] titeiko__: has joined #RubyOnRails
[20:15:23] arup_r: after a transaction means ? something sell/buy kind of ?
[20:15:47] mmealling: has joined #RubyOnRails
[20:15:57] barhum2013: yes after a sale
[20:16:17] titeiko__: has joined #RubyOnRails
[20:16:34] arup_r: you can redirect the user to a review page, where you will ask the question in a form ?
[20:16:58] Papierkorb: barhum2013: is that a completely separate screen (and/or computer)?
[20:17:07] barhum2013: The main screen is the cashiers view/computer
[20:17:22] barhum2013: we would like to redirect it to a smaller secondary touch screen
[20:17:32] barhum2013: maybe a tablet or such.
[20:17:48] barhum2013: I feel like writing a mobile app is the only way
[20:17:54] arup_r: so you will buy in one screen and feedback from other device ?
[20:18:14] barhum2013: we sell in one screen and customer feeeback from other device
[20:18:18] mmealling: I am overriding ActiveRecord's find() but I would still like to call find_with_ids() which is defined as protected in ActiveRecord::FinderMethods. But every time I do (with or without self.) I get undefined method. Is there a way to call protected methods from my Model?
[20:18:18] Papierkorb: barhum2013: 'redirect' as in "there's a second (as in completely separate) screen for the customer only, who will see his/her own version of what the cashier sees" ?
[20:18:30] sandstrom: has joined #RubyOnRails
[20:18:52] smathy: barhum2013, you're using terms like "redirect" which have a very well defined meaning in the world of web, but you're using that word to talk about something entirely different like the transaction initiated from one computer triggering some event on a different computer/tablet. It's very confusing what you want.
[20:19:23] barhum2013: Papierkorb: that is correct.
[20:20:16] centrx: has joined #RubyOnRails
[20:20:41] Papierkorb: barhum2013: sounds like you want to connect both web browsers with WebSockets, so you can push a 'show this now' to one of the screens when on the other screen something happened. Rails5 (but it's in beta currently) has something for that built-in
[20:21:10] barhum2013: smathy: Sorry about that, I know that redirect means a completely different thing in rails. We would like to get customer input from a secondary screen.
[20:21:34] Papierkorb: barhum2013: Where it's called "ActionCable". If you need something 'right now', you can look at Faye with its websockets module, which afaik action cable uses under the hood (or at least borrows from)
[20:21:45] MissionCritical: has joined #RubyOnRails
[20:22:34] barhum2013: Papoerkorb: That might work, as long as I keep the browser open. Thanks
[20:22:56] Papierkorb: barhum2013: The biggest 'issue' is to pair both devices. But nothing some authentication-based setup can't solve.
[20:24:04] barhum2013: Papierkorb: Maybe a simple mobile app that receives requests from the rails app and responds would work better.
[20:24:35] jkamenik: has joined #RubyOnRails
[20:24:44] Papierkorb: barhum2013: if you have the experience in your team to build an app, it could work. Doing everything 'in rails' may keep the technology stack smaller, so it's worth considering I think
[20:24:58] smathy: barhum2013, there you go again, "request" has a specific meaning. You will want an open websocket or a polling of some sort from the app/browser on the other device to your server.
[20:27:10] barhum2013: smathy: Got it, thanks for the info.
[20:27:35] barhum2013: Papierkorb: thanks for the advice!
[20:28:51] Papierkorb: barhum2013: I interpreted your 'request to the app' in a way where your server sends a HTTP request to your app, for which it would need to have a HTTP server running. Which sounds overkill, but if you have some 'kinda-special' requirements, a WebHook (Which this essentially would be) may be reasonable; But this wouldn't be my initial solution in general
[20:30:18] futilegames: has joined #RubyOnRails
[20:31:55] taxen: has joined #RubyOnRails
[20:32:26] the_drow_mobile: has joined #RubyOnRails
[20:33:38] brycesenz: has joined #RubyOnRails
[20:33:38] sneakerhax: has joined #RubyOnRails
[20:34:13] baweaver: has joined #RubyOnRails
[20:35:32] IrishGringo: has joined #RubyOnRails
[20:35:36] sandstrom: has joined #RubyOnRails
[20:37:39] pulgalipe: has joined #RubyOnRails
[20:37:53] barhum2013: Papierkorb: I would look into setting it up as a WebHook. Thanks
[20:38:26] baweaver: has joined #RubyOnRails
[20:38:52] Papierkorb: barhum2013: Please bear in mind that I wouldn't suggest this being the ideal solution. I can't say "I wouldn't recommend doing so", but if you're looking to use rails for that, WebSockets is probably a much easier-to-use solution
[20:39:29] taxen: I'm trying to setup an Avatar model that will have a carrierwave uploader mounted to it. The avatar will be shared by both a User model and a Team model, but I can't work out what the relationships should be. Any suggestions?
[20:40:23] safety_cut: has joined #RubyOnRails
[20:41:28] reber: has joined #RubyOnRails
[20:41:50] webdestroya: has joined #RubyOnRails
[20:42:05] noodman: has joined #RubyOnRails
[20:42:16] lemur: has joined #RubyOnRails
[20:42:27] arup_r: polymorphism taxen
[20:42:55] iliketurtles: has joined #RubyOnRails
[20:43:12] arup_r: ok, one min.. what do you mean by shared ?
[20:44:33] mordof_work: has joined #RubyOnRails
[20:44:43] taxen: arup_r: both user and team should have an avatar. I was first thinking something along the lines where Avatar would have both belongs_to :user and belongs_to :team, but that's not really the right way, is it?
[20:45:14] arup_r: taxen: ok make your Avatar model polymorphic then
[20:45:29] arup_r: open rails guide and you will see the syntax to set up this.
[20:45:35] arup_r: taxen: you are close :)
[20:46:09] smathy: http://guides.rubyonrails.org/association_basics.html#polymorphic-associations <-- taxen
[20:46:38] jtong: has joined #RubyOnRails
[20:47:13] taxen: that's it! thanks guys! smathy arup_r
[20:47:41] smathy: It was all arup_r .
[20:48:46] ql6wlld: has joined #RubyOnRails
[20:49:20] Cohedrin: has joined #RubyOnRails
[20:49:30] Aherin: has joined #RubyOnRails
[20:50:21] enkristoffer: has joined #RubyOnRails
[20:50:25] baweaver: has joined #RubyOnRails
[20:50:41] IrishGringo: has joined #RubyOnRails
[20:50:54] jtong: has joined #RubyOnRails
[20:52:59] sandstrom: has joined #RubyOnRails
[20:53:35] cmckee: has joined #RubyOnRails
[20:53:36] tfittsy: I'm trying to debug some capybara tests with js/webkit and pry and whenever I call #page within binding.pry my tests lock up. If I just let them run straight through the page object can be called and processed. Anyone have any ideas why this would be?
[20:53:38] titeiko: has joined #RubyOnRails
[20:54:18] arup_r: tfittsy: I use sav_screenshot and save_page methpds
[20:54:33] arup_r: to checkout the dom and rendered pages..
[20:55:04] lacrymology: has joined #RubyOnRails
[20:55:34] tfittsy: arup_r: yeah, I can do puts page.html to see dom, it's just weird I can't do anything with it. I'm positive when I started doing capybara it let me do it with no problem. Wondering if it could be because of webkit or something else.
[20:59:00] guacamole: has joined #RubyOnRails
[20:59:45] davidw: mmmm what's << call in ActiveRecord? Foo.bars << Bar.new for instance
[21:00:17] arup_r: it is `#concat` aka `#<<`
[21:00:37] hobodave: has joined #RubyOnRails
[21:00:45] Papierkorb: davidw: what's #bars ? an array? A has_many relation?
[21:00:55] meoblast001: has joined #RubyOnRails
[21:00:58] davidw: I'm trying to figure out the vagaries of validates_associated .... the object is saved to the DB - but it's not valid :-/
[21:01:05] davidw: Papierkorb, has_many
[21:01:36] Hans267: has joined #RubyOnRails
[21:03:01] futilegames: has joined #RubyOnRails
[21:03:04] arup_r: davidw: Adds one or more objects to the collection by setting their foreign keys to the collection???s primary key. Note that this operation **instantly fires update SQL without waiting for the save or update call on the parent object**, unless the parent object is a new record.
[21:03:12] arup_r: http://apidock.com/rails/v4.2.1/ActiveRecord/Associations/ClassMethods/has_many
[21:03:18] greenhat: TIL the hard way if you call two different controller actions in a controller test any ivars set in the first action are still set in the second action.
[21:03:42] greenhat: Apparently a new controller instance isn't used for each action. Doh.
[21:04:17] Cervajz_: has joined #RubyOnRails
[21:05:22] titeiko_: has joined #RubyOnRails
[21:05:42] davidw: hrm.... good call, arup_r, thanks. Hrm...
[21:05:51] moei: has joined #RubyOnRails
[21:06:34] arup_r: davidw: spent many hours on the same trap, that is why I know it.. :p
[21:06:54] lxsameer: has joined #RubyOnRails
[21:06:54] lxsameer: has joined #RubyOnRails
[21:08:26] yoongkang: has joined #RubyOnRails
[21:09:31] baak: has joined #RubyOnRails
[21:09:39] mordof_work: has joined #RubyOnRails
[21:10:13] sandstrom: has joined #RubyOnRails
[21:11:46] joshsmith: has joined #RubyOnRails
[21:13:44] apotry: has joined #RubyOnRails
[21:14:08] tvw: has joined #RubyOnRails
[21:14:44] Cohedrin: has joined #RubyOnRails
[21:14:56] jtong: has joined #RubyOnRails
[21:14:58] Swappticon: has joined #RubyOnRails
[21:15:07] mmealling: ActiveRecord::FinderMethods defines a protected method: find_with_ids which is called by find() which is what's included in ActiveRecord::Base. If I have a Model shouldn't I be able to call self.send(:find_with_ids, [])?
[21:15:19] chouhoulis: has joined #RubyOnRails
[21:16:18] matthewd: mmealling: Why would you want to do that?
[21:16:23] namxam: has joined #RubyOnRails
[21:17:06] arup_r: create your own wrapper, don't mess with core one's..
[21:17:08] mmealling: because I'm overriding find() but I still want it to behave as normally as possible by using the methods the normal find() method calls.
[21:17:13] jtong: has joined #RubyOnRails
[21:17:13] smathy: greenhat, nasty.
[21:17:50] tenderlove: has joined #RubyOnRails
[21:18:02] arBmind: has joined #RubyOnRails
[21:19:01] matthewd: mmealling: While I'd recommend against overriding find, you should be able to use super to call the original
[21:19:14] matthewd: At least that way you're still working with public API
[21:19:16] mmealling: even though find_with_ids is protected?
[21:19:27] herbst: has joined #RubyOnRails
[21:19:33] kies^: has joined #RubyOnRails
[21:21:16] jtong_: has joined #RubyOnRails
[21:21:48] titeiko: has joined #RubyOnRails
[21:23:37] andchar: has joined #RubyOnRails
[21:24:36] Spami: has joined #RubyOnRails
[21:25:10] namxam_: has joined #RubyOnRails
[21:26:00] nerium: has joined #RubyOnRails
[21:26:42] alex88: has joined #RubyOnRails
[21:27:25] sandstrom: has joined #RubyOnRails
[21:27:35] braincrash: has joined #RubyOnRails
[21:29:15] mmealling: huh... yea. OK. moving on. Woot!
[21:30:23] mmealling: (my Models are cached versions of objects in a remote SaaS system. I want the system to work even if that SaaS system is down. after_find callback works for everything except when an object exists in that SaaS service so if find() fails I go check the backend to see if it exists)
[21:30:31] Craigimus: has joined #RubyOnRails
[21:30:40] yfeldblum: has joined #RubyOnRails
[21:39:48] agit0: has joined #RubyOnRails
[21:41:42] tubbo: mmealling: it would be a lot easier to leave the AR methods as-is and use your own methods to delegate to them
[21:41:49] TDJACR: has joined #RubyOnRails
[21:42:16] tubbo: because if rails changes the internal API for this stuff, it can be hard to upgrade your app later on
[21:42:26] mmealling: tubbo, which requires the caller to never use find() but have to use my_custom_find().
[21:42:44] mdw: has joined #RubyOnRails
[21:43:28] mmealling: but if they did use find() I would have no way to prevent it and thus I'd have a caller doing dangerous things thinking it was 'OK'.
[21:43:56] mmealling: (luckily the API only has lookup by ID so I don't need to override where() or anything truly crazy)
[21:44:09] tubbo: mmealling: that's definitely a concern if this is a library you're releasing or something, and you expect people who aren't you to be using these objects.
[21:44:42] matthewd: something something composition over inheritance
[21:44:43] sandstrom: has joined #RubyOnRails
[21:44:47] mmealling: given my ability to forget stuff I'm assuming the version of me six months from now will be as clueless as someone who isn't me doing the same thing.
[21:45:15] arpegius: has joined #RubyOnRails
[21:45:17] tubbo: hmm, well imho the juice isn't worth the squeeze.
[21:45:53] Maletor: has joined #RubyOnRails
[21:46:10] arpegius: Any speculation as to why ActionMailer views don???t get the full digested image path on production the way that normal controller views do?
[21:46:37] musicnode: has joined #RubyOnRails
[21:46:37] pulgalipe: has joined #RubyOnRails
[21:47:33] matthewd: mmealling: My recommended strategies would be: 1) very obviously separate API (e.g., different classes/modules), which happens to use some AR objects behind the scenes; 2) define a new method, and try making find private; 3) override find and then call super (*not* the private methods find's implementation uses)
[21:49:40] baak: has joined #RubyOnRails
[21:50:54] mmealling: API is already a separate gem. This engine multiplexes data from either the local database or that backend. So I'm at least separating concerns. #3 is essentially what I'm doing. The reason I'm using find_with_ids is that find() is the only finder that takes an array so I need to preserve that. It appears to be mostly working now.
[21:51:26] chipotle: has joined #RubyOnRails
[21:51:43] FooMunki: has joined #RubyOnRails
[21:52:51] matthewd: mmealling: I don't know how many more times I can say "call super"
[21:53:10] cmckee: has joined #RubyOnRails
[21:53:52] mmealling: matthewd, yep, that's what I'm doing....
[21:54:11] ur5us: has joined #RubyOnRails
[21:54:14] matthewd: Then why the mention of find_with_ids ?
[21:54:24] yfeldblum: has joined #RubyOnRails
[21:54:30] mmealling: sorry, meant find()
[21:54:35] mmealling: super.find() that is....
[21:55:05] matthewd: That sounds wrong
[21:55:11] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:56:00] duncannz: has joined #RubyOnRails
[21:56:35] duncannz: has joined #RubyOnRails
[21:58:45] mmealling: https://gist.github.com/SeraphAdmin/2714d1ed256beaaf4703
[21:59:29] nerium: has joined #RubyOnRails
[22:02:04] sandstrom: has joined #RubyOnRails
[22:02:32] uris: has joined #RubyOnRails
[22:04:04] musicnode: has joined #RubyOnRails
[22:04:21] matthewd: mmealling: Yeah.. that's not how super works
[22:05:12] qbar: has joined #RubyOnRails
[22:05:35] hobodave: has joined #RubyOnRails
[22:05:54] FooMunki: has joined #RubyOnRails
[22:07:55] K1SWR: has left #RubyOnRails: ()
[22:08:00] dopamean_: has joined #RubyOnRails
[22:09:01] mmealling: matthewd, so what's the right way to let the default behavior occur but catch the exception and deal with it in find()?
[22:11:24] mmealling: oh duh.... just like I have it in the if/end above.
[22:11:48] matthewd: Meanwhile, the formatting here is making my eyes bleed
[22:12:28] matthewd: Which doesn't matter if it's just for you, but as an FYI if other people are going to work on it: it doesn't look like Ruby-as-it-is-written.
[22:13:10] mmealling: this is the proof of concept. Now I clean it up and setup the rest of the Models.
[22:13:23] mmealling: thanks for the help!
[22:13:46] mmealling: and remove all of the debug lines...
[22:13:57] yoongkang: has joined #RubyOnRails
[22:19:03] k13nox: has joined #RubyOnRails
[22:19:13] sandstrom: has joined #RubyOnRails
[22:20:02] solars: has joined #RubyOnRails
[22:20:42] Coldblackice: has joined #RubyOnRails
[22:20:47] jottr_: has joined #RubyOnRails
[22:21:10] baak: has left #RubyOnRails: ()
[22:21:37] nfk: has joined #RubyOnRails
[22:21:38] solars: has joined #RubyOnRails
[22:24:14] duncanm: has joined #RubyOnRails
[22:24:58] duncanm: has joined #RubyOnRails
[22:25:00] blackmes1: has joined #RubyOnRails
[22:26:22] baak1: has joined #RubyOnRails
[22:27:45] mordof_work: has joined #RubyOnRails
[22:28:28] jtong: has joined #RubyOnRails
[22:29:00] arpegius: has joined #RubyOnRails
[22:32:28] mary5030: has joined #RubyOnRails
[22:32:52] qejk: has joined #RubyOnRails
[22:33:24] titeiko_: has joined #RubyOnRails
[22:33:41] Pulp: has joined #RubyOnRails
[22:37:33] uris: has joined #RubyOnRails
[22:38:16] jgt1: has joined #RubyOnRails
[22:38:51] jtong_: has joined #RubyOnRails
[22:38:52] jo_mo: has joined #RubyOnRails
[22:39:10] arpegius: has joined #RubyOnRails
[22:41:11] yfeldblum: has joined #RubyOnRails
[22:41:12] piotrj: has joined #RubyOnRails
[22:41:34] jo_mo: Hello, I think I have some issues with utf8mb4 in production. It's working fine locally, even when using production env, but on the prod machine I get 'Mysql2::Error: Specified key was too long; max key length is 767 bytes'. I'm using rails 4.2-stable. Any idea why that's happening?
[22:41:46] nerium: Radar: Good work on gettig the PR merged
[22:42:07] dexter_: has joined #RubyOnRails
[22:42:09] nerium: Radar: Running the fix in production without any problems
[22:43:19] matthewd: jo_mo: Your specified key's length exceeds 767 bytes?
[22:43:27] ElFerna_: has joined #RubyOnRails
[22:43:48] matthewd: More seriously.. you're definitely using utf8mb4 locally too?
[22:43:57] jo_mo: matthewd: yes, it's a common issue with migrations and mysql using utf8mb4. Yes I definitely am
[22:44:29] matthewd: Oh, I think I saw recently that some combination of sufficiently recent MySQL and certain config settings may permit longer values?
[22:45:24] jo_mo: I specifically used 4-2-stable because it has backported support for utf8mb4. Hmm, I set my.cnf to use utf8mb4 wherever possible, but rails shouldn't try to create keys longer than what's allowed
[22:47:19] matthewd: https://github.com/rails/rails/pull/23009#issuecomment-171099131
[22:47:58] matthewd: (it sounds like you're already familiar with why the error would occur, so that might help explain why it didn't happen locally)
[22:49:22] k13nox_: has joined #RubyOnRails
[22:49:38] arpegius: has joined #RubyOnRails
[22:50:32] jo_mo: matthewd: I indeed have 5.7 locally and 5.5 on prod, thanks!
[22:50:35] duderonomy: has joined #RubyOnRails
[22:58:23] duncannz: has joined #RubyOnRails
[22:59:20] atmosx: has joined #RubyOnRails
[22:59:49] arpegius: has joined #RubyOnRails
[23:00:28] safety_cut: has joined #RubyOnRails
[23:01:22] titeiko: has joined #RubyOnRails
[23:02:53] sonofdirt: has joined #RubyOnRails
[23:04:02] titeiko__: has joined #RubyOnRails
[23:04:47] mostlybadfly: has joined #RubyOnRails
[23:05:26] baweaver: has joined #RubyOnRails
[23:09:35] mary5030_: has joined #RubyOnRails
[23:10:11] arpegius: has joined #RubyOnRails
[23:10:19] piotrj: has joined #RubyOnRails
[23:11:04] uri___: has joined #RubyOnRails
[23:13:00] visudo: has joined #RubyOnRails
[23:14:21] superlou: has joined #RubyOnRails
[23:17:05] cmckee: has joined #RubyOnRails
[23:19:54] titeiko: has joined #RubyOnRails
[23:20:33] arpegius: has joined #RubyOnRails
[23:20:43] tfittsy: I'm running some acceptance tests with capybara and in an API response I keep getting a transient TypeError (can't dup NilClass): while trying to serialize the response. Every time I interrupt the response with a binding.pry to investigate the error goes away.
[23:20:58] herbst: has joined #RubyOnRails
[23:23:39] futilegames: has joined #RubyOnRails
[23:25:12] sandstrom: has joined #RubyOnRails
[23:25:14] one_zero: has joined #RubyOnRails
[23:26:35] uris: has joined #RubyOnRails
[23:26:52] pulgalip1: has joined #RubyOnRails
[23:28:37] smathy: arpegius, although I don't know how it was supposed to work, it *does* make sense not to use the fingerprint in email because once the mail is sent it can't be changed, so with a later release and a changed fingerprint the email would no longer be able to find the old asset.
[23:29:06] tparenti: has joined #RubyOnRails
[23:30:15] pulgalip1: has joined #RubyOnRails
[23:30:50] arpegius: has joined #RubyOnRails
[23:31:41] titeiko_: has joined #RubyOnRails
[23:33:17] titeiko__: has joined #RubyOnRails
[23:34:16] k13nox: has joined #RubyOnRails
[23:38:23] robbyoconnor: has joined #RubyOnRails
[23:39:55] titeiko: has joined #RubyOnRails
[23:41:13] arpegius: has joined #RubyOnRails
[23:42:19] sandstrom: has joined #RubyOnRails
[23:48:33] spyd3r: has joined #RubyOnRails
[23:49:55] pawnbox: has joined #RubyOnRails
[23:50:04] titeiko_: has joined #RubyOnRails
[23:51:36] arpegius: has joined #RubyOnRails
[23:52:43] jhack: has joined #RubyOnRails
[23:53:25] titeiko: has joined #RubyOnRails
[23:56:04] ur5us: has joined #RubyOnRails
[23:56:49] dopamean1: has joined #RubyOnRails
[23:56:53] codelahoma_: has joined #RubyOnRails
[23:57:51] robbyoconnor: has joined #RubyOnRails
[23:58:21] htmldrum_: has joined #RubyOnRails
[23:59:06] it_tard: has joined #RubyOnRails
[23:59:08] nerium_: has joined #RubyOnRails
[23:59:24] ql6wlld_: has joined #RubyOnRails
[23:59:58] sandstrom: has joined #RubyOnRails