« Back to channel list

#RubyOnRails - 18 November 2015

« Back 1 day Forward 1 day »
[00:03:00] mary5030: has joined #RubyOnRails
[00:04:07] Radar: Well, the compromise would be something like me becoming a consultant for 3-4 days a week and then spending time on whatever else I want to outside of that.
[00:04:37] Radar: The issue with doing that is that I would need to manage a lot of my own consulting things, like finding work, accounting (BORRRRINGGGG) and keeping everyone happy.
[00:04:47] Aeyrix: yeah lame
[00:05:03] Radar: although on the accounting side of things I've gotten a lot better. This tax year is the first one that I've been keeping receipts for everything that comes through.
[00:05:06] gavit: going crazy with all these quotes
[00:05:23] Aeyrix: Radar: What're you using?
[00:05:31] lacrymology: what's the right way to make sure a username is never modified?
[00:05:36] Radar: They all go into a folder on dropbox and then I can print them out and take them to my accountant who goes "hmmmmmmmm" for quite a while and then it all works.
[00:05:45] Aeyrix: Yeah that's pretty much how I did it.
[00:05:48] gambl0re: has joined #RubyOnRails
[00:05:49] Aeyrix: Family accountant wew
[00:05:55] Aeyrix: Except now I moved so I don't have one anymore. ;_
[00:06:06] riotjones: has joined #RubyOnRails
[00:06:07] Radar: Aeyrix: H&R Block did a good job this year for me.
[00:06:50] gavit: how do I remove the " of the string? https://gist.github.com/gavit/27b6090a1f3a46ad7730
[00:06:53] notnoyyyyy: has joined #RubyOnRails
[00:07:15] Aeyrix: gavit: ... what?
[00:07:28] Aeyrix: Radar: I don't need one anymore right now, only if I go ahead with my "church" :^)
[00:07:31] Radar: Aeyrix: It's literally a folder on Dropbox called Tax, broken down by FY, then in each of that I have the companies that invoice me and then one more folder for "Office Supplies"
[00:07:33] yogeshrt: has joined #RubyOnRails
[00:07:39] Aeyrix: That's pretty much how I did it yeah.
[00:08:00] Aeyrix: I had an advantage that a lot of mine was through Paypal so I had that as an authoritative source as well.
[00:08:09] Aeyrix: Paypal is surprisingly good for things like that if you use the merchant / invoicing functionality.
[00:08:43] gavit: Aeyrix: I have list of points, and I want to display them in googlemaps
[00:09:04] Radar: gavit: Point to the " in that gist.
[00:09:14] failasLStoRM: has joined #RubyOnRails
[00:09:15] matthewd: gavit: @land_survey.googlemaps is an array, but you're treating it like a string
[00:09:15] Radar: Click on a line.
[00:09:17] Radar: It will highlight it.
[00:09:30] Radar: matthewd: Good point.
[00:10:06] gavit: Aeyrix: this is what I want: https://gist.github.com/gavit/27b6090a1f3a46ad7730#file-desired_output-html-L2
[00:10:09] htmldrum: has joined #RubyOnRails
[00:10:10] matthewd: But you'd probably be better losing the strings entirely, making hashes, then JSONifying them at the boundary, I suspect
[00:10:40] goldbug: has joined #RubyOnRails
[00:11:20] gavit: matthewd: why would a hash be better than the array?
[00:11:42] gavit: I thought a hash was important if you needed 'keys'
[00:11:55] matthewd: Not the array -- the string https://gist.github.com/gavit/27b6090a1f3a46ad7730#file-model-rb-L5
[00:12:28] shinnya: has joined #RubyOnRails
[00:12:30] roxtrongo: has joined #RubyOnRails
[00:12:47] smathy: gavit, you're pushing a string into the array, and then wondering why you get an array of strings: https://gist.github.com/gavit/27b6090a1f3a46ad7730#file-model-rb-L5
[00:12:51] gavit: matthewd: lat => point.x?
[00:13:00] nickjj: Radar, i use a box too but it's a shoebox
[00:13:04] K_r3aPeR_: has joined #RubyOnRails
[00:13:08] Radar: nickjj: hah
[00:13:11] gavit: smathy: not wondering why, just wondering on how to 'solve it'
[00:13:25] smathy: gavit, do you know how to make a hash in Ruby?
[00:13:29] gavit: smathy: I understand why they are there, just can't think how to get them out
[00:13:29] jessemcgilallen: has joined #RubyOnRails
[00:13:39] gavit: smathy: Hash.new
[00:13:55] adaedra: there's shorter.
[00:13:58] dnewkerk: has joined #RubyOnRails
[00:14:14] ciopte7: has joined #RubyOnRails
[00:14:24] matthewd: gavit: The short answer is you want a join on https://gist.github.com/gavit/27b6090a1f3a46ad7730#file-view-html-erb-L2
[00:14:52] gavit: matthewd: thanks
[00:14:54] matthewd: gavit: But yes, the IMO neater option would be to change the push to a hash {lat: google_point.y, lng: google_point.x}
[00:15:05] smathy: matthewd, huh?
[00:15:29] gavit: matthewd: what would be the point of that hash?
[00:15:30] matthewd: Then in the ERb, do <%= raw @land_survey.googlemaps.to_json %>
[00:15:53] gavit: ACTION is gonna look up raw and to_json
[00:16:00] matthewd: smathy: Which part?
[00:16:22] smathy: matthewd, it's ok, I lost interest at Hash.new ;)
[00:16:43] flip_digits: has joined #RubyOnRails
[00:16:51] smathy: (I meant your comment about wanting a join, FWIW)
[00:17:23] matthewd: It's currently an array of JS-objects-as-strings.. I think
[00:18:15] matthewd: Which strikes me as something that can certainly work, but seems to muddle the boundary more than necessary
[00:19:44] baweaver: has joined #RubyOnRails
[00:21:22] stannard: has joined #RubyOnRails
[00:22:23] arooni: has joined #RubyOnRails
[00:22:50] arooni: has joined #RubyOnRails
[00:23:38] shaileshg: has joined #RubyOnRails
[00:23:53] pawnbox: has joined #RubyOnRails
[00:26:32] rgrmatt: has joined #RubyOnRails
[00:26:49] pwnd_nsfw: has joined #RubyOnRails
[00:28:12] njero: has joined #RubyOnRails
[00:29:25] annlewis: has joined #RubyOnRails
[00:30:40] judetucker: has joined #RubyOnRails
[00:34:04] ewnd9_: has joined #RubyOnRails
[00:35:22] sevenseacat: has joined #RubyOnRails
[00:35:26] jetpackjoe: has joined #RubyOnRails
[00:40:26] stannard: has joined #RubyOnRails
[00:42:31] diegoviola: has joined #RubyOnRails
[00:43:25] colleenmcguckin: has joined #RubyOnRails
[00:45:13] rgrmatt: has joined #RubyOnRails
[00:45:39] DLSteve: has joined #RubyOnRails
[00:45:41] gregf_: has joined #RubyOnRails
[00:50:09] colleenmcguckin: has joined #RubyOnRails
[00:51:29] RegulationD: has joined #RubyOnRails
[00:53:02] uri: has joined #RubyOnRails
[00:54:26] gwiz: I'm (trying to) add a select list to my form, but for some reason it does not update the record with the selected value. https://gist.github.com/RobvanB/61eab9f02ffabd91f8e1#file-_form-html-erb
[00:54:39] gwiz: I'm sure I'm missing something basic - but I can't figure it out
[00:55:49] sevenseacat: typically you would just pass your options to f.select
[00:56:12] sevenseacat: but that looks like it should work - what kind of code do you have to handle the form, in the controller?
[00:56:19] smathy: gwiz, strong params?
[00:56:39] sevenseacat: yeah thats what I'm thinking
[00:56:41] Glyphik: has joined #RubyOnRails
[00:57:48] symbol: has joined #RubyOnRails
[00:57:53] gwiz: the controller is pretty much generated by scaffold - is has strong params
[00:57:59] gwiz: want me to post it in a gist ?
[00:57:59] Radar: gwiz: Show us the controller please.
[00:58:07] Radar: gwiz: You can edit the original gist.
[00:58:23] smathy: gwiz, may as well include the logs of the POST request.
[00:58:36] symbol: I've just hopped on a new project and instead of using devise, they implement their own session controllers with omniauth gems. While they're using the gems, isn't that still pretty meh to be rolling their own session control?
[00:59:02] gwiz: Projects controller: https://gist.github.com/RobvanB/50fa38c451b147ca53e3#file-projects_controller-rb
[00:59:23] gwiz: I think I just got it :)
[00:59:36] gwiz: wrong field name in params
[00:59:53] Radar: attribute names in Rails should be snake_cased
[01:00:04] one_zero: has joined #RubyOnRails
[01:00:05] Aeyrix: snake_snaaaake_snake
[01:00:20] gwiz: yup yup yup.... you all rock... thanks for the tip!
[01:00:36] rgtk: has joined #RubyOnRails
[01:01:26] theblang: has joined #RubyOnRails
[01:01:28] sevenseacat: Aeyrix: badger_badger_badger?
[01:02:26] rgtk: has joined #RubyOnRails
[01:03:18] northfurr: has joined #RubyOnRails
[01:03:32] pawnbox: has joined #RubyOnRails
[01:06:17] rgtk_: has joined #RubyOnRails
[01:06:17] Aeyrix: sevenseacat: :D
[01:06:52] riotjones: has joined #RubyOnRails
[01:08:11] rgtk: has joined #RubyOnRails
[01:10:01] rgtk: has joined #RubyOnRails
[01:11:55] rgtk: has joined #RubyOnRails
[01:12:41] threeminutemonta: has joined #RubyOnRails
[01:12:44] pontiki: not a rails question, but most everyone has a mac; i used to be able to get keys to repeat just by holding them down. now it pops up a menu to select alternate letters.
[01:12:52] pontiki: anyone know what's going on??
[01:13:11] yoongkang: has joined #RubyOnRails
[01:13:12] adaedra: that's since I-don't-remember-which-OS-X
[01:13:35] stannard_: has joined #RubyOnRails
[01:13:52] rgtk: has joined #RubyOnRails
[01:13:52] annlewis: has joined #RubyOnRails
[01:13:58] pontiki: yeah, there was a way to fix it and i can't remember how
[01:14:21] pontiki: keyboard repeat was working before i upgraded to el cap
[01:14:43] sevenseacat: that pop up thing annoys the crap out of me
[01:15:15] smathy: pontiki, defaults write -g ApplePressAndHoldEnabled -bool false
[01:15:30] pontiki: ta, smathy
[01:15:31] rgtk: has joined #RubyOnRails
[01:15:48] smathy: One of those "how do I even google this" things.
[01:15:57] Aeyrix: "Disable accents popup OS X"
[01:15:58] adaedra: "OS X key repeat"
[01:16:06] adaedra: That worked for me.
[01:16:16] Aeyrix: Mine for me, too.
[01:16:51] sevenseacat: yeah I never cared enough to google it ;)
[01:16:57] adaedra: Need to re-launch programs tho.
[01:17:09] adaedra: iirc, JetBrains' IDEs offer to set it at first launch.
[01:17:11] pontiki: brilliant, smathy , that did it
[01:17:31] smathy: pontiki, I only just upgraded the other day, so very fresh in my mind.
[01:18:19] pontiki: oh, jetbrains changes it? i installed the upgrades at the same time as el cap -- maybe that's how it got reset
[01:18:56] adaedra: It asks to change it
[01:19:15] smathy: pontiki, I think it was el cap
[01:20:04] adaedra: It's a shame there's no checkbox anywhere for it.
[01:20:09] IrishGringo: has joined #RubyOnRails
[01:20:38] kies: has joined #RubyOnRails
[01:21:48] Scriptonaut: has left #RubyOnRails: ()
[01:22:01] stannard: has joined #RubyOnRails
[01:23:41] nettoweb: has joined #RubyOnRails
[01:23:45] bruce_lee: has joined #RubyOnRails
[01:24:04] bruce_lee: has joined #RubyOnRails
[01:25:10] moring: has joined #RubyOnRails
[01:26:06] SanguineAnomaly: has joined #RubyOnRails
[01:26:54] rgrmatt: has joined #RubyOnRails
[01:32:37] trosborn: has joined #RubyOnRails
[01:33:06] northfurr: has joined #RubyOnRails
[01:35:41] colleenmcguckin: has joined #RubyOnRails
[01:36:07] craysiii: has joined #RubyOnRails
[01:41:17] RegulationD: has joined #RubyOnRails
[01:41:56] dideler: has joined #RubyOnRails
[01:42:52] FailBit: >using a mac
[01:42:58] FailBit: ACTION gets kicked
[01:44:26] colleenmcguckin: has joined #RubyOnRails
[01:48:11] rakm: has joined #RubyOnRails
[01:51:11] Rodya_: has joined #RubyOnRails
[01:52:27] beneggett: has joined #RubyOnRails
[01:54:47] shibabu: has joined #RubyOnRails
[01:57:02] roxtrongo: has joined #RubyOnRails
[01:58:20] joshkovach: has joined #RubyOnRails
[02:00:13] baweaver: has joined #RubyOnRails
[02:01:13] Fire-Dragon-DoL: has joined #RubyOnRails
[02:01:47] roxtrongo: has joined #RubyOnRails
[02:01:53] livecano: has joined #RubyOnRails
[02:04:35] moei: has joined #RubyOnRails
[02:05:47] roxtrongo: has joined #RubyOnRails
[02:07:32] riotjones: has joined #RubyOnRails
[02:09:04] roxtrongo: has joined #RubyOnRails
[02:09:34] owenjones: has joined #RubyOnRails
[02:12:04] Fire-Dragon-DoL: I need an opinion, I have a rails app where a given record (an Organization), based on some fields might turn into an "irregular" organization, in that case, I will need to update all the Hikes for that organization and turn them into "irregular" since they don't have a regular organization (so some sort of cache invalidation). I was looking for a pub/sub technique instead of raw callba
[02:12:04] Fire-Dragon-DoL: cks, did anyone have previous experience and can tell me if my code will become a big nightmare? I was aiming at this gem for pubsub: https://github.com/krisleech/wisper
[02:12:15] pawnbox: has joined #RubyOnRails
[02:12:28] applegrain: has joined #RubyOnRails
[02:12:40] TheNet: has joined #RubyOnRails
[02:12:55] roxtrongo: has joined #RubyOnRails
[02:14:28] annlewis: has joined #RubyOnRails
[02:14:43] smathy: has joined #RubyOnRails
[02:15:04] jetpackjoe: has joined #RubyOnRails
[02:15:07] smathy: has joined #RubyOnRails
[02:16:02] chadhs: has joined #RubyOnRails
[02:16:53] DLSteve: has joined #RubyOnRails
[02:19:46] ur5us: has joined #RubyOnRails
[02:21:46] thundercloud: has joined #RubyOnRails
[02:23:00] rhizome: previous experience with your quirky set of special cases? not even sure what pubsub would have to do with categorization.
[02:24:39] northfurr: has joined #RubyOnRails
[02:25:05] roxtrongo: has joined #RubyOnRails
[02:26:52] Fire-Dragon-DoL: has joined #RubyOnRails
[02:27:42] Fire-Dragon-DoL: damn it disconnected me =\
[02:28:45] mistermo: has joined #RubyOnRails
[02:30:23] helpa: Check your logs. Namely everything in the log folder of your rails app and the error and access logs from Apache or whatever else you're using.
[02:30:35] jhass: hrm, not the one I wanted
[02:31:03] jhass: Fire-Dragon-DoL: !irclogs
[02:31:03] helpa: Fire-Dragon-DoL: http://logs.ryanbigg.com/
[02:31:46] Fire-Dragon-DoL: I was a bit concerned initially about rails logs, ahaha
[02:34:08] Fire-Dragon-DoL: rhizome: mhh I don't expect my setup, the general idea is having a class, subscribed to an event, when event is fired, the class changes some records. It's an idea, but I can't clearly see if it will bring me to an event hell :P
[02:34:32] rgrmatt: has joined #RubyOnRails
[02:37:03] rhizome: so the thing that fires the event can make the changes
[02:37:07] jamto11: has joined #RubyOnRails
[02:37:37] bruno-: has joined #RubyOnRails
[02:37:46] Fire-Dragon-DoL: rhizome: yes, that's the idea
[02:38:14] nareshthakur: has joined #RubyOnRails
[02:39:21] rgrmatt: has joined #RubyOnRails
[02:39:42] livecano: has joined #RubyOnRails
[02:40:59] koprom: has joined #RubyOnRails
[02:42:00] Fire-Dragon-DoL: rhizome: thinking about it, publisher/subscriber without using async stuff seems like useless and maybe a simple callback is enough, I would end up enclosing all the "when event fired" logic in a single class anyway, so it doesn't look like there is any need for such thing
[02:42:01] owenjones: has joined #RubyOnRails
[02:42:37] northfurr: has joined #RubyOnRails
[02:44:37] rhizome: seems reasonable
[02:45:48] CanTonic: has joined #RubyOnRails
[02:46:13] Fire-Dragon-DoL: now, time to configure dircproxy to avoid disconnection issues :P
[02:47:02] roxtrongo: has joined #RubyOnRails
[02:47:18] jhass: ugh, looks dead
[02:47:29] Radar: znc <3 too
[02:47:52] sevenseacat: <3 a relatively stable internet connection that doesnt disconnect every five minutes
[02:48:26] jhass: it's about more than that, multiple clients to the same account is a plus too
[02:48:31] Fire-Dragon-DoL: sevenseacat: it's macbook going on standby while I'm not touching it. I want the behavior, but with IRC is terrible
[02:48:43] sevenseacat: that is a bit annoying.
[02:49:01] Radar: sevenseacat: we were supposed to get a stable internet connection in the office this Monday. It hasn't arrived because Telstra.
[02:49:11] Fire-Dragon-DoL: Radar, jhass going to check znc, I didn't know it and INSTALL instructions for dirproxy fails on first step.
[02:49:11] sevenseacat: Radar: color me completely unsurprised.
[02:49:26] moeabdol: has joined #RubyOnRails
[02:49:37] sevenseacat: anything involving Telstra is a lul, unless its you giving them money, then that must be done promptly.
[02:50:24] roxtrongo: has joined #RubyOnRails
[02:50:47] jamto11: hi for my app, i am reading the same 100k line csv file every time and looping through it. Is there a way to cache the file read?
[02:51:22] jhass: sevenseacat: you just described any telco on earth
[02:51:23] Fire-Dragon-DoL: jamto11: you can cache the entire file in memory...
[02:52:03] Fire-Dragon-DoL: jamto11: also what you said doesn't really sound reasonable, why don't you cache the data you read from CSV?
[02:52:15] Rodya_: has joined #RubyOnRails
[02:53:04] Rodya_: has joined #RubyOnRails
[02:53:14] jamto11: yea how do i cache it?
[02:53:17] s2013: has joined #RubyOnRails
[02:53:52] roxtrongo: has joined #RubyOnRails
[02:54:12] TheRokh1: has joined #RubyOnRails
[02:54:52] jhass: jamto11: assign it to a constant for example
[02:56:01] sevenseacat: Radar: you might be interested to know http://stackoverflow.com/a/33609701/560215 guy put a patch into poltergeist to fix that stupid phantomjs file upload bug apparently
[02:56:10] jhass: or consider importing the data into your DB, which probably gives you even faster access with the right indexes placed
[02:56:38] jamto11: weird that i dont get any performance increases after assigning it to a constant or class variable
[02:56:46] jamto11: could it have to do with config.cache_classes = false in development?
[02:56:54] sevenseacat: jamto11: you might need to show your code and explain what you're actually doing
[02:57:07] sevenseacat: 'every time' is a vague statement
[02:57:27] jhass: if you namespaced the constant into a class that's being reloaded, yes
[02:57:27] roxtrongo: has joined #RubyOnRails
[02:58:43] sevenseacat: https://twitter.com/headius/status/666729260082593792 what is this i dont even
[03:00:28] xcesariox: has joined #RubyOnRails
[03:00:48] Aeyrix: Is he okay?
[03:00:59] Aeyrix: Also, Ruby 3? I thought it was Ruby 2.3.
[03:02:06] Aeyrix: 1:49 PM <sevenseacat> anything involving Telstra is a lul, unless its you giving them money, then that must be done promptly.
[03:02:16] Aeyrix: "then it's already overdue"
[03:02:33] workmaster2n: has joined #RubyOnRails
[03:02:59] sevenseacat: telcos are really goddamn helpful when it comes to signing you up and getting you paying. after that, they couldnt give two shits about you unless you stop paying.
[03:03:04] nonmadden: has joined #RubyOnRails
[03:03:59] sevenseacat: what really irks me the most is when new customers get deep discounts that don't apply to existing customers
[03:04:45] willardg: has joined #RubyOnRails
[03:05:05] sevenseacat: yes you, new customer, we'll waive all of the handset fees and give you a monthly discount if you buy this phone! existing customer... no, you must pay through the nose
[03:05:26] Aeyrix: Whenever I need support I call the accounts desk.
[03:05:32] Aeyrix: < 1min waiting.
[03:06:08] sevenseacat: last time I had to deal with technical support, I was telling them there was a problem before they even knew it
[03:07:19] non: has joined #RubyOnRails
[03:07:27] jrhorn: has joined #RubyOnRails
[03:08:21] riotjones: has joined #RubyOnRails
[03:08:42] VeryBewitching: I just threaten to switch providers every 3 months
[03:09:38] kies: has joined #RubyOnRails
[03:10:32] s2013: has joined #RubyOnRails
[03:10:59] sevenseacat: the problem with that in australia is that everyone is a telstra reseller because telstra owns all the networks, so telstra don't give a shit what you do
[03:11:03] s2013: good evening
[03:11:07] xcesariox: has joined #RubyOnRails
[03:11:11] s2013: telstra sucks
[03:11:21] s2013: vodafone forever!!!
[03:11:24] s2013: jk.. vodafone sucks too
[03:12:01] VeryBewitching: sevenseacat: Is that constitutionally legal?
[03:12:09] sevenseacat: why not? they built them
[03:12:24] VeryBewitching: Well, ya, I guess there's that.
[03:12:57] VeryBewitching: Is Telstra all over NZ as well?
[03:12:58] Aeyrix: VeryBewitching: It technically is a monopoly.
[03:13:35] Aeyrix: I think the current standing figure is 92% of the lines in the ground are Telstra owned.
[03:13:44] jahbrewski: has joined #RubyOnRails
[03:13:46] Aeyrix: The other 8% are part SingTel (mostly in Tasmania) and part PIPE Networks.
[03:14:07] Fire-Dragon-DoL: I just discovered my router has ZNC package, lol! good
[03:14:25] VeryBewitching: Bell Canada and Rogers Communications are two of the largest providers in Canada; when Bell comes to my door, I call Rogers and say "Hey Bell said I could have x for y dollars" and my rates are reduced.
[03:14:48] VeryBewitching: Bell canvases every 3 months :D
[03:15:10] Bloomer: has joined #RubyOnRails
[03:15:20] sevenseacat: in WA we also have a monopoly on things like gas and electricity providers
[03:15:22] VeryBewitching: Aeyrix: That's a scary percentage
[03:15:24] sevenseacat: because we're awesome
[03:16:21] VeryBewitching: What is WA an acronym for?
[03:16:33] northfurr: has joined #RubyOnRails
[03:16:37] sevenseacat: western australia
[03:16:40] nareshthakur: has joined #RubyOnRails
[03:18:24] pwnd_nsfw: has joined #RubyOnRails
[03:18:59] jetpackjoe: has joined #RubyOnRails
[03:19:29] trosborn: has joined #RubyOnRails
[03:19:37] SteenJobs: has joined #RubyOnRails
[03:20:30] jamto11: would reading all rows of a 100,000 row document from mongo db be faster or reading it from a csv?
[03:21:13] big|bad|wolf: has joined #RubyOnRails
[03:21:24] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[03:21:29] shibabu: has joined #RubyOnRails
[03:21:33] sevenseacat: still waiting to see some code about this csv file
[03:21:41] non: has joined #RubyOnRails
[03:22:20] jrhorn_: has joined #RubyOnRails
[03:25:29] Tempesta: has joined #RubyOnRails
[03:26:01] jrhorn424: has joined #RubyOnRails
[03:29:10] rhizome: jamto11: mongo on the same machine might be close, over the network file io will be faster
[03:30:41] s2013: telstra is looking to expand internationally
[03:30:43] s2013: if they havent laready
[03:30:58] s2013: i was at the google fiber office copule of weeks ago.. guess the speed i got there
[03:31:35] infernus: has joined #RubyOnRails
[03:32:05] jrhorn424: has joined #RubyOnRails
[03:32:52] TheNet: 100000000000 informations/s ?
[03:33:15] sevenseacat: ACTION deep inside rspec mocking hell
[03:33:56] sarink: has joined #RubyOnRails
[03:34:25] TheNet: sevenseacat: I was just down their too but I gave up
[03:35:06] sevenseacat: `can't convert RSpec::Mocks::Double to Array (RSpec::Mocks::Double#to_ary gives RSpec::Mocks::Double)` way down deep in a class that generates XML using lots of mock_model.as_null_object
[03:35:45] sekrit: has joined #RubyOnRails
[03:36:12] rickmasta: has joined #RubyOnRails
[03:38:01] TheNet: has joined #RubyOnRails
[03:38:36] bruno-: has joined #RubyOnRails
[03:40:13] owenjones: has joined #RubyOnRails
[03:40:37] workmaster2n: has joined #RubyOnRails
[03:40:56] Glyphik: https://gist.github.com/psyglyphik/96e734b6c2ca8c9d7860
[03:41:17] Glyphik: why am i getting a failure/error here in rspec? does it have anything to do with devise?
[03:41:38] Glyphik: i'm completely new to testing btw
[03:41:59] sevenseacat: no, it doesnt. whats on the line the error points to?
[03:42:01] Aeyrix: > undefined method `current_user' for nil:NilClass
[03:43:52] sevenseacat: without any code, its impossible to tell why the spec is failing. but your models definitely do not know anything about a current user.
[03:43:57] youngbaks: has joined #RubyOnRails
[03:44:04] SteenJobs: has joined #RubyOnRails
[03:44:47] chipotle: has joined #RubyOnRails
[03:45:49] jgpawletko: has joined #RubyOnRails
[03:47:38] blackhuey: has joined #RubyOnRails
[03:48:45] annlewis: has joined #RubyOnRails
[03:50:51] djbkd: has joined #RubyOnRails
[03:56:58] Glyphik: the error happens on line 29 when i attempt to use factorygirl's create method: https://gist.github.com/psyglyphik/a2947f636fad8a455909
[03:57:08] nareshthakur: has joined #RubyOnRails
[03:58:25] tuelz: I'm having a hard time figuring out how to whitelist data I'm getting from request.env['omniauth.auth'] hash
[03:59:10] tuelz: anyone know of a resource that explains it? Or should I just start reading up on strong params and figure out what I'm doing wrong?
[03:59:44] sevenseacat: Glyphik: undefined method `current_user' for nil:NilClass # ./app/models/user.rb:12:in `block in <class:User>'
[04:00:08] Aeyrix: I'd venture that 'current_user.' shouldn't be there and it's trying to access its own attributes.
[04:01:53] ibouvousaime: has joined #RubyOnRails
[04:02:07] beneggett: has joined #RubyOnRails
[04:02:36] northfurr: has joined #RubyOnRails
[04:03:49] IFrank00: has joined #RubyOnRails
[04:04:25] tuelz: I think I figured it out, have to turn the env data into parameters first
[04:04:41] SteenJobs: has joined #RubyOnRails
[04:04:52] peppers: has joined #RubyOnRails
[04:05:42] iateadonut: has joined #RubyOnRails
[04:09:09] riotjones: has joined #RubyOnRails
[04:10:08] ntyet: has joined #RubyOnRails
[04:10:53] braincrash: has joined #RubyOnRails
[04:10:55] darrencauthon: has joined #RubyOnRails
[04:11:02] patrick: has joined #RubyOnRails
[04:12:14] sevenseacat: how can you help someone when their response time is best measured in quarter-hours?
[04:13:01] tuelz: retire and take on irc full time
[04:13:55] benlieb: has joined #RubyOnRails
[04:15:31] dopie: has joined #RubyOnRails
[04:15:47] Bloomer: has joined #RubyOnRails
[04:15:53] benlieb: has joined #RubyOnRails
[04:17:09] Meow-J: has joined #RubyOnRails
[04:17:37] diegoviola: has joined #RubyOnRails
[04:18:59] diegoviola: has joined #RubyOnRails
[04:20:29] nareshthakur: has joined #RubyOnRails
[04:20:58] towski_: has joined #RubyOnRails
[04:21:17] jessemcgilallen: has joined #RubyOnRails
[04:22:07] fedexo: has joined #RubyOnRails
[04:25:06] Axsuul: has joined #RubyOnRails
[04:26:43] nareshthakur: has joined #RubyOnRails
[04:29:45] yoongkang: has joined #RubyOnRails
[04:33:35] jetpackjoe: has joined #RubyOnRails
[04:35:53] joshkovach: has joined #RubyOnRails
[04:37:41] moeabdol: has joined #RubyOnRails
[04:37:56] shinenelson: has joined #RubyOnRails
[04:38:27] krz: has joined #RubyOnRails
[04:39:40] bruno-: has joined #RubyOnRails
[04:45:56] SteenJobs: has joined #RubyOnRails
[04:46:22] jetpackjoe: has joined #RubyOnRails
[04:53:01] Fire-Dragon-DoL: I started with "I don't want to loose stuff because of standby or such on IRC", I'm not sure how I ended up compiling GCC from source...
[04:53:13] Bloomer: has joined #RubyOnRails
[04:53:41] Radar: logs.ryanbigg.com/RubyOnRails
[04:54:51] Fire-Dragon-DoL: Radar: oh yeah that already saved me, ZNC is just a long-term pleasure and my nerdy-noob-sysadmin want to deal with it
[04:55:02] Fire-Dragon-DoL: still, I had to compile gcc from source, lol
[04:55:29] sevenseacat: ACTION looks at the start of the days log and sees "H&R Block did a good job this year for me."
[04:55:31] sevenseacat: aaaaaaaaaaaaaaaahahahahahahahahaha
[04:55:38] Fire-Dragon-DoL: (I don't have root on the managed server I'm on, which is fine, except for this "pleasures" you sometimes have to face)
[04:56:21] sevenseacat: whats the cheapest nastiest fast food you can think of? H&R Block is the that of accounting
[04:56:45] craysiii: theres a place we have called crack burger.
[04:57:12] jetpackjoe: has joined #RubyOnRails
[04:57:40] gambl0re: has joined #RubyOnRails
[04:57:49] Fire-Dragon-DoL: mhhh... Time to play some FTL, gcc is quite long to compile
[04:57:51] sevenseacat: a waste of hundreds of dollars it was, doing my tax through them for a few years
[04:58:21] Fire-Dragon-DoL: sevenseacat: what was the problem? (disclaimer: I live in Europe so it's not helpful for me)
[04:58:35] pawnbox: has joined #RubyOnRails
[04:59:08] sevenseacat: its no different than doing your own tax, except an 'accountant' is asking you questions instead of software, and at the end of the day it costs $150
[04:59:56] sevenseacat: if you're expecting any kind of actual tax advice, forget it
[05:00:12] sevenseacat: and if they fuck up in the filing, they just pass all the fines on to you
[05:01:08] sevenseacat: ACTION has an axe to grind with H&R Block
[05:01:39] owenjones: has joined #RubyOnRails
[05:02:04] pydave6367: has joined #RubyOnRails
[05:02:57] latemus: has joined #RubyOnRails
[05:02:59] sevenseacat: ACTION also grumpy atm with rspec-mocks but thats unrelated
[05:03:12] owenjones: has joined #RubyOnRails
[05:07:35] Fire-Dragon-DoL: sevenseacat: can I help you with rspec-mocks by any chance? I played with it quite a bit (like: I wrote such ugly code once in a while that forced me to study it quite a bit :P )
[05:07:57] Fire-Dragon-DoL: and for H&R, that's plain horrible, you pay without a service, lol
[05:08:15] sevenseacat: lemme put together a gist of what i've got
[05:08:23] Fire-Dragon-DoL: but people really like seeing a human instead of a software, lol
[05:08:48] crdpink: has joined #RubyOnRails
[05:08:54] sevenseacat: I have no idea how I'm going to break this down into a gist
[05:09:12] Fire-Dragon-DoL: put everything together and I'll perform a first try
[05:09:33] sevenseacat: meh, I'll figure it out
[05:09:41] Fire-Dragon-DoL: if it's impossible, I'll just tell you, don't put necessarily all classes, as long as name is reasonable, I should be able to understand
[05:09:56] riotjones: has joined #RubyOnRails
[05:11:46] sevenseacat: working on it
[05:13:04] sevenseacat: aaaand I think I've figured it out while putting together the gist
[05:13:20] _3dwardsharp: has joined #RubyOnRails
[05:14:15] sevenseacat: yep, cheers :) thanks for the nudge Fire-Dragon-DoL
[05:15:00] sevenseacat: there was a define_method that was making methods with different names than I was expecting, so I was setting the wrong data on my mock object
[05:15:17] Fire-Dragon-DoL: good job sevenseacat;)
[05:15:47] Fire-Dragon-DoL: ....and gcc is still compiling, damn
[05:16:48] SteenJobs: has joined #RubyOnRails
[05:22:24] pawnbox: has joined #RubyOnRails
[05:24:03] sbarg: has joined #RubyOnRails
[05:25:48] shibabu: has joined #RubyOnRails
[05:26:49] pawnbox: has joined #RubyOnRails
[05:29:34] peppers: has joined #RubyOnRails
[05:31:16] rakm: has joined #RubyOnRails
[05:31:35] benlieb: has joined #RubyOnRails
[05:32:58] SteenJobs: has joined #RubyOnRails
[05:33:41] krz: has joined #RubyOnRails
[05:35:12] Cervajz: has joined #RubyOnRails
[05:35:40] pawnbox: has joined #RubyOnRails
[05:35:49] Fire-Dragon-DoL: it didn't error but executable is not in $HOME/.local even if I specified --prefix ... where is it <.<
[05:35:55] Fire-Dragon-DoL: and lol for the emoji, ahah
[05:37:35] Fire-Dragon-DoL: I forgot make install :P
[05:38:37] tildes: has joined #RubyOnRails
[05:39:32] mices: has joined #RubyOnRails
[05:39:46] Cervajz_: has joined #RubyOnRails
[05:40:43] mices: i have a table of categories each category has a parent category except for the top level categories ... i can't figure out how to list them all together on the same page
[05:41:02] quazimodo: has joined #RubyOnRails
[05:41:12] bruno-: has joined #RubyOnRails
[05:43:05] Radar: mices: what have you tried?
[05:44:20] darrencauthon: has joined #RubyOnRails
[05:44:51] lnv: has joined #RubyOnRails
[05:45:10] darrencauthon: has joined #RubyOnRails
[05:45:11] jetpackjoe: has joined #RubyOnRails
[05:45:46] lnv: has left #RubyOnRails: ()
[05:46:01] mices: Radar: <% @categories.group_by(parent).each do |category| %>
[05:46:50] mices: rails says wrong number of arguments 1 for 0
[05:47:31] lnv: has joined #RubyOnRails
[05:47:35] lnv: has left #RubyOnRails: ()
[05:48:01] creature: group_by takes a block, not an argument.
[05:48:21] creature: So you could do `@categories.group_by(&:parent).each do |category|`.
[05:48:41] creature: Or, more verbosely, `@categories.group_by { |obj| obj.parent }.each do |category|`.
[05:48:46] jessemcgilallen: has joined #RubyOnRails
[05:49:40] SteenJobs: has joined #RubyOnRails
[05:49:57] mices: creature: ty
[05:50:19] mices: that's so awesome
[05:50:22] creature: Though, note that `group_by` returns a hash, not an array, so you'll probably want ... `do |category, items|` or similar as the argument for your second block.
[05:52:21] Cervajz: has joined #RubyOnRails
[05:53:09] rvanlieshout: has joined #RubyOnRails
[05:54:40] pawnbox_: has joined #RubyOnRails
[05:55:57] sevenseacat: 137 outdated gems in my bundle. how many can I upgrade safely today??? *dun-dun*
[05:56:18] sevenseacat: ACTION starts clock
[05:57:40] ur5us: has joined #RubyOnRails
[05:58:39] Radar: All of them because everyone follows semver sensibly.
[05:59:26] ur5us: has joined #RubyOnRails
[05:59:28] Radar: mices: please see PM
[05:59:49] Fire-Dragon-DoL: sevenseacat: my record is 2, lol
[06:00:00] Fire-Dragon-DoL: and not with side effects in any case :P
[06:00:06] sevenseacat: well the list was 155 before I upgraded from rails 4.0 to 4.2
[06:00:11] sevenseacat: so I'm making progress!
[06:03:03] Fire-Dragon-DoL: what do you use to check for outdated gems? I remember there was a tool
[06:03:42] mices: creature: https://gist.github.com/mices/c736033b8742e40ea0c6
[06:04:40] sevenseacat: Fire-Dragon-DoL: `bundle outdated`
[06:05:17] EminenceHC: has joined #RubyOnRails
[06:05:32] Radar: Radar kicked mices: see PM
[06:05:41] Radar: Hopefully that gets the message across.
[06:06:04] Fire-Dragon-DoL: oh really there is such a command, lol
[06:06:38] bmalum: has joined #RubyOnRails
[06:08:28] non: has joined #RubyOnRails
[06:10:46] riotjones: has joined #RubyOnRails
[06:11:40] bmalum: has joined #RubyOnRails
[06:12:04] lxsameer: has joined #RubyOnRails
[06:12:04] lxsameer: has joined #RubyOnRails
[06:13:23] yogeshrt: has joined #RubyOnRails
[06:13:49] dhjondoh: has joined #RubyOnRails
[06:15:31] chrissonar: has joined #RubyOnRails
[06:15:37] raunicolae: has joined #RubyOnRails
[06:15:41] rgtk: has joined #RubyOnRails
[06:17:52] raunicolae: has left #RubyOnRails: ()
[06:19:46] axsuul_: has joined #RubyOnRails
[06:21:26] pawnbox: has joined #RubyOnRails
[06:22:32] Fire-Dragon-DoL: I'm not sure if I want to run it
[06:22:53] Ca1us: has joined #RubyOnRails
[06:23:02] None: has joined #RubyOnRails
[06:23:18] sevenseacat: down to 86! woo
[06:23:57] TheNet: I just spend an hours debugging capistrano only to find out the problem was I didn't have enough ram
[06:24:02] TheNet: not quite sure how to feel
[06:24:29] Radar: TheNet: Oops.
[06:25:49] moeabdol: has joined #RubyOnRails
[06:26:36] Fire-Dragon-DoL: I lost 4 hours compiling stuff from source because I missed one line in the chat... lol
[06:27:30] Radar: I lost 8 hours once because I was using Time.now instead of Time.zone.now.
[06:28:14] chipotle: has joined #RubyOnRails
[06:28:34] sevenseacat: I've had some doozies like that, but none I can remember off the top of my head
[06:28:34] yfeldblum: has joined #RubyOnRails
[06:29:39] EminenceHC: has joined #RubyOnRails
[06:30:12] duncannz: has joined #RubyOnRails
[06:30:57] yoongkang: has joined #RubyOnRails
[06:32:07] sevenseacat: this app uses both airbrake and exception_notification. ._.
[06:32:17] Fire-Dragon-DoL: Radar: that happened to me too quite recently, at some point tests were passing for one dev and not for me, but only between midnight and 2 am, so I discovered it was a timezone issue lol
[06:32:28] tubbo: Radar: damn you must live in a crazy time zone then
[06:32:33] tubbo: 8 hours off?
[06:32:40] Fire-Dragon-DoL: (I noticed because it happened exactly on the day before DST change, so my mind was focused on that)
[06:32:47] smoitra: has joined #RubyOnRails
[06:32:49] arup_r: has joined #RubyOnRails
[06:33:04] ibouvousaime: has joined #RubyOnRails
[06:34:42] dopie: In rails is it possible to call methods inside a class when the action is a post??
[06:34:44] owenjones: has joined #RubyOnRails
[06:35:48] sevenseacat: I don't see how those two things are related at all
[06:35:59] arup_r: When I say `controller :search` in routes.rb file. It generates routes as with controller name as "singular" , how can I make the controller name plural? Like "searches#pm_count" instead of `search#pm_count`. I can do it like controller: "searches" do.. Any other way ?
[06:36:04] lxsameer: has joined #RubyOnRails
[06:36:09] arup_r: https://gist.github.com/aruprakshit/50ca9aad41be8172fdf3
[06:36:24] smoitra: dopie: Class.method if request.post?
[06:36:40] sevenseacat: arup_r: the controller name should always be plural.
[06:36:47] arup_r: ok thanks
[06:38:20] Fire-Dragon-DoL: I finally set up my ZNC!!! Feel good
[06:38:57] Fire-Dragon-DoL-: has joined #RubyOnRails
[06:38:58] smoitra: I am having a basic problem I am trying to create an anchor with title it is doing so as I wanted but my test is getting failed why is this so
[06:39:06] smoitra: https://bitbucket.org/snippets/sourav_moitra/bR8xd
[06:40:09] sevenseacat: access denied
[06:41:32] smoitra: what is difference between before_create :method_name and before_save :method_name, on: :create
[06:42:49] bruno-: has joined #RubyOnRails
[06:43:39] aganov: has joined #RubyOnRails
[06:44:26] yardenbar: has joined #RubyOnRails
[06:45:20] smoitra: sevenseacat: I updated the snippet but this test is not working https://bitbucket.org/snippets/sourav_moitra/KKop4
[06:45:44] Fire-Dragon-DoL-: has joined #RubyOnRails
[06:46:21] sevenseacat: smoitra: so what does post.anchor equal in the test?
[06:46:25] Cervajz_: has joined #RubyOnRails
[06:46:37] darrencauthon: has joined #RubyOnRails
[06:46:40] jetpackjoe: has joined #RubyOnRails
[06:46:44] sevenseacat: also, posts(:one) is already going to be a created post
[06:46:57] sevenseacat: so your callback is not going to be run
[06:48:02] smoitra: But why is that then this test work when I change the callback to before_save :method, on: :create
[06:49:46] tagrudev: has joined #RubyOnRails
[06:51:50] SalexW: has joined #RubyOnRails
[06:54:09] SteenJobs: has joined #RubyOnRails
[06:55:05] alaing: has joined #RubyOnRails
[06:55:24] alaing: has joined #RubyOnRails
[06:55:38] build22_: has joined #RubyOnRails
[06:56:12] alaing: I'm new to rails/ruby and wondered what ":" variables are called.
[06:56:30] pawnbox: has joined #RubyOnRails
[06:56:34] sevenseacat: things like :foo ? they're called symbols
[06:57:01] sevenseacat: they're not variables - they can be thought of as similar to strings
[06:57:48] alaing: thanks so they not the same as Hash
[06:58:02] sevenseacat: theyre often used as keys in hashes
[06:58:14] sevenseacat: eg. {foo: "something}
[06:58:23] MartinElvar: has joined #RubyOnRails
[06:58:32] alaing: Just going to read up on symbols as I've not come across symbols before
[06:58:48] alaing: would they be used on objects?
[06:59:00] riotjones: has joined #RubyOnRails
[06:59:04] alaing: like @foo
[06:59:20] sevenseacat: @foo is an instance variable
[06:59:20] alaing: thats not an object :-P
[06:59:27] alaing: I was just about to say that
[06:59:53] alaing: i forgot it was instance variable
[07:00:56] rvanlieshout: i can be an object
[07:00:59] rvanlieshout: @foo = Person
[07:01:11] youngbaks: has joined #RubyOnRails
[07:01:42] sevenseacat: everything in Ruby is an object :)
[07:01:57] sevenseacat: its a real object-oriented language
[07:02:05] alaing: a bit like javascript
[07:02:13] sevenseacat: javascript is the devil
[07:02:26] rvanlieshout: not even closly related to js
[07:02:29] sevenseacat: also, not everything is an object in Javascript
[07:02:33] sinkensabe: has joined #RubyOnRails
[07:03:04] alaing: is the value of an instance variable a Hash or object if its a row of data thats been returned by active record
[07:03:10] sevenseacat: you can't do cool things like 3.months.ago in JS to get a timestamp :)
[07:03:21] rvanlieshout: alaing: now you're just using buzz words
[07:03:22] juddey: has joined #RubyOnRails
[07:03:23] sevenseacat: alaing:uh, its whatever you set it to
[07:03:31] sevenseacat: a hash is also an object
[07:03:40] Cervajz: has joined #RubyOnRails
[07:04:36] alaing: looks like i need to do a bit more reading to get my head around it
[07:05:03] alaing: is there any good reference you would recommend?
[07:05:09] alaing: other than google :-P
[07:05:15] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[07:05:34] sevenseacat: awesome book.
[07:06:00] rgtk: has joined #RubyOnRails
[07:06:39] alaing: thanks for your help, very much appreciated. hopefully i'll be up to speed one day to be able to help out in the room
[07:06:53] smoitra: sevenseacat: You mentioned posts(:yaml_object) creates a object. but this is again failing :( https://bitbucket.org/snippets/sourav_moitra/KKop4
[07:07:46] sevenseacat: can't help you with that, sorry. i don't use fixtures or testunit. it definitely creates and persists a Post object, though.
[07:08:45] smoitra: Anyone please help me with this unit https://bitbucket.org/snippets/sourav_moitra/KKop4
[07:09:17] rvanlieshout: smoitra: what's wrong with that?
[07:09:29] rvanlieshout: and you might want to consider using factories over fixtures
[07:10:12] smoitra: rvanlieshout the test is not passing even though its working
[07:10:29] rvanlieshout: and it's not passing because?
[07:10:38] sevenseacat: sif you need to know that :P
[07:11:07] smoitra: something is wrong with my concept of fixtures
[07:11:34] rvanlieshout: and also with the lack of gisting any output
[07:12:54] smoitra: snippet updated with output https://bitbucket.org/snippets/sourav_moitra/KKop4
[07:13:59] rvanlieshout: smoitra: ah, you're using asset_equal in a reverse way
[07:14:08] rvanlieshout: you have ssert_equal nil, "hello-world-this-is"
[07:14:18] rvanlieshout: so why would you expec that to pass?
[07:15:06] non: has joined #RubyOnRails
[07:16:33] smoitra: why is the post.anchor is nil it is supposed to be a string generated by create_anchor method at the time of creation
[07:16:56] Pazician: has joined #RubyOnRails
[07:17:03] rvanlieshout: that's why fixtures suck :)
[07:17:06] rvanlieshout: switch to factories
[07:17:19] rvanlieshout: fixtures are just pushed to the db
[07:17:31] sevenseacat: I thought it would be something like that
[07:17:49] smoitra: ohhh I did no that its weird
[07:18:10] smoitra: is there any way I can contribute and fix this problem
[07:18:20] rvanlieshout: drop fixtures
[07:18:21] sevenseacat: pretty sure it would be by design
[07:18:23] rvanlieshout: go for factories
[07:18:35] noobsu: has joined #RubyOnRails
[07:19:46] smoitra: thanks rvanlieshout
[07:19:54] rvanlieshout: factory_girl_rails
[07:20:08] arBmind1: has joined #RubyOnRails
[07:21:10] smoitra: I did one have a problem with factory let me find out the link
[07:22:03] Coldblackice: has joined #RubyOnRails
[07:22:25] smoitra: I encountered this problem https://github.com/thoughtbot/factory_girl/pull/794
[07:22:31] smoitra: No one replied
[07:23:12] rvanlieshout: i guess because nobody understands it
[07:23:34] rvanlieshout: we use factory girl rails in _all_ of our projects and never encountered anything like that
[07:24:06] xcesariox: has joined #RubyOnRails
[07:24:30] sevenseacat: err, that PR is just wrong
[07:25:54] mices: has joined #RubyOnRails
[07:26:33] moeabdol: has joined #RubyOnRails
[07:28:15] Or1on: has joined #RubyOnRails
[07:28:15] Or1on: has joined #RubyOnRails
[07:28:28] shibabu: has joined #RubyOnRails
[07:28:31] jetpackjoe: has joined #RubyOnRails
[07:29:28] smoitra: The configuration I proposed worked for me I don't why I am still to learn a lot
[07:31:01] sevenseacat: your proposal now includes the module twice
[07:31:12] sevenseacat: you're telling the user to include it twice
[07:31:59] sevenseacat: you should also be using factory_girl rails, instead of factory_girl directly
[07:32:05] sevenseacat: *factory_girl_rails
[07:34:20] defsdoor: has joined #RubyOnRails
[07:35:04] tetraktys: has joined #RubyOnRails
[07:35:27] smoitra: ohh I got it thanks sevenseacat
[07:36:13] cgfbee: has joined #RubyOnRails
[07:37:17] jahbrewski: has joined #RubyOnRails
[07:37:42] smoitra: so in factory_girl_rails dont I have to do any configuration ?
[07:38:36] sbarg: has joined #RubyOnRails
[07:39:59] sbarg: has left #RubyOnRails: ()
[07:40:09] sbarg: has joined #RubyOnRails
[07:40:30] Fire-Dragon-DoL: brb, experimenting ZNC!
[07:41:55] sevenseacat: https://github.com/thoughtbot/factory_girl_rails/#configuration documentation is awesome.
[07:43:32] bruno-: has joined #RubyOnRails
[07:44:09] solars: has joined #RubyOnRails
[07:44:31] smoitra: sevenseacat: Thanks again
[07:44:35] Macaveli: has joined #RubyOnRails
[07:44:50] Macaveli: Morning all
[07:45:11] sarink: has joined #RubyOnRails
[07:46:14] Fire-Dragon-DoL: has joined #RubyOnRails
[07:46:30] yoongkang: has joined #RubyOnRails
[07:46:59] Macaveli_: has joined #RubyOnRails
[07:47:06] srinidhi: has joined #RubyOnRails
[07:48:01] mices: sevenseacat: is acts_as_category the best thing for creating category views?
[07:48:15] mices: s/thing/gem/
[07:48:38] darrencauthon: has joined #RubyOnRails
[07:49:24] Macaveli: has joined #RubyOnRails
[07:49:25] youngbaks: has joined #RubyOnRails
[07:49:41] helpa: "Best" and "better" are subjective. Try to use a different term.
[07:51:42] Palsson: has joined #RubyOnRails
[07:52:13] mices: i was reading a recommendation but it's dated 2008 i thought maybe things have changed
[07:52:35] rvanlieshout: define your own specs, then find a gem that suits your needs or create something yourself
[07:53:26] Fire-Dragon-DoL: has joined #RubyOnRails
[07:53:29] red_horned_rihno: has joined #RubyOnRails
[07:54:00] bmalum: has joined #RubyOnRails
[07:54:09] mices: this article tells how it started with acts_as_tree and these other developed from that but that was 7 years ago
[07:54:14] mices: http://www.railsinside.com/plugins/164-7-tree-data-structure-plugins-for-rails.html
[07:54:29] Fire-Dragon-DoL: Radar: ZNC is extremely sexy
[07:55:30] freezevee: has joined #RubyOnRails
[07:56:09] Fire-Dragon-DoL: I'm finally using it
[07:56:13] mices: sevenseacat: then i'm gonna give it a try unless someone says use something else
[07:56:22] sevenseacat: mices: have fun.
[07:56:36] sevenseacat: no-one is going to tell you what to do.
[07:56:44] sevenseacat: its your code.
[07:56:57] mices: i'm just asking if this gem is still preferred
[07:57:08] sevenseacat: I don't even know what 'creating category views' means
[07:57:18] AzaToth: has joined #RubyOnRails
[07:57:20] sevenseacat: nor do i know what that gem does
[07:57:21] mices: creating data tree views
[07:57:52] sevenseacat: i dont know why you need a gem for that.
[07:57:53] mices: like if you wanted to do categories where each categories has subcategories of it's own, it's a tree
[07:57:59] smoitra: I am bothering you people again how do I use "build" instead of "FactoryGirl.build" in my tests
[07:58:00] sevenseacat: but if you want to use one, glhf
[07:58:15] sevenseacat: smoitra: you include FactoryGirl::Syntax::Methods or whatever it is into your spec config.
[07:58:25] mark2: has joined #RubyOnRails
[07:59:05] smoitra: I really think this should be include somewhere in the README
[07:59:36] Lauer: has joined #RubyOnRails
[07:59:44] Fire-Dragon-DoL: smoitra: it is included somewhere in the readme
[07:59:48] sevenseacat: you mean, the bit you linked to before?
[08:00:08] Lauer: Hi, can any here help me with a capistrano and rails question, regarding copy environments-files to server - http://stackoverflow.com/questions/33774499/capistrano-deployment-does-not-copy-config-environments-rb-files-to-server
[08:00:10] sevenseacat: https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#configure-your-test-suite ?
[08:00:44] Fire-Dragon-DoL: smoitra: ^ like, the first page :P
[08:01:31] smoitra: yeah but I think that it should also be included in the factory_girls_rails readme becoz I am using factory_girl_rails not factory_girl
[08:01:43] sevenseacat: factory_girl_rails uses factory_girl.
[08:02:32] sevenseacat: and the readme for factory girl rails clearly states "factory_girl_rails provides Rails integration for factory_girl."
[08:03:02] smoitra: If its included it will be easy for newbies because after checking out the readme I thouht it will work by default
[08:03:21] Macaveli_: has joined #RubyOnRails
[08:03:24] sevenseacat: smoitra: you're starting to frustrate me because we're answering your questions and you're still arguing.
[08:03:30] artto: has joined #RubyOnRails
[08:03:56] Fire-Dragon-DoL: smoitra: you can always make a PR to show that in the main readme and see if they accept it ^^
[08:03:59] sevenseacat: the entirety of the factorygirl documentation is not going to be included in factory girl rails, because that would be an immense waste of time.
[08:04:28] nickenchuggets: has joined #RubyOnRails
[08:05:10] darutoko: has joined #RubyOnRails
[08:05:18] smoitra: I understand that
[08:06:25] smoitra: but at least pointing to the GETTING_started will also be helpful
[08:07:05] sevenseacat: "See GETTING_STARTED for information on defining and using factories." ?
[08:07:13] sevenseacat: right here -> https://github.com/thoughtbot/factory_girl
[08:07:44] sevenseacat: if you think something can be improved, put in a PR.
[08:09:56] tuelz: has joined #RubyOnRails
[08:10:13] Palsson: has joined #RubyOnRails
[08:11:35] quazimodo: has joined #RubyOnRails
[08:11:56] djellemah_: has joined #RubyOnRails
[08:12:30] smoitra: Thanks all for your time and patience I still have a lot more newbies question on factory_girl rails I think I will save it for another day
[08:12:46] djellemah__: has joined #RubyOnRails
[08:13:12] rhizome: it's pretty straightforward once you get past the initial learning curve
[08:14:21] sarink: has joined #RubyOnRails
[08:14:35] sevenseacat: I still refer back to the getting started guide all the time. it's a great resource.
[08:14:43] Guest50: has joined #RubyOnRails
[08:15:20] Macaveli: has joined #RubyOnRails
[08:16:06] speakingcode: has joined #RubyOnRails
[08:16:12] Macaveli: has joined #RubyOnRails
[08:16:39] freezevee: has joined #RubyOnRails
[08:17:43] Fire-Dragon-DoL: ok I'm spiritually prepared to go to sleep (aka: I'm already in bed and my macbook battery is dying)
[08:18:01] rhizome: glad we could share this moment
[08:18:03] montagne_goat: has joined #RubyOnRails
[08:18:13] emilkarl: has joined #RubyOnRails
[08:18:14] Macaveli: has joined #RubyOnRails
[08:18:41] Fire-Dragon-DoL1: has joined #RubyOnRails
[08:18:42] Yomero3: has joined #RubyOnRails
[08:18:55] Macaveli: has joined #RubyOnRails
[08:20:25] build22: has joined #RubyOnRails
[08:21:25] kp666: has joined #RubyOnRails
[08:21:58] kp666: has joined #RubyOnRails
[08:21:58] thomasfedb: has joined #RubyOnRails
[08:22:05] thomasfedb: sevenseacat, hollah
[08:22:13] sevenseacat: thomasfedb: long time no see!
[08:22:38] kp666: has joined #RubyOnRails
[08:22:40] thomasfedb: ACTION is not a fish
[08:22:53] bmalum: has joined #RubyOnRails
[08:23:51] kp666: has joined #RubyOnRails
[08:24:41] kp666: has joined #RubyOnRails
[08:25:11] Fire-Dragon-DoL: I don't see the connection with the fish... o.o
[08:25:57] kp666: has joined #RubyOnRails
[08:26:26] MartinElvar: has joined #RubyOnRails
[08:27:03] Fire-Dragon-DoL: Ok it's really time to sleep, bye, good night
[08:27:06] Cervajz_: has joined #RubyOnRails
[08:27:18] moeabdol: has joined #RubyOnRails
[08:27:34] comrad: has joined #RubyOnRails
[08:28:28] pawnbox: has joined #RubyOnRails
[08:30:37] adac: has joined #RubyOnRails
[08:30:50] desmondhume: has joined #RubyOnRails
[08:31:20] smoitra: I have committed this. All I want is a link to getting started https://github.com/xw19/factory_girl_rails/commit/69ed42375a2f3411bdac380c70938aa0184f2364
[08:32:21] DoubleMalt: has joined #RubyOnRails
[08:33:59] ur5us: has joined #RubyOnRails
[08:35:38] pawnbox: has joined #RubyOnRails
[08:37:13] smoitra: sevenseacat: This is my PR https://github.com/thoughtbot/factory_girl_rails/pull/181
[08:37:16] nettoweb: has joined #RubyOnRails
[08:38:00] sevenseacat: good-o. You don't need to do any such configuration, though - its a completely optionla step.
[08:39:10] smoitra: I wrote that "you may" need
[08:39:32] freezevee: has joined #RubyOnRails
[08:39:36] infernus: has joined #RubyOnRails
[08:39:59] smoitra: so can it be merged ?
[08:40:13] sevenseacat: don't look at me, I don't maintain the gem
[08:41:41] smoitra: I think I should wait for someone to see it
[08:41:55] dhjondoh: has joined #RubyOnRails
[08:42:57] sevenseacat: you kind of have to
[08:43:49] smoitra: I think I am going in right direction
[08:44:39] bruno-: has joined #RubyOnRails
[08:44:47] lipoqil: has joined #RubyOnRails
[08:44:58] ntyet: has joined #RubyOnRails
[08:48:04] simplyianm: has joined #RubyOnRails
[08:48:13] pydave6367: has joined #RubyOnRails
[08:49:07] kimegede: has joined #RubyOnRails
[08:49:46] pawnbox: has joined #RubyOnRails
[08:49:47] darrencauthon: has joined #RubyOnRails
[08:49:52] marr: has joined #RubyOnRails
[08:50:13] non: has joined #RubyOnRails
[08:50:41] teclator: has joined #RubyOnRails
[08:56:56] jsrn_: has joined #RubyOnRails
[08:56:58] herbst: has joined #RubyOnRails
[08:56:58] herbst: has joined #RubyOnRails
[08:57:06] zpe: has joined #RubyOnRails
[09:00:00] dhjondoh: has joined #RubyOnRails
[09:01:15] freezevee: has joined #RubyOnRails
[09:01:28] neanderslob: has joined #RubyOnRails
[09:01:38] solars: if I have statistic references property, and I want to property.delete_all, this doesn't work due to the FK constraint - how do I define that statistics get deleted when using delete_all on property?
[09:05:32] herbst: has joined #RubyOnRails
[09:06:38] pawnbox: has joined #RubyOnRails
[09:07:19] artto: has joined #RubyOnRails
[09:10:53] smoitra: solars: ModelName.delete_all(:column_name) is how it supposed to be used
[09:11:10] smoitra: I dont get what are you asking
[09:11:44] apg: has joined #RubyOnRails
[09:11:45] apg: has joined #RubyOnRails
[09:13:41] smoitra: sorry delete_all is supposed to be used like this http://apidock.com/rails/ActiveRecord/Base/delete_all/class
[09:13:57] alias-ls-to-rm: has joined #RubyOnRails
[09:14:09] solars: Model.delete_all works
[09:14:18] solars: it just stopped working because I have a foreign key reference
[09:14:34] solars: the migration is (statistic.rb): t.references :ar_property, index: true, foreign_key: true
[09:14:57] sevenseacat: define what should happen on the association
[09:15:05] sevenseacat: eg. dependent: :destroy
[09:15:11] sevenseacat: or whatever you want to do
[09:15:31] solars: sevenseacat, I've got has_many :statistics, dependent: :destroy
[09:15:36] solars: in the property model
[09:15:42] solars: it doesn't work
[09:15:47] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[09:17:08] solars: the error I'm getting is: Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails (`google_report_test`.`statistics`, CONSTRAINT `fk_rails_8cf91e61e8` FOREIGN KEY (`ar_property_id`) REFERENCES `ar_properties` (`id`)): DELETE FROM `ar_properties`
[09:18:04] CornishPasty: Can anybody pastebin their bin/rake for me? I seem to have 2 different versions on 2 projects on the same rails (4.2.4), but one of them doesn't work in production...
[09:18:22] sevenseacat: solars: gist your code and what query youre running
[09:18:37] sevenseacat: I dont know if you're trying to delete properties or statistics or which association points to which
[09:19:18] solars: on it's way, sec
[09:20:55] adre: has joined #RubyOnRails
[09:21:15] solars: having a bit of copy/paste problems with gist
[09:21:17] solars: sevenseacat, https://gist.github.com/solars/8b6dbf2e8f800d59d2c6
[09:21:33] solars: not sure what I missed, I thought dependent: :destroy should take care of it
[09:22:06] theod: has joined #RubyOnRails
[09:22:12] sevenseacat: there we go, you want destroy_all, not delete_all
[09:22:26] sevenseacat: delete_all skips callbacks
[09:22:36] sevenseacat: which is how dependent: destroy gets handled
[09:22:44] solars: misunderstood it then
[09:22:49] CornishPasty: I wish it was the other way around, that's bitten me a few times, sevenseacat
[09:25:09] ddv: anyone know how you can skip copying/cloning a child based upon some condition with amoeba gem? :)
[09:28:03] desmondhume: has joined #RubyOnRails
[09:30:10] benhuda: has joined #RubyOnRails
[09:30:48] shibabu: has joined #RubyOnRails
[09:31:13] artto: has joined #RubyOnRails
[09:32:21] blackmesa: has joined #RubyOnRails
[09:33:07] MartinElvar: has joined #RubyOnRails
[09:33:30] Peg-leg: has joined #RubyOnRails
[09:35:21] simplyianm: has joined #RubyOnRails
[09:37:26] raj___: has joined #RubyOnRails
[09:38:00] raj___: I have a question about devise - does devise define individual controllers for confirmations, mailer, passwords, registrations that we are hooking on to through the routing system?
[09:38:53] tbuehlmann: devise provides these controllers, yes. if you want, you can override them
[09:38:57] TPBallbag: has joined #RubyOnRails
[09:40:24] herbst: has joined #RubyOnRails
[09:40:24] herbst: has joined #RubyOnRails
[09:41:52] tbuehlmann: see https://github.com/plataformatec/devise/tree/d22ac4a4fb304ea93c728efe955535cb6b8b6a86/lib/generators/templates/controllers
[09:42:14] futilegames: has joined #RubyOnRails
[09:43:56] jas02: has joined #RubyOnRails
[09:45:38] bruno-: has joined #RubyOnRails
[09:46:39] kitsuneyo: has joined #RubyOnRails
[09:46:52] Pupeno: has joined #RubyOnRails
[09:47:15] yoongkang: has joined #RubyOnRails
[09:50:05] sonOfRa: has joined #RubyOnRails
[09:50:22] diegoviola: has joined #RubyOnRails
[09:50:32] darrencauthon: has joined #RubyOnRails
[09:51:18] trigun0x2: has joined #RubyOnRails
[09:55:20] benhuda: has joined #RubyOnRails
[09:56:24] RegulationD: has joined #RubyOnRails
[09:57:02] MartinElvar: has joined #RubyOnRails
[09:58:40] rodfersou: has joined #RubyOnRails
[10:00:23] moeabdol: has joined #RubyOnRails
[10:00:53] Doddlin: has joined #RubyOnRails
[10:01:14] noobsu: has joined #RubyOnRails
[10:01:56] shibabu: has joined #RubyOnRails
[10:02:10] norc: has joined #RubyOnRails
[10:02:48] yashinbasement: has joined #RubyOnRails
[10:02:57] norc: Okay, so for the first time Im deploying without rbenv (so I dont have rbenv-vars now) with capistrano. However, my config files for now refer to ENV variables for passwords.
[10:03:30] norc: My setup uses unicorn, with rake tasks that interact with unicorn.
[10:04:09] norc: So what is the preferred method of getting credentials into Rails?
[10:04:38] Papierkorb: Am I the only one who wrote systemd services to manage web service daemons?
[10:04:47] iateadonut: has joined #RubyOnRails
[10:05:33] ur5us: has joined #RubyOnRails
[10:05:36] tbuehlmann: norc, I like to use capistrano's shared directory. that is, have files on your server with the credentials you need, and symlink them via capistrano in your application
[10:05:49] tbuehlmann: like the config/secrets.yml or config/database.yml
[10:06:10] Papierkorb: norc: Depends on your infrastructure, and if you trust your developers or not. Though environment variables are simple to use if you want to somewhat store the variables server-side. Don't confuse this with 'securing the credentials'.
[10:06:41] Papierkorb: norc: In the simplest case, what tbuehlmann says.
[10:07:01] norc: tbuehlmann: That actually seems like an elegant solution.
[10:07:01] Macaveli: has joined #RubyOnRails
[10:07:03] norc: Papierkorb: Yeah.
[10:07:23] norc: tbuehlmann: It is not much different from what I have been doing with .rbenv-vars, except I would be sharing the yml files directly.
[10:09:44] herbst: has joined #RubyOnRails
[10:09:44] herbst: has joined #RubyOnRails
[10:10:24] Papierkorb: norc: IMO, doing the env var dance is only really worth it if either the people deploying the server are not the developers, or if your infrastructure is too dynamic to know in advance where the database and everything lives (cloud stuff)
[10:10:27] orikremer: has joined #RubyOnRails
[10:11:31] norc: Papierkorb: With rbenv-vars it also provides a simple solution to the same problem.
[10:11:50] norc: Though I am moving further and further away from rbenv/rvm each day.
[10:12:02] Papierkorb: Never used rvm/rbenv :)
[10:12:14] Papierkorb: (ArchLinux. Systems' ruby is up to date anyway)
[10:13:16] norc: Well, we use Ubuntu mainly here - and being based on Debian you sometimes only get a few year old packages.
[10:13:38] norc: Which means you end up using packages from PPA or some hackery like rbenv/rvm for Ruby.
[10:13:42] dhjondoh: has joined #RubyOnRails
[10:13:47] norc: Or building it yourself.
[10:13:59] Papierkorb: Yeah. LinuxMint on my work computer constantly calls 2013 for software packages when I 'update' the system. Annoying.
[10:14:19] lxsameer: has joined #RubyOnRails
[10:15:03] jammanbo: has joined #RubyOnRails
[10:17:07] jammanbo: If you pass an object that extends ActiveModel::Naming into form_for it'll determine the path to POST to. But suppose the class is called Search, how do you make it use search_path rather than searches_path?
[10:17:18] non: has joined #RubyOnRails
[10:17:37] njero: has joined #RubyOnRails
[10:18:02] Papierkorb: jammanbo: Scroll a bit down to the warning http://guides.rubyonrails.org/routing.html#singular-resources
[10:18:41] acti0nman: has joined #RubyOnRails
[10:19:07] jammanbo: Oh. Thanks Papierkorb
[10:25:40] herbst: has joined #RubyOnRails
[10:28:24] Doddlin: has joined #RubyOnRails
[10:31:27] futilegames: has joined #RubyOnRails
[10:35:50] Axsuul: has joined #RubyOnRails
[10:36:48] marr: has joined #RubyOnRails
[10:38:15] Cervajz_: has joined #RubyOnRails
[10:38:33] tbuehlmann: norc, I stick with ruby-install/chruby, works pretty well for me
[10:41:04] ldnunes: has joined #RubyOnRails
[10:41:56] Tempesta: has joined #RubyOnRails
[10:45:54] Macaveli: has joined #RubyOnRails
[10:46:03] Pumukel: has joined #RubyOnRails
[10:47:05] bruno-: has joined #RubyOnRails
[10:48:01] svkurowski: has joined #RubyOnRails
[10:48:16] w0rd-driven: has joined #RubyOnRails
[10:51:05] Spami: has joined #RubyOnRails
[10:51:17] darrencauthon: has joined #RubyOnRails
[10:53:43] gregf_: has joined #RubyOnRails
[10:55:52] roxtrongo: has joined #RubyOnRails
[10:56:12] kitsuneyo: has joined #RubyOnRails
[10:57:10] neanderslob: has joined #RubyOnRails
[10:57:52] roxtrongo: has joined #RubyOnRails
[10:58:49] chipotle: has joined #RubyOnRails
[11:02:40] ewnd9: has joined #RubyOnRails
[11:03:10] yoongkang: has joined #RubyOnRails
[11:03:51] ruid: has joined #RubyOnRails
[11:06:51] netzc: has joined #RubyOnRails
[11:06:51] MaDErroR123: has joined #RubyOnRails
[11:07:10] yuujinlee: has joined #RubyOnRails
[11:07:22] dhjondoh: has joined #RubyOnRails
[11:08:01] arup_r: has joined #RubyOnRails
[11:10:24] Scripore: has joined #RubyOnRails
[11:12:54] bruno-: has joined #RubyOnRails
[11:13:28] kitsuneyo: has joined #RubyOnRails
[11:14:40] Detch: has joined #RubyOnRails
[11:16:32] SalexW: has joined #RubyOnRails
[11:17:17] kitsuneyo: has joined #RubyOnRails
[11:17:33] Cervajz: has joined #RubyOnRails
[11:19:43] yoongkang: has joined #RubyOnRails
[11:20:21] rickmasta: has joined #RubyOnRails
[11:22:53] kitsuneyo: has joined #RubyOnRails
[11:23:18] thundercloud: has joined #RubyOnRails
[11:23:50] Pazician: has joined #RubyOnRails
[11:28:40] mostlybadfly: has joined #RubyOnRails
[11:29:23] Ergo: has joined #RubyOnRails
[11:33:25] kitsuneyo: has joined #RubyOnRails
[11:33:59] pontiki: at work, we're moving away from ruby-install/chruby, and going all in on vagrant+ansible
[11:34:41] tvw: has joined #RubyOnRails
[11:34:46] adac: has joined #RubyOnRails
[11:36:15] norc: pontiki: Meh, I know a company that maintains many dozens of servers, and their lead administrator refuses to set up ansible, chef or anything in that ballpart.
[11:36:32] norc: In fact they even refuse to clone the virtual machines. They actually manually install every single machine. :(
[11:36:37] rgaidot: has joined #RubyOnRails
[11:37:00] pontiki: our systems guy is so bloody happy we're doing this. he's almost giddy
[11:37:13] big|bad|wolf: has joined #RubyOnRails
[11:38:51] norc: pontiki: Their guy is.... different. He refuses to employ people into his team that are more competent than him. So I dont see them getting orchestration any time soon.
[11:39:33] pontiki: yeah, our sean is not the typical angry unixbeard
[11:39:33] njero: has joined #RubyOnRails
[11:42:19] rarruda: has joined #RubyOnRails
[11:42:28] GarethAdams: has joined #RubyOnRails
[11:42:43] GarethAdams: has joined #RubyOnRails
[11:45:11] kitsuneyo: has joined #RubyOnRails
[11:45:11] Pazician: has joined #RubyOnRails
[11:46:25] rgaidot: has joined #RubyOnRails
[11:46:35] Macaveli: has joined #RubyOnRails
[11:47:11] kitsuneyo: has joined #RubyOnRails
[11:47:19] Megamos: has joined #RubyOnRails
[11:47:36] desmondhume: has joined #RubyOnRails
[11:51:21] tetraktys: has joined #RubyOnRails
[11:52:00] darrencauthon: has joined #RubyOnRails
[11:52:37] MaDErroR123: has joined #RubyOnRails
[11:53:27] Megamos: has joined #RubyOnRails
[11:54:40] Palsson: has joined #RubyOnRails
[11:56:12] darrenca_: has joined #RubyOnRails
[11:57:38] freezevee: has joined #RubyOnRails
[11:59:36] jas02: has left #RubyOnRails: ()
[12:00:57] ibouvousaime: has joined #RubyOnRails
[12:00:59] Megamosaren: has joined #RubyOnRails
[12:01:18] Guest54: has joined #RubyOnRails
[12:01:26] freezevee: has joined #RubyOnRails
[12:03:29] Guest54: has joined #RubyOnRails
[12:04:39] bmalum: has joined #RubyOnRails
[12:06:05] lipoqil: has joined #RubyOnRails
[12:07:26] agoldboi: has joined #RubyOnRails
[12:10:29] yogeshrt: has joined #RubyOnRails
[12:10:57] Pupeno: has joined #RubyOnRails
[12:12:55] kitsuneyo: has joined #RubyOnRails
[12:16:07] artto_: has joined #RubyOnRails
[12:16:49] saimancroy: has joined #RubyOnRails
[12:20:28] yoongkang: has joined #RubyOnRails
[12:27:25] emilkarl: has joined #RubyOnRails
[12:27:54] kp666: has joined #RubyOnRails
[12:29:23] Scripore: has joined #RubyOnRails
[12:30:10] vigintas: has joined #RubyOnRails
[12:30:22] emilkarl: has left #RubyOnRails: ()
[12:42:39] njero: hello... What will be the options for a belongs_to assoc when both foreign and primary key cannot be realized from that.
[12:43:08] Cervajz_: has joined #RubyOnRails
[12:43:16] njero: I found foreign_key and class name but what about primary_key
[12:43:45] rvanlieshout: n_e_o: did you read the doc?
[12:43:52] njero: not primary key.. column
[12:43:54] w0rd-driven: has joined #RubyOnRails
[12:43:57] rvanlieshout: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-belongs_to
[12:44:04] rvanlieshout: what is 'not primary key.. column'?
[12:45:05] njero: rvanlieshout: sry.. ma bad.. I mean i just want to rename association
[12:45:18] rvanlieshout: you can name it anything you like
[12:45:20] rvanlieshout: belongs_to :foobar
[12:45:29] artto: has joined #RubyOnRails
[12:45:34] spiman: has joined #RubyOnRails
[12:46:01] n1ck7: has joined #RubyOnRails
[12:46:45] njero: rvanlieshout: but how will i specify column of associating model
[12:46:54] mikecmpbll: has joined #RubyOnRails
[12:46:54] tvw: has joined #RubyOnRails
[12:47:04] bobbobbins: has joined #RubyOnRails
[12:47:07] TPBallbag: has joined #RubyOnRails
[12:47:12] rvanlieshout: by any of the options described in the api doc
[12:47:47] spiman: hello, i am using the money-rails gem, but it is completely ignoring the thousands_separator option in format. Anyone have some experience on what may be overriding it? I've checked the github repo issue tracker and nothing similar is reported
[12:47:58] arup_r: has joined #RubyOnRails
[12:48:22] njero: rvanlieshout: can we specify primary key of other class
[12:48:51] rvanlieshout: n_e_o: did you actually read that documentation?
[12:48:57] njero: rvanlieshout: sorry.. got it
[12:49:16] xhoy: has joined #RubyOnRails
[12:49:28] njero: I was going through rails guides.. http://guides.rubyonrails.org/association_basics.html
[12:49:34] desmondhume: has joined #RubyOnRails
[12:49:41] desmondhume: has joined #RubyOnRails
[12:49:52] njero: it didn't showed me primary_key option
[12:50:53] rvanlieshout: it covers the basics
[12:51:52] njero: rvanlieshout: Hmm.. i was checking through advanced options in that :(
[12:52:26] kitsuneyo: has joined #RubyOnRails
[12:53:15] desmondhume: has joined #RubyOnRails
[12:53:59] Cervajz_: has joined #RubyOnRails
[12:54:07] roxtrongo: has joined #RubyOnRails
[12:54:10] flip_digits: has joined #RubyOnRails
[12:54:13] xhoy_: has joined #RubyOnRails
[12:54:28] chry: has joined #RubyOnRails
[12:54:29] norc: I have a simple_form like this http://pastie.org/10565048 with bootstrap. That generates a horizontal group of checkboxes. However, I would like to have them vertically.
[12:54:37] norc: Can someone provide me with a pointer in the right direction here?
[12:55:08] desmondhume: has joined #RubyOnRails
[12:55:18] _lazarevsky_: if I'm getting padding errors when trying to decrypt text, does that mean that the decryption failed?
[12:55:39] _lazarevsky_: because I noticed that if I set padding 0 I do get a result
[12:55:57] norc: _lazarevsky_: Give us the context, gist and the actual error message.
[12:56:08] _lazarevsky_: ok norc here's the context
[12:56:11] darrencauthon: has joined #RubyOnRails
[12:56:16] _lazarevsky_: I'm trying to read a message from an S3 bucket
[12:56:42] xardion_: has joined #RubyOnRails
[12:56:49] _lazarevsky_: along with the text which is of interest to me, in the s3 bucket message there's some metadata on how to decrypt this thing
[12:57:09] _lazarevsky_: there's iv, key (used to encrypt the message)
[12:57:18] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[12:57:27] _lazarevsky_: now after the message has been encrypted the key was encrypted with the client key which I have got
[12:57:52] RegulationD: has joined #RubyOnRails
[12:57:58] _lazarevsky_: now I'm trying to decrypt the key so I can decrypt the message
[12:58:08] _lazarevsky_: rvanlieshout: I will provide code I was just giving context :)
[13:01:52] norc: Also, I just figured out that collection_check_boxes accepts a block that lets me construct each item as I need. That will solve my problem. :)
[13:04:29] _lazarevsky_: norc rvanlieshout: https://gist.github.com/anonymous/eecf409a970ccb2ba2df
[13:05:00] _lazarevsky_: I apologise for the message JSON.. it was rendered across multiple lines when I was creating the gist
[13:05:31] Joucke: has joined #RubyOnRails
[13:05:37] _lazarevsky_: like.. have you guys ever used AWS's S3 ?
[13:05:42] norc: _lazarevsky_: And now the error message with stack trace please. :)
[13:05:55] _lazarevsky_: norc: there are different errors depending on the encryption algorithm I use
[13:06:02] _lazarevsky_: whether it's 128 or 256 :/
[13:06:06] _lazarevsky_: first things first though
[13:06:33] _lazarevsky_: if I try and decrypt something and I get a result - no errors
[13:06:39] _lazarevsky_: does that mean that the decryption succeeded
[13:06:43] norc: And I'm fairly certain there is plenty S3/EC2/etc users around.
[13:07:15] _lazarevsky_: OR does it spit out an output regardless if whether I have used the correct key ?
[13:07:30] _lazarevsky_: and the correct encyrption algorithm
[13:08:10] _lazarevsky_: cuz if it is the former than that narrows down my possible choices
[13:08:14] _lazarevsky_: which would make debugging easier
[13:08:16] Joucke: quick question about this gist
[13:08:17] Joucke: https://gist.github.com/anonymous/c8e721f6f9fb9f8ef216
[13:08:51] Joucke: I think line 7 is never executed. Am I right about that?
[13:09:13] norc: Joucke: Nope.
[13:09:36] Joucke: norc: nope->never executed, or nope->not right?
[13:09:42] norc: Joucke: You are not right.
[13:10:10] bmalum: has joined #RubyOnRails
[13:10:15] norc: Joucke: Think concurrency.
[13:11:08] Joucke: ah, if somehow the script is fired twice at the same time, it should prevent double execution?
[13:11:25] kitsuneyo: has joined #RubyOnRails
[13:12:28] Joucke: heh, it's not the reason why I put the line there (more because someone taught me the 'finder way' after I simply git User.all there first)
[13:13:09] Joucke: but norc, aside from concurrency, if I were absolutely sure that the file is only executed once at a time, line 7 would not be executed?
[13:13:17] norc: Joucke: Nope.
[13:13:47] Joucke: great, then I think I understand my own code ^^,
[13:13:51] agoldboi: has left #RubyOnRails: ()
[13:13:57] norc: Joucke: Again, think concurrent databases.
[13:14:32] Joucke: the only way users and quotes get linked through sent_quotes is through the cutaway code at line 11
[13:14:42] Joucke: there is no other way to link them
[13:16:07] Joucke: so. provided that line 11 is the only way in my project to link users and quotes, would there be any other scenario than a double call to send.rake in which line 7 would be executed?
[13:16:22] quazimodo: has joined #RubyOnRails
[13:17:43] roxtrongo: has joined #RubyOnRails
[13:18:17] htmldrum: has joined #RubyOnRails
[13:18:51] theblang: has joined #RubyOnRails
[13:18:57] jkamenik: has joined #RubyOnRails
[13:19:20] norc: Joucke: Yeah. The better way is through joining though: A.includes(:b).where(b: {id: nil})
[13:21:02] Joucke: so, User.includes(:quote).where(quote: {id: nil}) in this case?
[13:21:20] Joucke: wouldn't that only include quotes where the quote's id is nil?
[13:22:05] Joucke: or does the id in the quote hash (in the where call) refer to User's id?
[13:22:08] norc: Joucke: Nope. Think of it as a LEFT JOIN where the right side is NULL.
[13:22:55] Encapsulation: has joined #RubyOnRails
[13:23:06] Joucke: so, it does a left join between user and quote, then filters that on where quote's id is nil?
[13:23:47] Joucke: so if user has this quote, it would get filtered out. right, I think I get it
[13:24:14] norc: Yeah. I mean they both produce the same result, and on most RDMBS they produce the same query plans even under the hood.
[13:24:27] yogeshrt: has joined #RubyOnRails
[13:24:53] Joucke: where is this an improvement over my line 4 then? in what way is it 'the better way'?
[13:25:46] w0rd-driven: has joined #RubyOnRails
[13:26:15] ibouvousaime: has joined #RubyOnRails
[13:26:53] ngr: do I need an Action Job backend when I want to use Action Mailer's deliver_later? I'm asking because the Active Job guide states that "Rails [...] executes the job immediately if not adapter is set." Does this mean it is still send in another thread?
[13:27:07] Macaveli: has joined #RubyOnRails
[13:27:34] rikkipitt: has joined #RubyOnRails
[13:27:53] rvanlieshout: ngr: you'll need (and you'll want) a backend
[13:27:56] rikkipitt: is there a way to validates_presence_of all?
[13:28:09] rvanlieshout: rikkipitt: validates [list all your attributes], presence: true
[13:28:40] rikkipitt: rvanlieshout: just wondering if there was a way to validate a lot of attributes without having to list them all
[13:29:08] chipotle: has joined #RubyOnRails
[13:29:17] norc: Joucke: Mm. Actually I suppose it comes down to personal preference. I'm just used to LEFT JOIN in these cases because PostgreSQL used to produce crappy plans for NOT IN ()
[13:29:27] norc: Maybe Im just biased because of that.
[13:29:29] toutouastro: has joined #RubyOnRails
[13:29:48] dlitz: has joined #RubyOnRails
[13:30:08] ngr: rvanlieshout: thanks, while you at it, can you suggest a (light) one?
[13:30:15] Joucke: and PostgeSQL doesn't do that anymore?
[13:30:27] norc: Joucke: Honestly I haven't checked, but I would find it hard to believe.
[13:30:28] rvanlieshout: i personally prefer sidekiq + redis, but you then might want to look at delayed job
[13:30:34] rvanlieshout: iirc it uses the 'normal' db
[13:30:44] TheNet: has joined #RubyOnRails
[13:31:04] GarethAdams: has joined #RubyOnRails
[13:31:47] ngr: 'normal' db sounds good, I want to keep it as simple as possible because this is just about sending low priority mail notifications (not too bad when some get lost)
[13:31:55] towler: has joined #RubyOnRails
[13:32:14] Joucke: rikkipitt: creating a custom validator that loops your instance and validates them all, won't that work?
[13:32:19] ibouvousaime: has joined #RubyOnRails
[13:35:57] krz: has joined #RubyOnRails
[13:36:17] Joucke: norc: so when moving this to a custom finder on User, it would become self.includes(quote).where(quote: {id: nil}) ?
[13:38:00] desmondhume: has joined #RubyOnRails
[13:38:56] MaDErroR123: has joined #RubyOnRails
[13:41:07] tuelz: has joined #RubyOnRails
[13:43:08] mikecmpbll: has joined #RubyOnRails
[13:44:47] desmondhume: has joined #RubyOnRails
[13:45:44] Pumukel: has joined #RubyOnRails
[13:46:13] wilsonc91: has joined #RubyOnRails
[13:46:49] umgrosscol: has joined #RubyOnRails
[13:47:20] roxtrongo: has joined #RubyOnRails
[13:48:25] hardtail: has joined #RubyOnRails
[13:49:45] atomical: has joined #RubyOnRails
[13:49:52] krz: has joined #RubyOnRails
[13:50:13] voker57: has joined #RubyOnRails
[13:52:58] mag42c: has joined #RubyOnRails
[13:55:00] njero: has joined #RubyOnRails
[13:56:04] leonardoajim: has joined #RubyOnRails
[13:57:07] The_Phoenix: has joined #RubyOnRails
[13:57:13] solars: what's wrong with this migration? https://gist.github.com/solars/869bffc9c4220b86b417 I'm getting undefined method `????????add_column' for #<AddAdditionalDataToStatistics:0x00000005eb3750>
[13:59:02] mikecmpbll: has joined #RubyOnRails
[14:00:57] spiman: @solars i'd check the whitespace, the fact that the error message keeps it is strange
[14:01:46] tuelz: whitespace shouldn't matter, but never hurts to try :p
[14:02:03] tuelz: maybe gist the full error message?
[14:05:01] sankaber: has joined #RubyOnRails
[14:05:20] arup_r: Kaminari has configuration to set the per for each page from backend. Does it have something to let the the user to select from UI ? I went through the README https://github.com/amatsuda/kaminari , seems it don't have, but still asking to confirm myself.
[14:05:40] Macaveli: has joined #RubyOnRails
[14:05:49] youngbaks: has joined #RubyOnRails
[14:06:01] IFrank00: has joined #RubyOnRails
[14:07:02] yogeshrt: has joined #RubyOnRails
[14:07:43] lulzmachine: has joined #RubyOnRails
[14:09:28] lulzmachine: Hey! What's the preferred way to deploy rails apps lately? Is there a way you can reccomend? Still a server with capistrano? Or some kind of docker solution?
[14:10:19] spiman: arup_r: kaminari adds the 'per' method to your collection so you can pass the user selection as its argument
[14:11:18] meoblast001: has joined #RubyOnRails
[14:13:11] norc: lulzmachine: I think capistrano is the most common thing currently.
[14:14:27] arup_r: spiman: I know .. when I write <%= paginate @users %> it creates all links like 1,2, 3.. .. now when I will click any page number, a get request goes to the corresponding controller actions, with a params key page: 2, when I clicked on 2. My question is how to add `per` value there ?
[14:15:05] arup_r: so that I get in my params like { per: 18 } also..
[14:15:52] lulzmachine: okay norc ... so lets say you put the application in capistrano. how would you setup the rest of the server environment? Just put the things in "by hand" or try to do some semi-automatic docker thing
[14:16:01] pontiki: same way you'd pass any parameter from the browser back to the application, arup_r
[14:16:02] lulzmachine: or a prebuilt chef/puppet/? image
[14:16:46] arup_r: Say I put a dropdown in UI by putting a range like 10, 20, 30 etc... and user selects 20, how then I add it to the link ? because `paginate` helper creates those links out of the box
[14:16:48] norc: arup_r: Depends on what you use for pagination.
[14:17:04] ramortegui: has joined #RubyOnRails
[14:17:24] arup_r: norc: just said above
[14:17:34] sankaber: has joined #RubyOnRails
[14:17:44] arup_r: norc: I said I use Kaminari
[14:17:47] norc: arup_r: For kaminari you just do Foo.page(1).per(10)
[14:18:02] norc: It is a scope on page
[14:18:43] arup_r: I know that. I am asking from UI I want to send the per value as per dropdown selection. How to inject that value with a per key while clicking on different page links.
[14:19:12] spiman: arup_r i don't know i'm not using the kaminari helper (seems much easier to just build your own front-end), but i'd start from here https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/helpers/action_view_extension.rb#L16
[14:19:20] pontiki: arup_r: when the user selects 20, you send a request back to the server with per=20 in your query string
[14:20:33] spiman: seems like the scope hash has a per_page key
[14:20:39] kitsuneyo: has joined #RubyOnRails
[14:20:42] tuelz: has joined #RubyOnRails
[14:21:39] arup_r: spiman: that is for passing values to the corresponding the partial.. this might be helpful https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/helpers/action_view_extension.rb#L13 .. but need to think how can I add a dropdown selected value there .. using JS probably
[14:21:54] arup_r: pontiki: You mean using Ajax ..?
[14:22:08] pontiki: it depends; does your page load with ajax?
[14:22:25] pontiki: or do the next/prev/page# links make a new page request to the server?
[14:22:54] pontiki: either way, do it the same way you get new content
[14:23:16] arup_r: pontiki: no Ajax.. simple click and full page load. and yes `params` is the options. https://github.com/amatsuda/kaminari/issues/339#issuecomment-12190584
[14:23:48] TheNet: has joined #RubyOnRails
[14:24:34] arup_r: Now the question is how can I add dropdown values in the params ... using JS is it possible.. ? means, when I am selecting say 25 from dropdown, then per: 20 will be added to the prams hash ? or some idea ?
[14:24:38] pontiki: right, so your drop down is a little form, that's all. the action target would be to reload the current page but with a new per value (which will undoubtedly look odd to the user)
[14:24:42] ibouvousaime: has joined #RubyOnRails
[14:25:09] pontiki: you don't need to use any JS, it's just a form; if you use the GET method, the field will be added to the query string
[14:26:16] pontiki: if you want the form to submit when the user changes the value, without needing a submit button, then you'll need some JS to detect onchange and do the submit
[14:28:39] norc: Meh, anyone here who successully managed to use bootstrap-datepicker-rails with SimpleForm?
[14:28:39] arup_r: pontiki: usecase is I will select per value from dropdown, and then click on any page number, and then correct per value with page value should go to controller and displays data accordingly.
[14:29:24] pawnbox: has joined #RubyOnRails
[14:29:26] pontiki: why not show the user the new page per right away?
[14:29:39] n1ck7: has joined #RubyOnRails
[14:30:55] pontiki: if the user selects a new per page count, none of the provided page numbers will be accurate anymore
[14:31:19] norc: arup_r: You could have a dropdown item, send out an XHR request each time it changes, store the per page information in your session, and reference it from your controller.
[14:31:38] pontiki: that seems needlessly complex
[14:31:41] norc: Probably.
[14:31:54] arup_r: session is my idea kept inside a brain .. but trying to avoid that idea :D
[14:32:10] pontiki: yes, you could do that. but if you're making that change, might as well dynamically reload the content as well
[14:32:47] noobsu: has joined #RubyOnRails
[14:32:55] youngbaks: has joined #RubyOnRails
[14:33:31] arup_r: I'll think and come back
[14:33:51] pontiki: what is the need for the user to delay the change in the per page count?
[14:34:23] arup_r: delay means ? Sorry didn't get you
[14:34:57] futilegames: has joined #RubyOnRails
[14:34:59] pontiki: the delay between when the user selects the per page count, and when they get to see that change, which happens after they select a new page to go to
[14:35:50] Silex: has joined #RubyOnRails
[14:35:52] kitsuneyo: has joined #RubyOnRails
[14:35:58] Joucke: If I want to test attributes of a class instance, is there an easy way to give this class att_accessors only for the test?
[14:37:23] doodlehaus: has joined #RubyOnRails
[14:37:51] slash_quit: pontiki: arup_r: i kind of like a "load more" button... so the page length grows and grows. you could have a <span>Load: <button>5</button><button>20</button><button>50</button></span>
[14:37:52] arup_r: pontiki: got an idea. :) I am thinking to make an Ajax call on each change in the dropdown value and replace the content created by <%= paginate @users > with a new content <%= paginate @users, params: {per: "selected value" %>. So that on next pages click also gives everything corretly, until the users changes again the dropdown value.. sounds cool ?
[14:38:30] Joucke: nevermind, found my answer :)
[14:38:46] arup_r: slash_quit: that should be enhancement in phase II hehehe
[14:38:53] richb__: has joined #RubyOnRails
[14:39:12] arup_r: innovation.. improve UI/UX .. business lol
[14:39:51] Or1on: has joined #RubyOnRails
[14:40:54] slash_quit: haha... maybe. the downside argument against it would be letting your users learn your site one way, then surprising them by changing it.
[14:41:14] Papierkorb: Why even have different page sizes?
[14:41:36] GarethAdams: has joined #RubyOnRails
[14:41:39] GarethAdams: has joined #RubyOnRails
[14:41:40] Papierkorb: Choose a reasonable amount and don't clutter the screen? Do you ever choose anything less than the largest number if faced with such an control?
[14:42:02] slash_quit: Papierkorb: i always choose the largest number i can
[14:42:32] IrishGringo: has joined #RubyOnRails
[14:42:44] Papierkorb: slash_quit: me too. So why even have that control in the first place? Is there really anyone who likes to click on Next Page constantly so he chooses "10 elements" or something?
[14:42:45] walidvb: has joined #RubyOnRails
[14:43:17] defsdoor: arup_r, pagination is a really broken metaphor - it just doesn't work when you look at how users use it
[14:43:24] slash_quit: i usually determine that number for my user, after doing some performance profiling on page sizes (my data typically comes from a 3rd party api, not my own database... my database is for branding the ux/ui based on what population the 3rd party indicates my user belongs to)
[14:43:37] desmondhume: has joined #RubyOnRails
[14:43:47] Papierkorb: An API exposing that feature is fine, but as UI element? I like Googles approach. First time, there is a Load More button. click it, and then it will load more when needed afterwards without nagging again. (Or at least, they did this at some point)
[14:44:02] defsdoor: I use infinite scrolling in place of pagination everywhere now
[14:44:20] ddv: just don't hit the back button
[14:44:25] defsdoor: because most uses next page through stuff anyway so theres no additional burden
[14:44:27] slash_quit: defsdoor: same here... but it's behind a button.
[14:44:49] artto: has joined #RubyOnRails
[14:44:51] slash_quit: endless page vs infinite scroll
[14:44:56] joshkovach: has joined #RubyOnRails
[14:45:21] defsdoor: slash_quit, I do most of it "not full screen" i.e. in scrolling divs
[14:45:32] a1fa: in activerecord model, i have "schedule" and "user", schedule belongs_to user. under schedule i have user_id, but i also have assigned_to_id, how do i make that association work for both keys?
[14:46:09] defsdoor: a1fa, belongs_to :assigned_to, class_name: 'User'
[14:46:10] gianmario: has joined #RubyOnRails
[14:46:18] slash_nick: defsdoor: neat... we dont have any overflow scroll (other than on body)
[14:46:29] a1fa: defsdoor: neat
[14:46:33] slash_nick: gotta get moving toward work place
[14:46:41] darrencauthon: has joined #RubyOnRails
[14:47:10] arup_r: defsdoor: infinite scrolling hand made or some jS plugin you are using though ?
[14:47:25] defsdoor: it's not hard
[14:47:57] workmaster2n: has joined #RubyOnRails
[14:48:11] lipoqil: has joined #RubyOnRails
[14:48:11] defsdoor: uses some js to add next_page_url to container and updates it when loading an additional batch of rows
[14:48:46] Papierkorb: in theory you could even use the HTML5 history API and update the URL accordingly, thus even supporting the back button
[14:49:11] defsdoor: Papierkorb, most browsers scroll to position
[14:49:17] roxtrongo: has joined #RubyOnRails
[14:49:19] pontiki: how do you deal with going back to a page that's scrolled down infinitely (like facebook doesn't)
[14:49:20] defsdoor: so they reload everything to where you were anyway
[14:49:27] defsdoor: pontiki, see what I just said
[14:49:37] pontiki: the content isn't necessarily there anymore, though
[14:49:42] Papierkorb: defsdoor: The history API asks you what to do
[14:49:47] pontiki: as it was created dynamically on the page
[14:49:58] defsdoor: pontiki, the scroll to position fetches it all afresh
[14:50:10] pontiki: that can take a hellishly long time
[14:50:27] defsdoor: it's got to be fetched if you want to be at the previous position
[14:50:39] Papierkorb: You .. don't have to reload the page. You can just hook into the history via JS, and then just scroll.
[14:50:55] pontiki: and sites that don't serve up all the content, like fb, twitter, g+, it's problematic to get the same content you left from
[14:51:03] pontiki: which admittedly is a very different issue
[14:51:14] defsdoor: yeah and one they even they havent solved
[14:51:35] defsdoor: facebook gives randon data everytime I refresh
[14:51:49] defsdoor: and twitter loses position more often than not
[14:51:52] Papierkorb: reddit allows that, albeit only for few hours
[14:52:15] pontiki: if the stats i hear are true about fb, they're only serving up a very small potential of what could be in the feed
[14:52:21] Papierkorb: but it depends on what you built. much content? Not a good idea. static content like a shop? could work just fine
[14:52:58] pontiki: goodreads has an infinite scroll on your own book list, you'd think that would be a static list at that level
[14:52:59] defsdoor: Papierkorb, my stuff is 100% text content
[14:53:20] defsdoor: so the rescrolling and fetch isn't a problem atm
[14:53:23] SalexW: has joined #RubyOnRails
[14:53:37] a1fa: defsdoor: i could do the same thing in User? has_many :assign_to, class_name: "Schedule"? that should make joins work?
[14:53:47] Papierkorb: defsdoor: you can build a whole shop with just text (static content), or be twitter (much content). Just text doesn't say a lot about that :)
[14:53:47] pontiki: i mean, i do prefer inf scroll to paging through stuff, but it's not a completely thought-out thing yet
[14:53:58] defsdoor: a1fa, you need to specify the reverse association
[14:54:20] defsdoor: Papierkorb, no images etc..
[14:54:34] pontiki: Papierkorb: how would using the JS history work if you've navigated to a different site?
[14:54:39] a1fa: so in user, has_many :assign_to, class_name: "Schedule", foreign_key: "assign_to_id"?
[14:55:28] pontiki: anyway, it's not one of my current concerns, as i'm doing api stuff
[14:55:33] wilsonc91: has joined #RubyOnRails
[14:55:38] Papierkorb: pontiki: well, then the server kicks in. You still only have to fetch the correct page, which using the URL, you know. put a huge div above it and scroll down to fake having content above the page. Still only works well with static content, as I already said.
[14:55:43] defsdoor: a1fa, has_many :assignees perhaps ?
[14:56:09] s2013: has joined #RubyOnRails
[14:56:14] TheNet: has joined #RubyOnRails
[14:56:17] erbeshar1: has joined #RubyOnRails
[14:56:21] defsdoor: or assignments
[14:56:42] a1fa: but it also needs foreign_key too with that?
[14:56:57] a1fa: i tried it w/o foreign key, and it defaulted to user_id
[14:57:43] defsdoor: a1fa, if it works it must be right ;)
[14:57:59] shinnya: has joined #RubyOnRails
[14:58:09] a1fa: i'm deadly afraid of that
[14:58:20] defsdoor: a1fa, what you have is correct
[14:58:38] jkamenik1: has joined #RubyOnRails
[14:58:46] defsdoor: a1fa, if your assocation was labelled assigned_to the default is to look for a column called assigned_to_id
[14:58:59] walidvb: i'm trying to rspec a controller from a namespaced route, and i'm getting a route not matches {} error (even though the route does exist, and the app works fine outside of tests)
[14:59:04] defsdoor: but it's better to name your associations gramatically
[14:59:12] a1fa: code tested, and it works as intended
[14:59:24] RegulationD: has joined #RubyOnRails
[15:02:02] artto: has joined #RubyOnRails
[15:02:31] smathy: has joined #RubyOnRails
[15:02:39] slash_nick: arup_r: i'm back a few pages, so not all current... handmade is not too bad. you can look at (or use) things like this: http://imakewebthings.com/waypoints/shortcuts/infinite-scroll/
[15:02:41] roxtrongo: has joined #RubyOnRails
[15:03:18] Megamos: has joined #RubyOnRails
[15:03:20] arup_r: let me see it
[15:03:47] walidvb: here is my code: https://gist.github.com/walidvb/4d31ccaead80e57e05d3
[15:04:23] walidvb: i've tried various things, such as renaming the spec file to books_schedules_controller_spec and other variants, can't get it to work..
[15:05:43] arup_r: slash_nick: bookmarking it.
[15:06:40] artto: has joined #RubyOnRails
[15:08:45] Guest36: has joined #RubyOnRails
[15:09:26] sininen: has joined #RubyOnRails
[15:10:56] walidvb: i've been reading about this online, but can't really find a solution..
[15:12:14] tvw: has joined #RubyOnRails
[15:12:35] joshkovach: has joined #RubyOnRails
[15:12:35] B1n4r10: has joined #RubyOnRails
[15:12:54] tuelz: walidvb: /url_hinter
[15:13:04] tuelz: ignore that
[15:13:11] surrealanalysis: has joined #RubyOnRails
[15:13:18] walidvb: tuelz: lol ok
[15:13:27] tuelz: walidvb: what's the error message? add that to gist please
[15:14:03] momomomomo: has joined #RubyOnRails
[15:14:04] walidvb: tuelz: https://gist.github.com/walidvb/4d31ccaead80e57e05d3
[15:14:23] podman: has joined #RubyOnRails
[15:14:27] s2013: hello all
[15:14:35] TheNet: has joined #RubyOnRails
[15:14:40] tuelz: s2013: good day
[15:15:46] w0rd-driven: has joined #RubyOnRails
[15:15:50] tuelz: walidvb: what's the output of `rake routes`? Add that to gist please
[15:15:50] benhuda: has joined #RubyOnRails
[15:16:01] tuelz: it appears you aren't creating a route you think you are
[15:16:21] tuelz: my guess is a typo in your routes file, but I suck at memorizing syntax
[15:16:30] sankaber: has joined #RubyOnRails
[15:16:57] adavia_: has joined #RubyOnRails
[15:17:04] smathy: has joined #RubyOnRails
[15:17:52] tuelz: walidvb: it looks like you're giving me fake code...`# ./spec/controllers/book_schedules_controller_spec.rb:12`
[15:18:06] jlpeters: has joined #RubyOnRails
[15:18:07] G: has joined #RubyOnRails
[15:18:09] tuelz: in your gist it shows `schedules_controller_spec.rb`
[15:18:27] walidvb: i'm pretty sure i am :/. i've added the output to the gist
[15:18:28] tuelz: I can't help you debug typos if you're giving me fake code
[15:19:00] walidvb: sry, that was a test. let me restore the other file name
[15:19:04] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[15:19:07] htmldrum: has joined #RubyOnRails
[15:19:14] tuelz: walidvb: that's your ENTIRE rake routes?!
[15:19:18] walidvb: i've also added a second route that affects schedules
[15:19:30] DanKnox[away]: has joined #RubyOnRails
[15:19:35] cschneid: has joined #RubyOnRails
[15:19:36] alex88: has joined #RubyOnRails
[15:19:49] tpendragon: has joined #RubyOnRails
[15:20:03] tuelz: cool, I would consider throwing away that gist and starting over with exact copy/pasted text
[15:20:19] tuelz: not that you have too, but debugging is ahrd enough without typos
[15:20:46] walidvb: tuelz: file name wasn't a typo, but i was reading at places that rspec 'namespaced' controller, so i tried that.
[15:20:48] walidvb: https://gist.github.com/walidvb/4d31ccaead80e57e05d3
[15:20:57] walidvb: i've added rake_routes_complete to the gist
[15:21:08] Cervajz_: has joined #RubyOnRails
[15:21:58] axl_: has joined #RubyOnRails
[15:22:01] rickmasta: has joined #RubyOnRails
[15:22:16] walidvb: as well as restored the correct error message, that i get when running schedules_controller_spec.rb
[15:23:24] momomomomo: has joined #RubyOnRails
[15:23:49] roxtrongo: has joined #RubyOnRails
[15:24:11] artto: has joined #RubyOnRails
[15:24:25] artto: has joined #RubyOnRails
[15:24:49] walidvb: tuelz: does this help?
[15:24:54] walidvb: thanks for your help!
[15:24:59] tuelz: walidvb: it's a route issue lemme suggest some new syntax and try it out in the gist, one sec
[15:25:08] walidvb: cool cheers
[15:25:12] Fire-Dragon-DoL: Mhhh, znc is really nice, I can finally use IRC properly
[15:27:52] tuelz: I've actually never seen rspec controller tests that automatically know post :create goes to that controller, but then again I don't ever write controller tests
[15:28:11] walidvb: well, you can't post '/url' actually.
[15:28:17] walidvb: (or can you?)
[15:28:23] ProtoJazz: has joined #RubyOnRails
[15:28:33] ProtoJazz: has left #RubyOnRails: ()
[15:28:36] norc: tuelz: Controller specs will be gone in rails 5 too.
[15:28:40] ProtoJazz: has joined #RubyOnRails
[15:28:56] tuelz: walidvb: well my problem right now is I'm trying to figure out exactly what URL is being created by that spec
[15:29:03] hardtail: has joined #RubyOnRails
[15:29:08] tuelz: I hate no idea what URL it's sending rails to be matched with a route
[15:29:13] walidvb: by the spec, not the router, right?
[15:29:40] tuelz: but it's probably a routes error as well
[15:29:42] walidvb: right. that's what i don't get either. weird thing, though, is that there is a route matching that action,controller
[15:30:03] tuelz: you have no POST matchers on /schedule stuff as far as I can tell
[15:30:34] walidvb: no it's on books/:book_id/schedules normally
[15:30:38] tuelz: walidvb: right, but I don't think it's ever getting to any actions because it's getting stuck at route matchers...I think? Not sure
[15:30:46] walidvb: think i just solved it....
[15:30:55] tuelz: cool, what was the problem?
[15:30:57] walidvb: i had no book in my params
[15:31:15] walidvb: even though schedule is a sub resource of books
[15:31:30] walidvb: so, not sure what route it was trying to create, but it makes sense.
[15:31:35] walidvb: apols, my bad, it seems.
[15:32:37] arup_r: has joined #RubyOnRails
[15:32:39] tuelz: cool, I'm out for a few minutes, good luck
[15:32:53] emilkarl: has joined #RubyOnRails
[15:33:30] ProtoJazz: has joined #RubyOnRails
[15:33:32] walidvb: thanks a bunch, tuelz++
[15:34:58] ProtoJazz: Anyone have a prefered way of setting environment vars on an nginx/passenger/aws setup? I had been looking at rbenv-vars but couldnt get it working. Id also love a solution that works with capistrano deployment, but its not critical since I dont need to add vars that often
[15:35:45] MaDErroR123: has joined #RubyOnRails
[15:36:12] suchness: ProtoJazz: I just wrote a recipe that makes a yaml file from my stack configuration, then my environments just call ServerConfiguration.thing where server configuration is just the class that interfaces with the yaml.
[15:36:32] teclator: has joined #RubyOnRails
[15:36:38] suchness: ProtoJazz: that lets me change things stack by stack and in development or whatever
[15:37:10] xploshioon: has joined #RubyOnRails
[15:39:48] darrik: has joined #RubyOnRails
[15:41:14] diegorv: has joined #RubyOnRails
[15:41:16] qejk: has joined #RubyOnRails
[15:42:51] ibouvousaime: has joined #RubyOnRails
[15:43:49] MaDErroR_: has joined #RubyOnRails
[15:44:27] MaDErroR_: has joined #RubyOnRails
[15:44:38] emilkarl: How would you apply filters like these? I would like to chain where statements on active record base on logic in a filter model. http://pastie.org/10565322
[15:44:47] tubbo: ProtoJazz: with heroku it's pretty easy, just `heroku config:set ...`, but on AWS i would definitely use a Chef cookbook to get the job done, and drop an 'env.sh' file in /etc/profile.d so that my secrets get loaded on all user accounts
[15:44:52] nettoweb: has joined #RubyOnRails
[15:45:17] tubbo: finally, `config/secrets.yml` would have those secrets defined like e.g. aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
[15:45:47] zpe: has joined #RubyOnRails
[15:46:36] MaDErroR_: has joined #RubyOnRails
[15:46:51] tuelz: has joined #RubyOnRails
[15:49:32] corioliss: has joined #RubyOnRails
[15:50:06] freezevee: has joined #RubyOnRails
[15:51:27] drewdfw: has joined #RubyOnRails
[15:52:11] ruurd: has joined #RubyOnRails
[15:52:32] iateadonut: has joined #RubyOnRails
[15:53:40] tvw: has joined #RubyOnRails
[15:53:49] sinkensabe: has joined #RubyOnRails
[15:54:34] xcesariox: has joined #RubyOnRails
[15:55:14] blackmesa: has joined #RubyOnRails
[15:56:00] SteenJobs: has joined #RubyOnRails
[15:57:03] xploshioon: has joined #RubyOnRails
[15:57:07] suchness: Anyone away of a way in activerecord to define a has_many that isn't accessible as a method, only to build other relationships?
[15:57:27] smathy: suchness, doesn't exist.
[15:57:28] njero: has joined #RubyOnRails
[15:57:43] smathy: suchness, just give it a weird name.
[15:58:16] tubbo: has_and_belongs_to_many lol
[15:58:25] suchness: I will probably do do that, but it will make me feel all icky, you know?
[15:59:21] tubbo: i always think of that through-model as a placeholder for what will mostly be extra functionality. it might be a premature optimization but after a few iterations it ends up happening more often than not in my experience..
[15:59:43] Mia: has joined #RubyOnRails
[15:59:43] Mia: has joined #RubyOnRails
[15:59:49] suchness: Yeah, that's very true
[15:59:59] pwnd_nsfw: has joined #RubyOnRails
[16:00:08] atomical: has joined #RubyOnRails
[16:00:23] arooni: has joined #RubyOnRails
[16:00:24] smathy: suchness, is it a has_many :through that you need this for?
[16:00:30] matthewd: You might be able to undef the method afterwards? I'm not certain, but a through assoc *might* not end up actually calling the source's method.. maybe?
[16:00:55] suchness: smathy: I have one has_many that needs at, as well as a has_many through
[16:01:25] smathy: suchness, if it's needed by a hmt then you'll probably need it directly too.
[16:01:52] suchness: I think you're right, maybe I just need a better name.
[16:01:56] matthewd: Or make it private? If it does get called, it'll be via send.
[16:01:58] Sigfrid: has joined #RubyOnRails
[16:02:32] matthewd: (But yes, agree you'll probably actually want to keep it in the end)
[16:02:44] suchness: Yeah. Alright, thanks!
[16:03:31] mary5030: has joined #RubyOnRails
[16:06:51] chadhs: has joined #RubyOnRails
[16:07:20] mary5030: has joined #RubyOnRails
[16:07:29] i: has joined #RubyOnRails
[16:07:45] kitsuneyo: has joined #RubyOnRails
[16:08:45] riotjones: has joined #RubyOnRails
[16:09:44] meoblast001: has joined #RubyOnRails
[16:12:54] disgrntld: has joined #RubyOnRails
[16:13:52] banister: has joined #RubyOnRails
[16:14:23] EminenceHC: has joined #RubyOnRails
[16:15:56] doodlehaus: has joined #RubyOnRails
[16:20:38] B1n4r10: has joined #RubyOnRails
[16:22:14] Antoine59: has joined #RubyOnRails
[16:22:40] Antoine59: hello, have anyone used blueimp with rails before and can share the experience ?
[16:23:11] Antoine59: for info, blueimp is a jquery multi-file uploader
[16:23:52] Guest33405: has joined #RubyOnRails
[16:24:51] Megamos: has joined #RubyOnRails
[16:25:31] tubbo: antoine__: are you talking about https://github.com/blueimp/jQuery-File-Upload?
[16:25:52] pwnd_nsfw: has joined #RubyOnRails
[16:26:06] Antoine59: tubbo, exactly, but I'm really having a hard time getting it working
[16:26:52] benlieb: has joined #RubyOnRails
[16:27:21] Antoine59: the documentation is a little bit short, a little there for rails, and i'm a little bit newbie in how to integrate JS in rails, sorry for this, but if you can help I would be very grateful
[16:27:35] tubbo: antoine__: that's not 'blueimp', fwiw...it's actually called jQuery-File-Upload. the person who made it goes by the name of 'blueimp'
[16:28:47] Antoine59: tubbo, I'm sorry, yes blueimp/jQuery-File-Upload
[16:29:16] benlieb: has joined #RubyOnRails
[16:29:48] wilsonc91: has joined #RubyOnRails
[16:30:19] tubbo: antoine__: check out http://railscasts.com/episodes/381-jquery-file-upload
[16:30:29] dici: has joined #RubyOnRails
[16:30:37] tubbo: i thought it was a pretty good intro. hopefully it's still relevant enough
[16:32:37] Antoine59: the cast is a paid one right ?
[16:32:45] Antoine59: since I don't have a subscription
[16:33:01] jimbeaudoin: has joined #RubyOnRails
[16:33:41] freezevee: has joined #RubyOnRails
[16:35:57] sinkensabe: has joined #RubyOnRails
[16:38:32] Cache_Money: has joined #RubyOnRails
[16:39:34] tubbo: antoine__: might be
[16:40:24] Cervajz__: has joined #RubyOnRails
[16:40:28] tubbo: antoine__: i thought railscasts just worked for everyone now because ryan bates doesn't do them anymore. *shrug*
[16:41:03] Antoine59: tubbo, not sure of that, the cast is under "pro" and it asks for 9$ subscription per month
[16:41:13] Antoine59: anyhow I'm now trying to see a way under paperclip
[16:41:15] njero: has joined #RubyOnRails
[16:41:30] Antoine59: if that can help in having multi file upload then it would be great
[16:41:51] Antoine59: otherwise I will have to do the dirty work of handlers myself
[16:44:24] matthewd: I think you still have to purchase a subscription... but the first month lasts forever
[16:44:40] Cervajz: has joined #RubyOnRails
[16:45:47] pawnbox: has joined #RubyOnRails
[16:46:14] Megamosaren: has joined #RubyOnRails
[16:46:19] maxx88: antone_: i signed up for railscasts 6 months ago and still have my pro subscription but, was never charged a penny.
[16:46:36] tubbo: just sign up with github :D
[16:47:29] maxx88: tubbo: that was before i learned the power of github O:)
[16:47:58] Antoine59: I will :) thanks for sharing that
[16:48:14] s2013: has joined #RubyOnRails
[16:50:14] treehug88: has joined #RubyOnRails
[16:53:54] Guest33405: has joined #RubyOnRails
[16:55:54] smathy: ACTION mumbles to self - gotta get that protips site up
[16:56:27] tubbo: smathy: justthetips.com?
[16:56:50] RORapprentice: has joined #RubyOnRails
[16:57:06] smathy: tubbo, different tips entirely :)
[16:57:28] Axsuul: has joined #RubyOnRails
[16:57:55] pawnbox: has joined #RubyOnRails
[16:58:27] dionysus69: has joined #RubyOnRails
[16:58:28] fedexo: has joined #RubyOnRails
[16:58:50] voker57: has joined #RubyOnRails
[16:58:51] t4nkD: has joined #RubyOnRails
[16:59:02] smathy: It's tips on how to look up actual tips.
[16:59:26] tubbo: that would be the most boring screencast series ever
[16:59:31] tubbo: "how to google part 1 of 6"
[17:00:14] smathy: "Rails Special Edition: how to search on api.rubyonrails.org"
[17:00:21] t4nkD: Just a 3 second clip of someone screaming, "HOW DID YOU FIND ME!?"
[17:00:36] smathy: "Using ruby-toolbox.com, a professional's secrets."
[17:00:37] simplyianm: has joined #RubyOnRails
[17:00:54] wldcordeiro: has joined #RubyOnRails
[17:01:06] smathy: "How to add the word `gem` to your google searches for fun and profit."
[17:01:19] ruurd: has joined #RubyOnRails
[17:01:39] tubbo: "why googling the entire contents of your error actually works how the fuck did you not think of this?!"
[17:01:48] slash_nick: "how to identify opportunities to contribute to open source"
[17:02:04] smathy: "Advanced copy-and-paste into google"
[17:02:08] tubbo: 1.) go to any repo Radar administers
[17:02:13] tubbo: 3.) you are now the maintainer
[17:02:35] nonmadden: has joined #RubyOnRails
[17:02:37] slash_nick: tubbo: is there a list?
[17:02:51] smathy: slash_nick, don't be trolling this early in the morning.
[17:02:59] slash_nick: the rubygems.org/profiles/Radar list is quite short.
[17:04:06] mary5030: has joined #RubyOnRails
[17:04:07] smathy: https://rubygems.org/profiles/ryanbigg is a bit longer
[17:04:10] slash_nick: smathy: i could at least sign on as a watcher and participate in issue/PR discussions
[17:04:35] RegulationD: has joined #RubyOnRails
[17:04:50] slash_nick: oooh, spree! ;)
[17:05:06] EminenceHC: has joined #RubyOnRails
[17:05:19] tubbo: have fun with that slash_nick
[17:05:52] slash_nick: i've had my fun with spree... no mas, por favor
[17:06:17] lacrymology: has joined #RubyOnRails
[17:06:31] sankaber: has joined #RubyOnRails
[17:07:05] mary5030: has joined #RubyOnRails
[17:07:22] slash_nick: i'll watch redis-rails to keep tubbo from slacking
[17:07:24] yoongkang: has joined #RubyOnRails
[17:07:29] nonmadden: has joined #RubyOnRails
[17:08:13] acti0nman: has joined #RubyOnRails
[17:09:33] riotjones: has joined #RubyOnRails
[17:11:14] nonmadden: has joined #RubyOnRails
[17:11:27] loechel: has joined #RubyOnRails
[17:12:50] arup_r: got bored. A very long video I am watching to understand the codebase.. :(
[17:12:52] mary5030: has joined #RubyOnRails
[17:13:04] slash_nick: arup_r: which?
[17:13:27] carlosd: has joined #RubyOnRails
[17:13:49] mary5030: has joined #RubyOnRails
[17:13:56] arup_r: I am a new HIRE.. so training ... going on
[17:14:42] arup_r: got a NICE Mac Book Pro.. First time.. Most of the time I look at Mac not the video... :D
[17:15:02] tubbo: someone made a video about your codebase? that's cool
[17:15:36] carlosd: when using form_for with a resource, how can I change the convention used to generate the url?
[17:16:16] arup_r: yes.. traning about the App.. So LARGE.. codebase .. People are busy, thus made a one time video
[17:16:56] arup_r: tubbo: Today I got MySql working.. after 2 days.. Bad DB lol
[17:17:21] tubbo: that's hilarious, because i bet in the time it took to make that video, the codebase's architecture changed 4 times ;)
[17:17:24] tubbo: GOTTA GO FAST
[17:18:01] momomomomo: has joined #RubyOnRails
[17:18:29] darrik: has joined #RubyOnRails
[17:18:51] Eminence_: has joined #RubyOnRails
[17:19:11] Megamos: has joined #RubyOnRails
[17:19:21] rakm: has joined #RubyOnRails
[17:20:11] wldcordeiro: has joined #RubyOnRails
[17:20:24] arup_r: yeah true, because I see in the model self.primary_key = :id .. dunno from which version of Rails they got started... :D
[17:21:04] darrik: has joined #RubyOnRails
[17:21:55] tbuehlmann: carlosd, like, just change the URL of one form? or change how every route is created for a resource?
[17:22:01] htmldrum: has joined #RubyOnRails
[17:22:12] smathy: carlosd, are you aware of the Rails documentation at http://api.rubyonrails.org/ ? You can look up methods and it tells you their options.
[17:22:33] carlosd: tbuehlmann, every route for a resource
[17:22:55] darrik: has joined #RubyOnRails
[17:23:11] tbuehlmann: if it's just the resource part, check the to_param method in your model. if not, maybe change the path of the routes?
[17:23:13] jahbrewski: has joined #RubyOnRails
[17:23:28] tbuehlmann: an example of what you want would be great
[17:24:21] tubbo: arup_r: have fun with that one :P
[17:24:30] tubbo: legacy rails versions blow ass
[17:24:54] carlosd: tbuehlmann, I have a model called Event::AsLandingForm
[17:25:18] djbkd: has joined #RubyOnRails
[17:25:32] carlosd: when I use it in a form_for it generates the following url: event_as_landing_forms_path
[17:25:33] arup_r: tubbo: My mac looks nice :) .. I might take it and never come back to office... ;)
[17:26:08] carlosd: correcting, it's try to use the method event_as_landing_forms_path to generate the url
[17:26:08] arup_r: anyway people here are nice.. lot of foods around.. I am keep eating like hungry mouse ...
[17:26:25] carlosd: I would like it to use the plural of events
[17:26:51] carlosd: sorry, the plural of event
[17:26:57] carlosd: events_as_landing_forms_path
[17:27:44] tbuehlmann: this might help: https://coderwall.com/p/heed_q/rails-routing-and-namespaced-models
[17:27:46] slash_nick: carlosd: you should be able to define a route twice, giving it a different argument for `:as` each time
[17:28:07] Eminence_: has joined #RubyOnRails
[17:28:57] slash_nick: honestly though, carlosd ... i'd just let the missing "s" irk me once and move on
[17:29:35] lxsameer: has joined #RubyOnRails
[17:29:35] lxsameer: has joined #RubyOnRails
[17:30:24] Antoine59: has joined #RubyOnRails
[17:30:44] towski_: has joined #RubyOnRails
[17:32:17] atomical: has joined #RubyOnRails
[17:32:29] sarink: has joined #RubyOnRails
[17:32:43] arthurix_: has joined #RubyOnRails
[17:32:44] nertzy2: has joined #RubyOnRails
[17:34:47] baweaver: has joined #RubyOnRails
[17:35:47] Zadrel: has joined #RubyOnRails
[17:37:17] kitsuneyo: has joined #RubyOnRails
[17:37:24] safety_cut: has joined #RubyOnRails
[17:37:50] benlieb: has joined #RubyOnRails
[17:37:51] roxtrongo: has joined #RubyOnRails
[17:39:18] ibouvousaime: has joined #RubyOnRails
[17:40:03] SteenJobs: has joined #RubyOnRails
[17:40:29] yashinbasement: has joined #RubyOnRails
[17:40:42] safety_cut: has joined #RubyOnRails
[17:40:43] fschuindt: has joined #RubyOnRails
[17:41:25] desmondhume: has joined #RubyOnRails
[17:42:44] fschuindt: I'm looking for a gem that allows me to navigate resources by date range. Eg. Show all reports from the last month or the reports between day A and day B. What keyword should I looking for? Any gem recomendation?s
[17:44:41] slash_nick: fschuindt: not sure i understand what you're dealing with... does a report represent a row in a database?
[17:45:29] fschuindt: slash_nick: Yes, its a ActiveRecord class
[17:46:00] fschuindt: I think I have figured out how to do it
[17:46:16] fschuindt: But if you know any specific gem, would be great to know
[17:46:39] tubbo: fschuindt: you can just use sql queries for that, no need for a gem.
[17:46:52] bmalum: has joined #RubyOnRails
[17:47:11] slash_nick: google for "active record query interface" please :)
[17:47:32] fschuindt: tubbo: yes, that's what I'm doing, jut asked to know if there's any gem that mix this feature with pagination haha
[17:47:45] fschuindt: slash_nick: yup, I'm querying date rages
[17:48:38] slash_nick: fschuindt: well there's a few gems to help with pagination... check therubytoolbox, just search for pagination :)
[17:49:28] yardenbar: has joined #RubyOnRails
[17:49:40] lacrymology: I'm making a REST API, so basically, I'd like all of my routes to have as default parameter only: [:index, :show, :create, :update, :destroy] (i.e., no new or edit). What's the DRY-est way to do this?
[17:50:09] lacrymology: Just as a default. of course I might want to add other custom endpoints
[17:50:28] slash_nick: lacrymology: avoiding typing `except: [:new, :edit]`?
[17:50:36] fschuindt: slash_nick: yes, I know a fae, thank you :)
[17:50:37] |RicharD|: has joined #RubyOnRails
[17:50:43] TPBallbag: has joined #RubyOnRails
[17:51:06] tbuehlmann: there's always http://api.rubyonrails.org/classes/Object.html#method-i-with_options
[17:51:27] |RicharD|: I have a problem :) I've a User model very big( over 100 associations) - how can I do for have a User model more readable ?
[17:51:51] slash_nick: lacrymology: i don't know of a way to change what routes rails will write for you when using `resources :foobars`
[17:51:55] mostlybadfly: has joined #RubyOnRails
[17:51:55] matthewd: lacrymology: `scope except: [:new, :edit] do .. end`, I think
[17:52:12] matthewd: A scope for every occasion :|
[17:53:17] mrtomme: has joined #RubyOnRails
[17:53:18] s2013: has joined #RubyOnRails
[17:56:20] |RicharD|: any suggest ?
[17:56:20] slash_nick: that kind of `scope` usage is not very clearly documented in the guide... or at all
[17:56:21] thither: has joined #RubyOnRails
[17:57:20] slash_nick: |RicharD|: refactor using occam's razor? sorry... without knowing or seeing more, can't say much
[17:58:22] |RicharD|: I want only know if it's possible
[17:58:35] |RicharD|: move all these associations out from my User.rb
[17:58:48] slash_nick: |RicharD|: yeah, check out concerns!
[18:00:10] surrealanalysis: has joined #RubyOnRails
[18:01:01] EminenceHC: has joined #RubyOnRails
[18:05:35] s2013: has joined #RubyOnRails
[18:06:49] baweaver: has joined #RubyOnRails
[18:07:04] thither: has left #RubyOnRails: ()
[18:07:10] thither: has joined #RubyOnRails
[18:09:08] demonlove: has joined #RubyOnRails
[18:09:22] kitsuneyo: i have routes like locations/:country/:state/:city, but not all of my location records have a state. so i want to add a default value to state, and i was thinking of using '0'
[18:09:24] teaearlgraycold: has joined #RubyOnRails
[18:09:37] kitsuneyo: any better suggestions?
[18:09:38] teaearlgraycold: What's a good UI element for a many-to-one relationship?
[18:09:58] kitsuneyo: is it safe to use '0'?
[18:10:02] smathy: kitsuneyo, just make the :state optional.
[18:10:24] riotjones: has joined #RubyOnRails
[18:10:39] kitsuneyo: smathy, then my city routes won't work
[18:10:55] kitsuneyo: as there would be nothing in the /:state/ position
[18:11:59] smathy: kitsuneyo, why wouldn't they work?
[18:12:26] smathy: get "location/:country(/:state)/:city" => ....
[18:13:00] kitsuneyo: hmm, what is this get "location/:country(/:state)/:city" => ?? the brackets make it optional?
[18:13:42] smathy: kitsuneyo, yes, I tried to give you this information the other day when you asked about a /:year/:month/:day route, but you left too quickly.
[18:13:55] kitsuneyo: ah, thanks smathy
[18:13:59] arup_r: kitsuneyo: Hello.. Hi.. :D
[18:14:02] smathy: kitsuneyo, you're welcome.
[18:14:06] banister: has joined #RubyOnRails
[18:14:23] Antoine59: has joined #RubyOnRails
[18:14:24] kitsuneyo: i'll try this now
[18:15:18] raunicolae: has joined #RubyOnRails
[18:17:31] sbarg: has joined #RubyOnRails
[18:19:23] Lorn_: has left #RubyOnRails: ()
[18:19:38] |RicharD|: there is a good way for have some model in a subdirectory of model ?
[18:20:58] ellisTAA: has joined #RubyOnRails
[18:21:24] tubbo: |RicharD|: yeah just do it
[18:22:00] tubbo: |RicharD|: https://gist.github.com/tubbo/b727465b8f561c9a2bbc
[18:22:03] ellisTAA: am i right to conclude that the dif between a has_many through & has_many_and_belongs_to is that in a has_many through neither object belongs solely to the other
[18:22:30] |RicharD|: weird tubbo
[18:22:39] |RicharD|: I knew the solution with module Parent
[18:22:50] tubbo: |RicharD|: yeah but you can't name a module the same thing as a class.
[18:22:51] |RicharD|: or doing Parent::Child < ActiveRecord::Base
[18:22:52] htmldrum: has joined #RubyOnRails
[18:23:15] matthewd: EllisTAA: habtm is a special, simplified, case of hm:t (habtm is actually implemented internally as an hm:t with an anonymous model)
[18:23:56] ellisTAA: matthewd: what???s the dif btwn the two then?
[18:24:29] jamto11: has joined #RubyOnRails
[18:24:45] tubbo: |RicharD|: not sure if that will do what you want.
[18:24:59] lipoqil: has joined #RubyOnRails
[18:25:01] Cache_Money: has joined #RubyOnRails
[18:25:16] tubbo: |RicharD|: one thing to note is that if Parent hasn't been defined yet (e.g. you call Parent::Child somewhere in the app before calling Parent), it will be defined as a module by Ruby implicitly.
[18:25:17] |RicharD|: Honestly it do (I knew already the solution)
[18:25:37] |RicharD|: but create too much complexity in the app
[18:25:42] s2013: has joined #RubyOnRails
[18:25:44] tubbo: i keep my models dir "flat"
[18:25:53] |RicharD|: example: the table should be called parent_children
[18:26:10] |RicharD|: and other than this problem, there are multiple small problems
[18:26:18] matthewd: EllisTAA: habtm is a simple many-to-many relationship; hm:t can model both an indirect one-to-many or a many-to-many, where the join table has a defined model
[18:26:18] |RicharD|: you break the rails way ;)
[18:26:29] tubbo: "the rails way" is about as truthful as "the american dream"
[18:26:30] |RicharD|: for now I will keep in /models dir too
[18:26:46] |RicharD|: oh man! the american dream is true :D
[18:27:09] |RicharD|: (just kidding, but I'm doing the paperwork for visa in this moment :D )
[18:27:19] lacrymology: matthewd: I'll look into that
[18:27:26] ruurd: has joined #RubyOnRails
[18:27:47] jkamenik: has joined #RubyOnRails
[18:28:30] smathy: EllisTAA, http://guides.rubyonrails.org/association_basics.html#choosing-between-has-many-through-and-has-and-belongs-to-many and other places in that same guide will help you understand.
[18:28:34] s2013: hey if anyone has any solution to this, id be super grateful: https://github.com/activemerchant/active_merchant/issues/1933
[18:28:45] ellisTAA: smathy: read it, don???t undestand it
[18:29:11] kimegede: has joined #RubyOnRails
[18:29:32] smathy: EllisTAA, you read the whole guide, or just that section?
[18:29:46] ellisTAA: smathy: reading the whole guide, just got done with that section
[18:30:45] njero: EllisTAA: it specifically states how to choose.. No better english for that.
[18:30:58] tubbo: s2013: it means the gateway attempted to verify an SSL cert and failed. your payment provider is most likely using a self-signed cert, and this usually happens on their staging envrionments.
[18:31:26] ellisTAA: n_e_o: perhaps there???s info i???m lacking that the explanation uses, in other words i???m lacking some foundational knowldege ??? common part of learning
[18:31:37] tubbo: s2013: so you either need to set self.ssl_strict = false on the class level of your Gateway (like in an initializer), or figure out why your provider's cert isn't verifying
[18:31:56] s2013: thing is we also use recurly and that works fine.. but let me try that
[18:32:03] s2013: wouldnt that make it vulnerable self.ssl_strict = false ?
[18:32:09] smathy: EllisTAA, ok, sorry for interrupting. I can't help you if you read http://goo.gl/1YlukA and http://goo.gl/mjNiRW and still don't understand the difference.
[18:32:17] tubbo: like i said, if it's self signed you just need to not verify the cert because it will never verify
[18:32:37] smathy: EllisTAA, if you don't understand some part of the explanation then it'd be better to ask about that specifically.
[18:32:39] tubbo: s2013: i mean obviously you shouldn't set that in the production environment, but i assume you're using a test or staging service in your staging/dev servers
[18:32:47] ellisTAA: smathy: good point
[18:32:48] s2013: no. thsi is production
[18:33:02] s2013: we dont have a staging server..but locally it works fine
[18:33:04] tubbo: s2013: you need to talk to your payment provider and figure out why their cert has stopped validating.
[18:33:12] s2013: ok let me talk to them
[18:33:38] EminenceHC: has joined #RubyOnRails
[18:33:39] Frem: has joined #RubyOnRails
[18:34:22] hnanon: has joined #RubyOnRails
[18:34:25] njero: EllisTAA: k. simply saying: you can choose has_and_belong_to_may if you have no value for the joining table except the fact that it joins them
[18:34:43] benhuda: has joined #RubyOnRails
[18:34:54] colleenmcguckin: has joined #RubyOnRails
[18:35:16] s2013: im actually really weak on ssl and certificate related stuff. any thing you recommend i could read /watch to understand it better? tubbo
[18:35:33] ellisTAA: n_e_o: ok cool so conclusion, both association types associate them as has_many, the dif is that habtm does not allow you to add more fields to the join table?
[18:36:01] smathy: s2013, if this is in production, it's very unlikely that the issue is on the payment gateway side of things.
[18:36:29] njero: EllisTAA: ya.. technically there won't be a model which allows to modify that
[18:36:33] matthewd: s2013: Most likely, you have an outdated set of root certificates
[18:36:53] smathy: did it ever work from this host?
[18:36:55] ellisTAA: n_e_o: ok cool. thanks for helping me understand that
[18:36:59] s2013: how do i find out? i tried everything i could think of or read about..
[18:37:06] s2013: yeah we didnt have an issue until past couple of months
[18:37:13] njero: EllisTAA: :)
[18:37:23] smathy: EllisTAA, you *can* also use has_one with hmt
[18:37:35] s2013: anything i could read to understanda bout certificates better? like i said, its one of my weakpoints
[18:37:43] ellisTAA: smathy: what?
[18:38:00] smathy: EllisTAA, which bit?
[18:38:20] s2013: but i did download a newer .crt file and set the ssl path to that, didt work
[18:38:32] smathy: s2013, the openssl man page? I dunno, it's a fairly opaque cloud sometimes.
[18:38:35] Cervajz_: has joined #RubyOnRails
[18:38:44] matthewd: s2013: I'm sure there is, but it's not the sort of thing people here are likely to have a handy URL for
[18:38:45] smathy: s2013, one of the certs in your CA may have been revoked.
[18:38:56] roxtrongo: has joined #RubyOnRails
[18:39:20] matthewd: s2013: What's your OS?
[18:39:27] s2013: ill try the openssl chanenl
[18:39:28] s2013: ubuntu 14.04
[18:39:33] smathy: s2013, tl;dr is that updating your CA bundle is very simple, and solves the most common cause of this problem.
[18:39:50] s2013: i did update it as far as i understood. talked to our hosting company and they said it wa updated
[18:40:14] tubbo: s2013: see this is why you have a staging server :P
[18:40:19] s2013: tubbo tell me about it
[18:40:36] s2013: they dont understand/care at all about technology.. i talked about it befor
[18:40:45] smathy: s2013, ssh to the server and confirm for yourself, and use curl or something to test whether you can make an SSL connection to the gateway host.
[18:40:49] tubbo: that's pretty funny
[18:40:55] tubbo: considering they are a technology company
[18:41:15] s2013: im pretty much the only one on the tech team.. and we have an ios deeloper
[18:42:11] s2013: smathy yeah i ssh'd into the server and did bunch of troubleshooting stuff and they came up fine, ill try agian
[18:42:27] adac: has joined #RubyOnRails
[18:43:05] smathy: s2013, not sure what "bunch of troubleshooting stuff" means, but if it didn't include making an SSL connection to the remote host using a client that uses the same openssl library as ruby does, then it wasn't good enough.
[18:43:12] Frem: Unobtrusive JS question: if I listen to the `confirm` even that UJS emits and cancel it, can I later tell UJS to pick up where I stopped it and keep going?
[18:44:13] |PiP|: has joined #RubyOnRails
[18:44:15] tubbo: i mean you can re-submit the form, but you probably can't get the DOM/Ajax request back into the proper state. it doesn't just wait around, the request would have to be re-initiated
[18:44:41] |PiP|: if a model has two has_many associations that return the same type of model, what???s the best way to do a union that also returns an activerelation?
[18:45:13] Frem: tubbo: I'm fine with re-initiating the request; I'm just intercepting it so that I can show the user a confirmation that doesn't use the ugly default browser modal dialog.
[18:45:28] psmolen: has joined #RubyOnRails
[18:45:47] centrx: has joined #RubyOnRails
[18:46:49] xploshioon: has joined #RubyOnRails
[18:46:51] Frem: This is in the context of a bit of view code like this: `<%= link_to 'Destroy', article_path(article),??method: :delete,??data: { confirm: 'Are you sure?' } %>`
[18:47:04] Eminence_: has joined #RubyOnRails
[18:47:50] blackmesa: has joined #RubyOnRails
[18:49:19] tubbo: frem: ah, then you probably want to capture the click() of that element, then in the modal provide a button to click that basically goes to the same place as your link_to
[18:49:39] tubbo: or better yet, just don't even do the method: :delete BS in that link_to 'Destroy'
[18:51:01] Frem: tubbo: I was looking at the request, and I noticed that it's sending an authenticity_token attribute. Do you know where I'd get that to put it in the request?
[18:51:11] smathy: |PiP|, merge
[18:51:28] |PiP|: isn???t merge intersection?
[18:51:36] TPBallbag: has joined #RubyOnRails
[18:52:12] jetpackjoe: has joined #RubyOnRails
[18:52:38] Gizmokid2010: has joined #RubyOnRails
[18:52:40] s2013: smathy i can curl to the https endpoint of the payment processor fine
[18:52:42] s2013: from the server
[18:52:58] symbol: has joined #RubyOnRails
[18:53:09] matthewd: |PiP|: Sounds like you need Relation#or
[18:53:14] smathy: |PiP|, I suppose it is, yeah.
[18:53:30] smathy: |PiP|, I was just guessing that it'd work, not much to go on.
[18:54:00] smathy: |PiP|, there's no actual `union` in vanilla ActiveRecord, you'll need to add it in SQL yourself, or there are probably some gems that provide it.
[18:54:23] |PiP|: does Relation#or work on a scope?
[18:54:41] matthewd: |PiP|: As I don't imagine you're on master, you may be interested in https://rubygems.org/gems/where-or
[18:54:44] B1n4r10: has joined #RubyOnRails
[18:54:46] rgtk: has joined #RubyOnRails
[18:54:58] tubbo: frem: it comes from the <form>. rather than making a request twice, why not do something like this? https://gist.github.com/tubbo/d225fc21159217b9cc95
[18:55:03] rgtk: has joined #RubyOnRails
[18:55:58] smathy: s2013, not using the -k option or anything, right?
[18:56:10] doodlehaus: has joined #RubyOnRails
[18:56:57] doodlehaus: has joined #RubyOnRails
[18:59:07] simplyianm: has joined #RubyOnRails
[18:59:07] wilsonc91: has joined #RubyOnRails
[18:59:30] carlosd: has joined #RubyOnRails
[19:00:03] smathy: s2013, assuming your certs are in /etc/ssl/certs/ca-certificates.crt try running your ruby app with ENV['SSL_CERT_FILE']-"/etc/ssl/certs/ca-certificates.crt"
[19:00:34] nettoweb: has joined #RubyOnRails
[19:00:37] riotjones: has joined #RubyOnRails
[19:00:40] Frem: tubbo: I'll try something like that. Thank you for all your help.
[19:00:56] rhizome: has joined #RubyOnRails
[19:01:00] arthurix: has joined #RubyOnRails
[19:03:52] colleenmcguckin: has joined #RubyOnRails
[19:04:14] s2013: has joined #RubyOnRails
[19:04:27] mdel: has joined #RubyOnRails
[19:05:08] ur5us: has joined #RubyOnRails
[19:05:19] ur5us: has joined #RubyOnRails
[19:05:22] danieldocki: has joined #RubyOnRails
[19:05:26] diegorv: has joined #RubyOnRails
[19:07:38] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[19:08:55] ellisTAA: if i query the db using customer.orders, and then i want to check that it is the most up to date data does this empty the cache or check if it is up to date? customer.orders(true).empty?
[19:09:17] tubbo: EllisTAA: !try
[19:09:17] helpa: EllisTAA: Why don't you try it and find out for yourself?
[19:09:33] tubbo: DB-level caching shouldn't really be that much of a bottlenck though
[19:09:35] lorn: has joined #RubyOnRails
[19:09:46] Eminence_: has joined #RubyOnRails
[19:10:08] ellisTAA: tubbo: i???m not sure how i???d check ???
[19:11:05] build22_: has joined #RubyOnRails
[19:11:09] riotjones: has joined #RubyOnRails
[19:11:31] SteenJobs: has joined #RubyOnRails
[19:12:04] slash_nick: EllisTAA: the method ends with a question mark... i doubt it makes any changes to anything
[19:14:17] juddey: has joined #RubyOnRails
[19:14:57] workmaster2n: has joined #RubyOnRails
[19:14:59] zpe: has joined #RubyOnRails
[19:15:50] duncannz: has joined #RubyOnRails
[19:15:58] momomomomo: has joined #RubyOnRails
[19:16:45] duncannz: has joined #RubyOnRails
[19:16:47] baweaver: has joined #RubyOnRails
[19:17:19] rhizome: EllisTAA: how fast are people ordering?
[19:17:26] duncannz: has joined #RubyOnRails
[19:17:59] ellisTAA: rhizome: at light speed
[19:18:00] duncannz: has joined #RubyOnRails
[19:18:20] rhizome: ah, sarcasm.
[19:18:45] duncannz: has joined #RubyOnRails
[19:19:09] Cache_Money: has joined #RubyOnRails
[19:19:13] DoubleMalt: has joined #RubyOnRails
[19:19:21] duncannz: has joined #RubyOnRails
[19:20:27] hardtail: has joined #RubyOnRails
[19:20:39] jetpackjoe: has joined #RubyOnRails
[19:21:36] ellisTAA: rhizome: i???m just reading about caching http://guides.rubyonrails.org/association_basics.html#controlling-caching
[19:22:01] jetpackjoe: has joined #RubyOnRails
[19:22:30] s2013: smathy i found hte location of our crt file and a .key file.. do i point it to the crt file? anythign i need to do with the key
[19:22:38] s2013: its in /opt/nginx/ssl_new
[19:23:09] hackeron: has joined #RubyOnRails
[19:23:52] kadoppe: has joined #RubyOnRails
[19:23:58] lapide_viridi: has joined #RubyOnRails
[19:24:26] ellisTAA: ive never seen anyone write this in code but i???ve never seen production code yet. do ppl do this: bi-directional association http://guides.rubyonrails.org/association_basics.html#bi-directional-associations
[19:24:45] nertzy2: has joined #RubyOnRails
[19:26:32] htmldrum: has joined #RubyOnRails
[19:26:38] jamto11_: has joined #RubyOnRails
[19:26:57] build22__: has joined #RubyOnRails
[19:27:28] srinidhi: has joined #RubyOnRails
[19:28:45] umgrosscol: has joined #RubyOnRails
[19:31:20] stannard: has joined #RubyOnRails
[19:32:42] smathy: s2013, definitely not the key file, in that location it's more likely to be your own SSL cert, not a cert bundle. How long is it?
[19:33:34] s2013: the size is 3168
[19:33:34] smathy: EllisTAA, there's nothing there in that section that I haven't written somewhere.
[19:33:55] smathy: s2013, ok, that's just a single cert, that's not the CA bundle.
[19:34:01] matthewd: EllisTAA: The first two words are "It's normal"
[19:34:05] ellisTAA: smathy: so is that something i should always be doing
[19:35:18] matthewd: EllisTAA: Is what?
[19:35:25] s2013: smathy ENV['SSL_CERT_FILE'] returns the locaitno of hte .crt file but when i try processing the cc, still get the error. how do i find the CA bundle
[19:35:35] ellisTAA: matthewd: bi-directional associations
[19:35:36] smathy: EllisTAA, really should be in /etc/ssl/certs/ca-certificates.crt on Ubuntu 14, but look - just download a new one, you can get them from curl's site: http://curl.haxx.se/docs/caextract.html
[19:35:52] smathy: s2013, what location does it return?
[19:36:09] smathy: EllisTAA, usually you want both directions.
[19:36:18] s2013: i set the location.. for some reason it was returning nil then i did export SSL_CERT_FILE="/opt..."
[19:36:23] s2013: the location i mentioend earlier
[19:36:41] matthewd: EllisTAA: That's the heading, yes. What are you talking about "doing"? Explicit :inverse_of? Or just defining both associations?
[19:37:03] smathy: s2013, ok, so exporting it in your shell won't impact what your app server sees.
[19:37:22] s2013: smathy im just trying to run it in my console
[19:37:31] trosborn: has joined #RubyOnRails
[19:37:34] smathy: s2013, run what?
[19:37:44] matthewd: s2013: You still seem to be confusing your server's certificate with its root certificate store
[19:37:52] s2013: basically i ssh in and go into the console.. and then try to process a payment
[19:38:08] ellisTAA: matthewd: should i be including inverse_of on all models that you can do that to
[19:38:13] smathy: s2013, right, now tell me what "process a payment" means.
[19:38:32] smathy: s2013, fill in the blank, at your command prompt you type ___________________ and hit enter.
[19:38:35] s2013: GATEWAY.purchase(amount, cc) ... same method that throws the openssl error
[19:38:36] matthewd: EllisTAA: Read the last paragraph
[19:38:40] ellisTAA: smathy: do you prefer to use figaro gem for env variables or a local_env.yml file?
[19:38:42] s2013: i set the amount and set the cc
[19:39:14] smathy: EllisTAA, I have no opinion about either.
[19:39:17] bryanculver: has joined #RubyOnRails
[19:39:37] s2013: https://gist.github.com/ss2k/733272aabb61e868cbc6 smathy
[19:41:35] smathy: s2013, ok, that's the rails console, and I'm not seeing you setting the env var before running the code, nor am I seeing you showing me the value of the ENV var, so I'm assuming it's not set.
[19:43:57] s2013: smathy https://gist.github.com/ss2k/733272aabb61e868cbc6
[19:44:04] s2013: is that what you mean?
[19:44:33] smathy: s2013, yes but you need to set it before calling the method that relies on it being set.
[19:44:52] smathy: s2013, and I already told you that a file that's 3168 bytes in size is NOT the CA bundle.
[19:45:05] s2013: yeah i am loking for the CA bundle
[19:45:22] smathy: s2013, and you're sure it's not at /etc/ssl/certs/ca-certificates.crt ?
[19:45:28] s2013: let me check
[19:45:59] doodlehaus: has joined #RubyOnRails
[19:46:06] s2013: total 824
[19:46:34] workmaster2n: has joined #RubyOnRails
[19:46:57] s2013: smathy 255550 for ca-certificates.crt
[19:47:00] s2013: seems about right?
[19:47:31] youngbaks: has joined #RubyOnRails
[19:47:39] matthewd: s2013: Yep. What's the mtime on that?
[19:47:58] s2013: -rw-r--r-- 1 root root 255550 Oct 22 2014 ca-certificates.crt
[19:48:05] gavit: if I'm running rails console, and I want to open a file, where does my file have to be?
[19:48:12] s2013: can be anywhere gavit
[19:48:28] s2013: but easiest is at the root.. then you can j ust do Rails.root.join("filename")
[19:48:34] gavit: s2013: sorry, if I place it in the rootdir, what is the path to it in console?
[19:49:16] matthewd: s2013: sudo apt-get update; apt-cache policy ca-certificates
[19:49:41] sniperhaxor: has joined #RubyOnRails
[19:49:43] sniperhaxor: if i just want to create a simple "about me" page should i bother creating the controller, view, and route individually or is there some awesome command that does it for me
[19:50:09] tubbo: sniperhaxor: kind-of https://github.com/thoughtbot/high_voltage
[19:50:25] EminenceHC: has joined #RubyOnRails
[19:50:33] sniperhaxor: meh, okay thanks but screw that overhead
[19:50:37] smathy: s2013, sorry, I see when I originally mentioned that file I made a prefix error :(
[19:51:28] s2013: matthewd https://gist.github.com/ss2k/1f89caf978aa5e71c084
[19:52:41] chipotle: has joined #RubyOnRails
[19:52:43] matthewd: So, that's pretty clearly not up to date
[19:52:47] s2013: smathy what do you mean
[19:53:01] smathy: s2013, [12:35:36] smathy: EllisTAA, really should be in /etc/ssl/certs/ca-certificates.crt on Ubuntu 14, but look - just download a new one, you can get them from curl's site: http://curl.haxx.se/docs/caextract.html
[19:53:07] pkrnj: has joined #RubyOnRails
[19:53:23] smathy: s2013, I prefixed incorrectly, which probably explains why you didn't actually check for that file.
[19:53:42] smathy: ...20 minutes ago.
[19:54:04] ibouvousaime: has joined #RubyOnRails
[19:55:36] s2013: so just dl it from there? i dl it and put it in my lib directory and pointed it to that, didnt work.. http://jimneath.org/2011/10/19/ruby-ssl-certificate-verify-failed.html is what i tried
[19:55:45] tubbo: sniperhaxor: lol did you even look at the source? you're not gonna build anything with less overheard.
[19:55:47] tubbo: overhead*
[19:55:48] sarink: has joined #RubyOnRails
[19:56:19] smathy: s2013, so, you didn't try just setting ENV['SSL_CERT_FILE'] = "/etc/ssl/certs/ca-certificates.crt" then?
[19:56:42] s2013: not yet. i was doing what matthewd suggested to update it first..b ut im doing that now
[19:57:58] demonlove: has joined #RubyOnRails
[19:59:03] s2013: k i set it to that.. im going to copy and paste exactly waht i do smathy
[19:59:46] smathy: s2013, only what we expect from everyone.
[20:00:00] Cache_Money: has joined #RubyOnRails
[20:00:06] lacrymology: has joined #RubyOnRails
[20:02:44] mag42c_: has joined #RubyOnRails
[20:02:52] s2013: btw smathy matthewd and tubbo thanks for the assistance again
[20:02:55] s2013: got a meeting brb
[20:03:55] blackmesa: has joined #RubyOnRails
[20:04:11] drewdfw: has joined #RubyOnRails
[20:04:52] apotry: has joined #RubyOnRails
[20:06:34] solars: has joined #RubyOnRails
[20:06:35] yashinbasement: has joined #RubyOnRails
[20:09:20] surrealanalysis: has joined #RubyOnRails
[20:09:49] Antoine59: has joined #RubyOnRails
[20:10:10] yoongkang: has joined #RubyOnRails
[20:10:43] Guest50: has joined #RubyOnRails
[20:11:51] moei: has joined #RubyOnRails
[20:12:23] manfrin: has joined #RubyOnRails
[20:12:37] colleenmcguckin: has joined #RubyOnRails
[20:12:44] nertzy2: has joined #RubyOnRails
[20:13:16] riotjones: has joined #RubyOnRails
[20:14:22] sye: has joined #RubyOnRails
[20:18:22] lacrymology: is there a way to know which rake tasks are available?
[20:18:31] simplyianm: has joined #RubyOnRails
[20:18:33] lacrymology: my setup is not finding devise:install
[20:19:02] lacrymology: ah, it's a rails generator, not a rake task, sorry
[20:19:05] tubbo: STRAIGHT OUTTA CONFIG
[20:19:24] tubbo: CRAZY MOTHAFUCKA NAMED ICE_CUBE
[20:19:52] jetpackjoe: has joined #RubyOnRails
[20:21:35] sye: has joined #RubyOnRails
[20:21:49] smathy: lacrymology, `rake -AT` btw
[20:22:16] tubbo: rake -vT for verbose descriptions
[20:23:10] smathy: tubbo, I think -v is for seeing output while running a rake task, I don't think it makes any difference to the -T output.
[20:24:12] tubbo: smathy: used to
[20:24:14] tubbo: guess not anymore
[20:25:25] pwnd_nsfw: has joined #RubyOnRails
[20:26:00] smathy: tubbo, -D gives more information for some tasks, not sure what the heuristic is. Newlines maybe.
[20:26:42] futilegames: has joined #RubyOnRails
[20:26:57] tubbo: rake -TD literally does nothing
[20:27:07] htmldrum: has joined #RubyOnRails
[20:27:23] Pazician: has joined #RubyOnRails
[20:27:27] smathy: Oh, it's the first period.
[20:27:42] smathy: -T gives the desc to the first period, -D gives all the desc.
[20:28:09] sankaber: has joined #RubyOnRails
[20:28:24] smathy: OMG, -W gives the fucking location!!!! Where have you been all my life.
[20:30:28] rhizome: rake -P for hidden tasks and grouping
[20:30:36] baweaver: has joined #RubyOnRails
[20:31:23] tubbo: rhizome: you mean the ones that aren't documented?
[20:31:32] leonardoajim: has joined #RubyOnRails
[20:31:33] craysiii: has joined #RubyOnRails
[20:31:38] rhizome: yes, tasks without a desc line, i guess
[20:31:57] rhizome: more useful on a "what runs what" basis for me
[20:32:28] rhizome: while it has also been used to see why rake db:test:prepare didn't work on 4
[20:33:57] EminenceHC: has joined #RubyOnRails
[20:34:15] tubbo: doesn't it not exist anymore?
[20:34:34] rhizome: SYNTAX ERROR
[20:35:24] baweaver: has joined #RubyOnRails
[20:37:15] juddey: has joined #RubyOnRails
[20:37:59] Cervajz_: has joined #RubyOnRails
[20:39:09] smathy: The ones without descs are reported by -A (with -T or -D)
[20:39:55] Cervajz__: has joined #RubyOnRails
[20:40:03] roxtrongo: has joined #RubyOnRails
[20:41:05] tubbo: rake -DP doesn't work unfortunately.
[20:41:06] dikaio: has joined #RubyOnRails
[20:41:10] youngbaks: has joined #RubyOnRails
[20:41:14] mag42c_: has joined #RubyOnRails
[20:42:23] momomomomo: has joined #RubyOnRails
[20:44:00] VeryBewitching: has joined #RubyOnRails
[20:44:42] smathy: tubbo, not PT - it's D or P or T
[20:44:58] MEATCHICKEN: Hello - I am getting long request times on heroku
[20:45:00] smathy: P is nice but irrelevant now that I have W :)
[20:45:05] MEATCHICKEN: any idea how I can debug this?
[20:45:45] smathy: meatchicken, so you're not getting the long request times on other hosting providers?
[20:46:15] TPBallbag: has joined #RubyOnRails
[20:46:30] jwaldrip: has joined #RubyOnRails
[20:46:55] Antoine59: has joined #RubyOnRails
[20:47:36] ewnd9: has joined #RubyOnRails
[20:48:18] adac: has joined #RubyOnRails
[20:49:45] colleenmcguckin: has joined #RubyOnRails
[20:50:37] rhizome: before i switch, what's the word on the github redesign
[20:50:57] s2013: has joined #RubyOnRails
[20:52:30] moeabdol: has joined #RubyOnRails
[20:53:28] B1n4r10: has joined #RubyOnRails
[20:55:31] solars: what's the best way to set a default value for a rails model attr outside migrations? (I need a mysql text field as a particular column can reach up to 20k chars in certain cases and text does not allow a default value in the db)
[20:55:31] DukeDave: rhizome: nothing spectacular: http://i.imgur.com/0b2c5Zs.png
[20:55:58] futilegames: has joined #RubyOnRails
[20:56:16] DukeDave: Oh, I use https://www.zenhub.io/ too, so there's some of that gubbins on that screenshot ;)
[20:56:48] rhizome: huh, no sidebar is the main thing i guess
[20:57:02] slash_nick: sidebar is back up top!
[20:57:36] shinnya: has joined #RubyOnRails
[20:58:06] rhizome: "yeah, so click 'issues' in the sidebar...huh? oh, i mean the sidebar that goes across the top"
[20:58:43] TPBallbag: has joined #RubyOnRails
[20:59:03] lacrymology: I've got validate_confirmation_of :password on my user model, but I'm PUTting with just user[password]=pass and it's succeeding
[20:59:09] lacrymology: any pointers on how to debug this?
[21:00:02] slash_nick: rhizome: s/side/sideways/g
[21:00:35] rhizome: yes, the sidewaysbar
[21:01:17] rhizome: lacrymology: what are you expecting
[21:02:54] leonardoajim: has joined #RubyOnRails
[21:03:16] leonardoajim: has joined #RubyOnRails
[21:03:38] Phelps: has joined #RubyOnRails
[21:03:40] slash_nick: rhizome: before the last redesign the sidebar was a topbar...
[21:03:40] Phelps: so I'm getting a activerecord collection being printed into my <%= yield %> area and I have no clue where
[21:03:49] Phelps: anyone have any idea how to track something like that down ?
[21:04:07] jwaldrip: has joined #RubyOnRails
[21:04:24] slash_nick: phelps: do you have an <%= something.each %>?
[21:04:25] orikremer: has joined #RubyOnRails
[21:04:32] slash_nick: as opposed to <% something.each %>
[21:04:41] slash_nick: ACTION throws a `do` in there
[21:05:28] nickenchuggets: has joined #RubyOnRails
[21:05:28] nickenchuggets: has joined #RubyOnRails
[21:05:31] Phelps: slash_nick, yep, that was it
[21:05:36] Phelps: thanks man
[21:06:05] Phelps: jeez, I looked over that file a dozen times and missed it
[21:09:09] tuelz: has joined #RubyOnRails
[21:10:26] kies: has joined #RubyOnRails
[21:10:59] sbarg1: has joined #RubyOnRails
[21:11:02] mices: does acts_as_category tag nodes with their paths?
[21:11:09] mices: their complete paths?
[21:12:08] secretsignal: has joined #RubyOnRails
[21:12:49] matthewd: mices: Is that a gem?
[21:13:44] rakm: has joined #RubyOnRails
[21:14:04] riotjones: has joined #RubyOnRails
[21:14:13] DoubleMalt: has joined #RubyOnRails
[21:14:19] slash_nick: phelps: understand why? #each returns the collection
[21:14:24] jsrn_: has joined #RubyOnRails
[21:14:46] hightower4: has joined #RubyOnRails
[21:15:01] s2013: has joined #RubyOnRails
[21:15:52] trosborn: has joined #RubyOnRails
[21:17:20] s2013: has joined #RubyOnRails
[21:20:30] Scripore: has joined #RubyOnRails
[21:21:02] Giorgio: has joined #RubyOnRails
[21:21:11] Scripore: has joined #RubyOnRails
[21:21:44] EminenceHC: has joined #RubyOnRails
[21:22:18] Giorgio: hey. where usualy you put null object in folder structure ?
[21:22:23] n00bDev: has joined #RubyOnRails
[21:22:28] mices: matthewd: yes
[21:22:31] Radar: Giorgio: /dev/null
[21:22:53] Giorgio: i get it :)
[21:23:20] creature: Giorgio: You could stick it in lib.
[21:23:31] youngbaks: has joined #RubyOnRails
[21:23:38] Giorgio: like /lib/nullobjects?
[21:23:51] Giorgio: i read few articles
[21:23:57] Giorgio: but i didnt get it where to put them
[21:24:06] simplyianm: has joined #RubyOnRails
[21:24:28] rhizome: lib is fine
[21:24:55] baweaver: has joined #RubyOnRails
[21:24:55] Giorgio: like /lib/guest.rb or more deep ?
[21:24:55] creature: I was presuming you only had one, and was thinking along the lines of lib/nil_user.rb or similar.
[21:24:59] rhizome: Giorgio: have you watched the metz video about null object pattern?
[21:25:19] Giorgio: just pinned it in for later view
[21:25:36] nertzy2: has joined #RubyOnRails
[21:25:41] s2013: has joined #RubyOnRails
[21:25:43] rhizome: "nothing is something?" that's the one i'm thinking of
[21:26:45] momomomomo: has joined #RubyOnRails
[21:27:26] Giorgio: thank you guys
[21:27:59] n00bDev: hi, in one of my branches, some of the css styling is not being applied at all to my pages, i diffed checked against my master branch and there doesn't seem to be any issues. Any suggestions where to look? I've chcecked application.rb and application.css also already
[21:30:02] tuelz: n00bdev: load up chrome devtools resources (tab) -> frames -> etc... until you see stylesheets....see if your css is being loaded
[21:30:07] slash_nick: n00bdev: really not enough info... use dev.. ^
[21:30:28] lacrymology: rhizome: I expected the user[password_confirmation] parameter to be mandatory
[21:30:32] n00bDev: the stylesheet is being loaded, its just not being applied somehow?
[21:30:48] rhizome: lacrymology: i don't think that's what that validation does
[21:30:49] tuelz: n00bdev: then your css is wrong.
[21:30:51] n00bDev: i.e: it precompiles all the css into app.css right?
[21:31:14] tuelz: not necessarily.
[21:31:16] rhizome: rm public/assets
[21:31:55] youngbaks: has joined #RubyOnRails
[21:32:08] Antoine59: has joined #RubyOnRails
[21:33:27] Pazician: has joined #RubyOnRails
[21:33:50] tuelz: it sounds like you haven't even checked to see if your css is inside the precompiled app.css in the browser devtools
[21:34:23] tuelz: find out if they are being passed to the browser, if not you aren't including it somewhere or something
[21:34:35] s2013: quick question. .. how do i load up an environment variable when loading up a rails console
[21:34:57] wilsonc91: has joined #RubyOnRails
[21:35:00] rhizome: FOO=bar rails c
[21:35:03] tuelz: s2013: what do you mean?
[21:35:19] s2013: rhizome thanks.. tuelz what rhizome said
[21:35:24] tuelz: oh, I read instance variable for some reason lol
[21:35:46] sbarg: has joined #RubyOnRails
[21:37:54] yfeldblum: has joined #RubyOnRails
[21:40:04] Pumukel: has joined #RubyOnRails
[21:41:28] s2013: hmm how do i update my ca bundle
[21:42:31] momomomomo: has joined #RubyOnRails
[21:43:07] smathy: ACTION wonders why he bothers
[21:43:08] Radar: bundle update ca ? :P
[21:43:19] DrShoggoth: has joined #RubyOnRails
[21:43:27] rhizome: s2013: can you pretend like we aren't living in your head too?
[21:43:39] Radar: rhizome: improbable
[21:43:56] smathy: ACTION just wants s2013 to pretend like he didn't already tell him how to do this an hour ago ...oh wait, already is
[21:44:03] s2013: smathy i was looking at https://labs.bitpay.com/t/how-to-update-the-root-ca-cert-bundle-on-your-webserver-if-you-are-getting-curl-ssl-errors/315
[21:44:33] pwnd_nsfw: has joined #RubyOnRails
[21:44:54] smathy: s2013, whatever you do, whatever sites you go to, resources you look at, please, whatever you do, DON'T just look back in your IRC history.
[21:45:27] smathy: ACTION /IGNOREs for own sanity
[21:45:30] s2013: smathy are you talking about http://curl.haxx.se/docs/caextract.html this one
[21:45:38] matthewd: s2013: I'd start with `sudo apt-get install ca-certificates`
[21:46:49] mices: to manage categories with parents into views which will sometimes include select lists i should be using group_by or a gem?
[21:47:21] mices: manage/render
[21:47:21] s2013: matthewd i think that worked.. cause when i do ls -l on the certificate file i see this now -rw-r--r-- 1 root root 273790 Nov 18 21:46 ca-certificates.crt
[21:47:58] kitsuneyo: has joined #RubyOnRails
[21:48:19] smathy: mices, yep.
[21:48:46] Fire-Dragon-DoL: is the IRC server hosted in Radar's brain?
[21:48:56] EminenceHC: has joined #RubyOnRails
[21:48:58] Fire-Dragon-DoL: maybe the #rubyonrails channel
[21:49:03] smathy: Fire-Dragon-DoL, it's in his groin.
[21:49:30] Radar: smathy: Really?
[21:49:49] carlosd: has joined #RubyOnRails
[21:49:50] EminenceHC: has joined #RubyOnRails
[21:50:26] sinkensabe: has joined #RubyOnRails
[21:50:48] smathy: Radar, no, not really.
[21:51:31] Radar: mices: something like this https://gist.github.com/radar/43efeaf920397e029840
[21:51:58] Radar: mices: Also: if you tell me that .without_parent is undefined then I will mute you because you're not thinking for yourself and it's about time that started
[21:52:03] Radar: Can we not talk about my groin?
[21:52:18] Radar: mices: without_parent is homework for you to do.
[21:53:17] gentle_giant: has joined #RubyOnRails
[21:53:31] Keita: has joined #RubyOnRails
[21:54:28] rromanchuk: has joined #RubyOnRails
[21:54:32] rromanch_: has joined #RubyOnRails
[21:57:35] tenderlove: has joined #RubyOnRails
[21:58:02] Palsson: has joined #RubyOnRails
[21:58:38] hnanon: has joined #RubyOnRails
[21:59:13] Cervajz_: has joined #RubyOnRails
[21:59:49] Cervajz__: has joined #RubyOnRails
[22:00:32] s2013: has joined #RubyOnRails
[22:01:02] Guest50: has joined #RubyOnRails
[22:01:27] jetpackjoe: has joined #RubyOnRails
[22:02:07] s2013: has joined #RubyOnRails
[22:02:34] s2013: smathy https://gist.github.com/ss2k/c971a7d1b5d8e9c01687 this is exactly what i did.. as you see th e SSL_CERT_FILE is pointed to the right location (ca bundle is updated, openssl is updated).. let me know if im missing something. thank you
[22:02:40] safety_cut: has joined #RubyOnRails
[22:02:41] chipotle_: has joined #RubyOnRails
[22:03:45] matthewd: s2013: What's the hostname of the server you're talking to?
[22:04:20] s2013: its the authorize.net api endpoint i believe this is it: https://api.authorize.net/xml/v1/request.api
[22:05:45] jottr: has joined #RubyOnRails
[22:08:22] EminenceHC: has joined #RubyOnRails
[22:10:03] s2013: has joined #RubyOnRails
[22:10:34] fifi-v: has joined #RubyOnRails
[22:10:46] yoongkang: has joined #RubyOnRails
[22:11:19] rgtk: has joined #RubyOnRails
[22:11:20] pydave6367: has joined #RubyOnRails
[22:11:34] s2013: weird part is that i can make rquest to https .. so i think its just the activemerchant gem
[22:11:45] Antoine59: has joined #RubyOnRails
[22:13:54] freezevee: has joined #RubyOnRails
[22:14:29] colleenmcguckin: has joined #RubyOnRails
[22:14:53] riotjones: has joined #RubyOnRails
[22:15:04] |PiP|: has left #RubyOnRails: ()
[22:19:20] blackhuey: has joined #RubyOnRails
[22:19:35] darrencauthon: has joined #RubyOnRails
[22:20:05] moeabdol: has joined #RubyOnRails
[22:21:23] Axsuul: has joined #RubyOnRails
[22:22:17] hardtail: has joined #RubyOnRails
[22:24:27] SalexW: has joined #RubyOnRails
[22:25:33] DoubleMalt: has joined #RubyOnRails
[22:25:37] s2013: hmm i was told to recompile ruby with the latest openssl..
[22:25:51] xardion: has joined #RubyOnRails
[22:25:56] tubbo: ruby-install ftw
[22:26:54] s2013: ive used rvm before.. but on the server we arent using rvm
[22:27:00] gentle_giant: has joined #RubyOnRails
[22:27:27] Radar: s2013: +1 ruby-install
[22:27:42] Radar: http://ryanbigg.com/2015/07/deploying-a-rails-application-on-ubuntu-passenger-edition/
[22:27:57] Radar: Follow instructions here up to "gem install bundler" and with Ruby 2.2.3 and you should be fine.
[22:27:59] s2013: does it work with ruby 1.9.3
[22:28:04] Radar: You bet your ass.
[22:28:10] Radar: Oops sorry typo. I meant to just say "You bet."
[22:28:30] s2013: either works, k let me check out ruby install
[22:28:42] adaedra: The keys '.' and 'your ass' are next to each other, after all.
[22:28:59] Radar: adaedra: yup
[22:29:30] meoblast001: has joined #RubyOnRails
[22:29:58] s2013: Radar k i installed ruby-install do you know how to install it with the latest openssl support?
[22:30:11] Radar: s2013: What OS?
[22:30:15] s2013: ubuntu 14.04
[22:30:20] Radar: s2013: It should Just Work(tm)
[22:30:35] s2013: cause i have ruby 1.9.3 so if i run ruby-install 1.9.3 it will just recompile it?
[22:30:42] Radar: It will install it into a new place
[22:30:50] Radar: uninstall the existing 1.9.3 otherwise you'll get conflicts.
[22:31:13] Axsuul: has joined #RubyOnRails
[22:31:56] moei: has joined #RubyOnRails
[22:32:40] s2013: anyway to just overwrite the existing 1.;9.3 ?
[22:32:49] s2013: btw this is on our server, not local
[22:32:55] Radar: How did you install it in the first place?
[22:33:19] s2013: i didn't install it.. the app is few years old and before i came in.
[22:33:21] s2013: but we dont have rvm
[22:33:26] Radar: glhf then
[22:33:42] colleenmcguckin: has joined #RubyOnRails
[22:34:37] quazimodo: has joined #RubyOnRails
[22:34:50] Coldblackice: has joined #RubyOnRails
[22:36:31] nettoweb: has joined #RubyOnRails
[22:36:44] rhizome: you need a sysadmin
[22:36:45] tubbo: ruby-install will always prepare the proper dependencies and download/install them prior to building Ruby
[22:36:58] s2013_: has joined #RubyOnRails
[22:37:59] MaDErroR123: has joined #RubyOnRails
[22:38:35] Synthead: has joined #RubyOnRails
[22:39:55] baweaver: has joined #RubyOnRails
[22:40:56] s2013_: Radar can i just install ruby in a new directory and update the path to point to that?
[22:41:01] s2013_: you thik that will work?
[22:41:10] rhizome: that is essentially what rvm does
[22:41:21] Radar: s2013_: I would advise against it as "ruby" might point to one thing, and "gem" to another
[22:41:23] Radar: You can give it a shot.
[22:41:37] waka: has joined #RubyOnRails
[22:42:17] s2013_: ok .. or im going to try doing sudo apt-get remove ruby 1.9.3 hopefully that works
[22:42:18] s2013_: let me see
[22:42:29] Radar: ruby-1.9.3 probably.
[22:42:40] rhizome: what's the worst that could happen
[22:43:16] pwnd_nsfw: has joined #RubyOnRails
[22:43:29] s2013_: hmm unable to find.. rhizome this is on a cloned version of our production server
[22:43:56] Radar: s2013_: `which ruby` might give a clue
[22:43:58] s2013_: maybe i can just install rvm now
[22:44:19] s2013_: yeah its the /usr/local/bin
[22:44:34] s2013_: deploy@clone:/usr/local/bin$ which ruby
[22:44:44] Radar: Your second line didn't post.
[22:44:57] s2013_: oh /usr/local/bin/ruby
[22:45:15] rhizome: yes, you can install rvm independent of your system ruby setup
[22:45:17] neanderslob_: has joined #RubyOnRails
[22:46:13] s2013_: ok so this is my plan.. install rvm, install ruby 1.9.3 using ruby-install, ... and then not sure
[22:46:50] Radar: s2013_: Gist the output from dpkg -S /usr/local/bin/ruby
[22:47:24] s2013_: no path found matching pattern /usr/local/bin/ruby
[22:47:54] Radar: Great, so some rando thing installed it.
[22:48:58] s2013_: yeah.. i spent the whole day trying to fix this issue: https://github.com/activemerchant/active_merchant/issues/1933 so far ive done everything i could think of and everything other people suggested
[22:49:08] colleenmcguckin: has joined #RubyOnRails
[22:49:37] Radar: Maybe don't use Ruby 1.9.3 any more?
[22:49:46] Radar: Your 1.9.3 code will work on 2.2.3.
[22:50:04] s2013_: yeah i tried updating to ruby 2+ but it broke bunch of things. i can try again
[22:50:09] trosborn: has joined #RubyOnRails
[22:50:17] dethos: has joined #RubyOnRails
[22:51:04] s2013_: our .ruby-version file says 1.9.3-p448 but ruby -v is p550
[22:51:14] rhizome: install ruby 1.9.3 via rvm
[22:51:21] Radar: or ruby-install
[22:51:25] rhizome: bundle install
[22:51:28] Radar: RVM is way over kill for what you need.
[22:51:35] Radar: s2013_: So change your .ruby-version file.
[22:51:40] Radar: s2013_: There's a reason that point releases happen.
[22:51:58] s2013_: i just checked the ruby version file now
[22:52:05] rhizome: if you don't have any version manager installed, .ruby-version means nothing
[22:52:07] s2013_: i just inherited the project recently
[22:53:07] mag42c: has joined #RubyOnRails
[22:53:49] freezevee: has joined #RubyOnRails
[22:53:56] maxz: has joined #RubyOnRails
[22:54:09] s2013_: ok so ill just use ruby-install to install ruby 1.9.3 and then im still confused about the next step.. wouldnt it still use the older one or would it automatically use it from the new location?
[22:54:52] s2013_: ruby-install --system ruby .. can i install it in the system then? im guessing it will overwrite it?
[22:55:55] Pazician: has joined #RubyOnRails
[22:56:03] gentle_giant: has joined #RubyOnRails
[22:56:05] Radar: No idea if it will override it.
[22:56:27] cornerma1: has joined #RubyOnRails
[22:56:47] s2013_: well one way to find out
[22:57:02] adaedra: There's some changes to do in your environment to make it work with the new version. Better to let something like chruby handle it.
[22:57:10] Radar: ruby-install will be fine here.
[22:57:28] Radar: Ruby will be installed at a system path and then as long as wherever it installs it is in the $PATH env var then it will find it
[22:57:33] Radar: chruby is only useful if you want to switch between them.
[22:58:06] mices: smathy: yep meaning i should use just group_by or use a gem?
[22:58:45] s2013_: its compiling now.. bignum.c:3532:20: warning: variable ???save_x??? set but not used [-Wunused-but-set-variable]
[22:58:45] s2013_: volatile VALUE save_x;
[22:58:45] mices: Radar: ty
[22:58:47] manfrin: has joined #RubyOnRails
[22:58:53] s2013_: hopefully not a big deal
[22:59:19] banister: has joined #RubyOnRails
[22:59:51] owenjones: has joined #RubyOnRails
[23:02:08] Ropeney: has joined #RubyOnRails
[23:03:36] hnanon: What's the best way to rename a model?
[23:04:04] Ropeney: with a text editor
[23:04:16] Ropeney: and a migration
[23:04:34] hnanon: I got the first part down.
[23:04:53] rhizome: create model with proper name. copy code over. delete old code.
[23:05:32] rhizome: create model with new name that inherits from model with old name
[23:05:40] Ropeney: hnanon: rename_table :old_table_name, :new_table_name in a migration
[23:05:46] Radar: hnanon: !rule1
[23:05:46] helpa: hnanon: Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides.
[23:06:10] s2013_: !!! Installation of ruby 1.9.3-p547 failed! woo hoo.. :\
[23:07:17] EminenceHC: has joined #RubyOnRails
[23:07:44] mices: Radar: i'm gonna have to build link strings (meaning each element is a link) like this for categories "Household -> Kitchen -> Counter-top appliances -> Toaster Ovens" how am i gonna do that?
[23:08:30] Megamos: has joined #RubyOnRails
[23:08:40] mices: Radar: without reinventing the wheel
[23:09:50] baweaver: has joined #RubyOnRails
[23:10:18] craysiii: mices maybe try https://github.com/weppos/breadcrumbs_on_rails
[23:10:46] mary5030: has joined #RubyOnRails
[23:11:14] mices: craysiii: ty
[23:11:39] craysiii: i haven't used it but hope it works for you
[23:11:41] Scripore: has joined #RubyOnRails
[23:13:10] K_r3aPeR_: has joined #RubyOnRails
[23:13:19] tubbo: mices: "breadcrumbs" is an industry-standard term, just to help your googling
[23:13:41] stannard: has joined #RubyOnRails
[23:14:06] rhizome: tag hierarchy
[23:15:07] craysiii: yes that is the term i used to search for it on google, 'breadcrumbs'
[23:15:17] njero: hey. how can i validate uniqueness of one column with other column entries. Do i need to query separately or will validates_uniqueness_of have a provision? use_case: email and unconfirmed email
[23:15:19] elcontrastador: has joined #RubyOnRails
[23:15:36] smathy: n_e_o, look at the docs, there's a :scope option.
[23:15:42] riotjones: has joined #RubyOnRails
[23:15:54] safety_cut: has joined #RubyOnRails
[23:16:46] s2013_: ok installed successfully Radar .. ruby -v shows ruby 1.9.3p547.. moment of truth
[23:17:16] exadeci: has joined #RubyOnRails
[23:17:36] yfeldblum: has joined #RubyOnRails
[23:18:13] colleenmcguckin: has joined #RubyOnRails
[23:18:44] njero: smathy: ya, i saw. but will validates_uniqueness_of: email2, scope: [:email1] validate uniqueness of email2 in column email1 or combined ?
[23:18:58] thoraxe_: has joined #RubyOnRails
[23:19:13] smathy: n_e_o, I don't know what "...of email2 in column email1" means.
[23:19:28] smathy: n_e_o, it will ensure that the combination of email1 and email2 is unique.
[23:19:41] smathy: (ie. that email1 is unique within the scope of its email2 value)
[23:19:43] thoraxe_: has left #RubyOnRails: ()
[23:19:52] thoraxe: has joined #RubyOnRails
[23:19:57] thoraxe: it's been a long time since I've poked at rails. I'm trying to use capybara+rspec but i'm getting: undefined method `visit` when I run rspec
[23:20:09] thoraxe: i've got the capybara and rspec and rspec-rails gems and such
[23:20:12] njero: smathy: just two columns. I want to verify column email2 to with values of column email1
[23:20:23] manfrin_: has joined #RubyOnRails
[23:20:26] smathy: thoraxe, !code please
[23:20:26] helpa: thoraxe: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[23:20:26] njero: smathy: not combined scope
[23:20:50] craysiii: youve got the gems but are they in your Gemfile? have you run bundle?
[23:20:55] thoraxe: https://github.com/thoraxe/openshift3-rails-ci-demo/tree/master/spec
[23:21:02] smathy: n_e_o, sorry, I have no idea what you mean by "verify column email2 to with values of column email1" ?
[23:21:07] thoraxe: those aer the spec_helper, rails_helper, and the test (home_spec)
[23:21:22] thoraxe: craysiii: bundle install has been run, yeah
[23:21:40] thoraxe: "visit" is a capybara function so my guess is that i'm still not doing something right wrt. loading capybara
[23:21:42] kitsuneyo: has joined #RubyOnRails
[23:21:46] matthewd: n_e_o: I think you'll need a custom validation
[23:21:56] smathy: thoraxe, not how you specify a feature spec, read: https://www.relishapp.com/rspec/rspec-rails/docs/feature-specs/feature-spec
[23:22:07] njero: smathy: my use case is changing user email with confirmation. So while selecting second email, i need to verify email not bind with existing accounts
[23:22:17] Antoine59: hello, uploading one file is very simple in rails with fileup, carrierwave or paperclip and a straightforward thing, however, I need to have a multi file upload within the same form of the parent, and I really can't find anything clear about this anywhere, can anyone help ?
[23:22:22] mices: tubbo: ty
[23:22:29] thoraxe: smathy: so is that why visit is failing? i wouldn't think the feature spec description would bomb the function?
[23:22:31] njero: matthewd: ya.. will do by find query and add
[23:22:40] s2013: has joined #RubyOnRails
[23:22:43] krz: has joined #RubyOnRails
[23:22:50] craysiii: did you require capybara/rspec like it says https://github.com/jnicklas/capybara#using-capybara-with-rspec
[23:22:50] thoraxe: oh, the syntax is wicked different
[23:23:06] smathy: Sorry n_e_o, I'm still not understanding how you have two emails.
[23:23:16] thoraxe: craysiii: yes, did you look at the rails_helper.rb ?
[23:23:25] smathy: n_e_o, you don't mean the existing email that's already in your DB, and the new email coming in from the user?
[23:23:37] njero: smathy: have u seen devise confirmation module?
[23:23:39] rhizome: antoine__: you really can't find anyt8ing about rails multi file upload?
[23:23:43] thoraxe: you can't add "require 'capybara/rspec'" to spec_helper
[23:23:50] smathy: n_e_o, yes.
[23:24:01] matthewd: smathy: AIUI, two columns.. a given value can only occur in one row of one of them
[23:24:03] thoraxe: but i'll try
[23:24:16] njero: smathy: yeah like that. for confirmation i'm saving it in another column
[23:24:27] Antoine59: rhizome, at the case where I need to have the parent added within the same form while uploading, yes
[23:24:40] thoraxe: craysiii: if i add the require to spec_helper then I get: /home/thoraxe/.gem/ruby/gems/capybara-2.5.0/lib/capybara/rails.rb:6:in `block (2 levels) in <top (required)>': uninitialized constant Rails (NameError)
[23:24:46] lacrymology: I'm totally lost with devise. Should the UserController be a DeviseController?
[23:24:47] thoraxe: because rails isn't loaded yet.
[23:24:55] njero: smathy: so just though if there is a provision to check automatically through normal validations
[23:25:08] smathy: n_e_o, oh I get you, so you're storing it in a temporary location until they confirm it, but before you send them the confirmation you want to ensure there are no others in the "main" email field?
[23:25:09] colleenmcguckin: has joined #RubyOnRails
[23:25:23] njero: smathy: yeah
[23:25:24] rhizome: antoine__: wouldn't that be a normal nested form?
[23:25:25] smathy: n_e_o, yeah, I think matthewd had your meaning all along.
[23:25:41] smathy: n_e_o, I concur with his comment. Sorry man, that was so confusing for me.
[23:25:55] Antoine59: rhizome, with multiupload I couldn't find the way, nor could find any cast specifically for this
[23:25:57] njero: smathy: cool. thanks :)
[23:26:50] rhizome: antoine__: there may not be one with your specific combination, so you'll have to use the language
[23:27:19] Antoine59: rhizome, I know, this is why I'm asking help :)
[23:27:35] rhizome: well, do you know how to make a nested form?
[23:27:56] thoraxe: smathy: you were right. changing the specification made thevisit error go away. so i was just using ancient syntax
[23:28:11] Antoine59: I'm trying to teach myself now on this
[23:28:34] smathy: thoraxe, cool.
[23:28:38] arthurix_: has joined #RubyOnRails
[23:28:59] Liothen: has joined #RubyOnRails
[23:29:03] banister: has joined #RubyOnRails
[23:30:01] s2013: has joined #RubyOnRails
[23:33:29] Liothen: has joined #RubyOnRails
[23:34:14] jahbrewski: has joined #RubyOnRails
[23:34:19] Liothen: has joined #RubyOnRails
[23:34:20] Ropeney: lacrymology: did you get your devise sorted?
[23:34:24] thoraxe: thanks smathy craysiii
[23:34:35] smathy: You're welcome thoraxe
[23:37:03] diegoviola: has joined #RubyOnRails
[23:37:49] SalexW: has joined #RubyOnRails
[23:38:48] quazimodo: has joined #RubyOnRails
[23:38:51] flip_digits: has joined #RubyOnRails
[23:38:53] thorgi: what's best place for session-duration caching of complex objects, is it just session hash and db/memcache backend for it, or a better place?
[23:40:15] baweaver: has joined #RubyOnRails
[23:41:05] lemur: has joined #RubyOnRails
[23:41:27] Radar: thorgi: What schema do these objects have? Fixed or non-fixed?
[23:42:05] andatche: has joined #RubyOnRails
[23:42:48] adre: has joined #RubyOnRails
[23:44:33] thorgi: Radar: non-fixed (if I understand the question), they have dynamically created attributes; they're not AR/model objects, they're created by external module from slow API calls, hence attempt to make those calls at logon, then cache for the time of session
[23:44:49] lacrymology: Ropeney: not really. I'm making a REST API and I'm trying to set up my create and update user views.. and I just don't know how to get started
[23:44:58] Radar: thorgi: Store them in a JSON field in the database is what I'd do.
[23:45:05] andatche: has joined #RubyOnRails
[23:45:27] Ropeney: lacrymology: whats that got to do with devise though?
[23:45:37] lacrymology: I want to have them at the typical endpoints.. POST /users, PUT /users/:id for admins and PUT /users for normal users to update
[23:45:57] thorgi: Radar: okay, that's that session hash backed by DB would effectively do by serialising them I understand, do you say there are additional risks to storing in session that can be avoided by own implementation?
[23:46:03] lacrymology: Ropeney: user manager?
[23:46:07] gentle_giant: has joined #RubyOnRails
[23:46:07] tubbo: lacrymology: why can't normal users just PUT /users/<the_current_user's_id>
[23:46:18] lacrymology: tubbo: does that really matter?
[23:46:25] tubbo: lacrymology: just 1 less route for you to configure
[23:46:29] Ropeney: devise is for authenticating the user, for sessions
[23:46:40] tubbo: doesn't matter, just a little less complex imho
[23:46:55] Radar: thorgi: Sessions are limited to a certain size (which is a trivial detail that I can't remember), but databases are not. If you're storing API responses, I'm guessing they're going to be larger than just a couple of IDs. That's why I'm suggesting storing the data in a database field.
[23:47:00] lacrymology: Ropeney: also for creating users
[23:47:07] Cache_Money: has joined #RubyOnRails
[23:47:30] lacrymology: and according to the docs there's an "accont_update" method in the controller, so..
[23:47:48] thorgi: Radar: yep, the default is 4KB I think, but rails' session hash can be told to store in DB or memcache, or probably other places, I'm assuming that removes the size limit
[23:47:53] Ropeney: lacrymology: this doc? https://github.com/plataformatec/devise
[23:48:06] thorgi: Radar: but I'm blind to what other things are done to session hash otherwise, could be another risk that I don't see
[23:48:08] VeryBewitching: thorgi: If you happen to be using Postgres jsonb is your friend.
[23:48:12] trosborn: has joined #RubyOnRails
[23:48:16] Or1on: has joined #RubyOnRails
[23:48:16] Or1on: has joined #RubyOnRails
[23:48:43] matthewd: Confirm, session size limit is only the cookie factor
[23:49:22] lacrymology: Ropeney: yes, look at https://github.com/plataformatec/devise#strong-parameters
[23:49:48] thorgi: so large-ish external API data pertinent to the user logged in stored for session duration - best place session hash backed by DB?
[23:49:54] jrvlima: has joined #RubyOnRails
[23:50:29] Ropeney: lacrymology: so you don't have your own user controller? I think now's the time you need to show code then
[23:50:52] ismaelga: has joined #RubyOnRails
[23:53:13] matthewd: thorgi: For almost all session stores, you'll be loading the whole lot from storage on every request, so that might be a thing
[23:54:26] lacrymology: Ropeney: I have my own user controller. It doesn't do 'devise' things. For example, I cannot get the password confirmation field to be mandatory (PUT to the user with only the password parameter works). This is an inherited project, I didn't set devise up and I'm not even sure it's working properly
[23:54:36] lacrymology: but sure, I can paste the routes and the controller
[23:54:57] rhizome: sounds maybe overconfigured
[23:55:50] harisamin: has joined #RubyOnRails
[23:56:32] thorgi: matthewd: yep, will have to bite that - should still be considerably faster than the API (definitely atm, as queries go over internet), later the rails app will be closer network-wise to the API (local network), but one big API dump + DB queries and de-serialisation will hopefully still be faster than many small API calls
[23:56:35] roxtrongo: has joined #RubyOnRails
[23:56:41] dnewkerk: has joined #RubyOnRails
[23:58:07] lacrymology: Ropeney: http://dpaste.com/1SB8TNM see notes in L5 and L51
[23:58:41] matthewd: thorgi: Your other option would be to store it in cache, I guess
[23:58:57] owenjones: has joined #RubyOnRails
[23:59:24] yfeldblum: has joined #RubyOnRails
[23:59:38] matthewd: That way expiry etc is taken care of for you