« Back to channel list

#RubyOnRails - 21 December 2015

« Back 1 day Forward 1 day »
[00:00:52] kmckelvin: has joined #RubyOnRails
[00:01:22] sandstrom: has joined #RubyOnRails
[00:01:57] kpollich: has joined #RubyOnRails
[00:02:18] n008f4g_: has joined #RubyOnRails
[00:03:16] chnwu: has joined #RubyOnRails
[00:05:55] chnwu: has left #RubyOnRails: ()
[00:06:15] chnwu: has joined #RubyOnRails
[00:07:22] Tokenizer: has joined #RubyOnRails
[00:10:48] iateadonut: has joined #RubyOnRails
[00:10:56] kmckelvin: has joined #RubyOnRails
[00:11:25] edwinvdgraaf: has joined #RubyOnRails
[00:12:24] nyaa: has joined #RubyOnRails
[00:12:29] _Tariq: has joined #RubyOnRails
[00:12:53] hardtail: has joined #RubyOnRails
[00:13:06] chnwu: hello can someone help me with postgres things
[00:14:43] chnwu: actually i can't even do rails s
[00:15:27] djbkd: has joined #RubyOnRails
[00:15:40] ascarter: has joined #RubyOnRails
[00:17:24] chnwu: getting "The program 'rails' is currently not installed." thing the second time with rvm
[00:17:32] chnwu: how do i fix that?
[00:17:45] FailBit: use the binstub
[00:19:30] chnwu: sorry i'm very new what is binstub
[00:21:17] rhizome: do you have an app?
[00:22:45] chnwu: yes, i upgraded ubuntu and everything became a mess
[00:22:52] owenjones: has joined #RubyOnRails
[00:24:11] ElFerna: has joined #RubyOnRails
[00:24:20] Radar: chnwu: "rvm" is the first problem
[00:24:23] Radar: chnwu: rvm implode --force
[00:24:34] Radar: chnwu: then: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
[00:24:40] edwinvdgraaf: has joined #RubyOnRails
[00:25:51] ss_much: has joined #RubyOnRails
[00:28:01] djbkd: has joined #RubyOnRails
[00:29:40] Papierkorb: Radar: instead of that bash-only source magic, you can also just do: $ exec $SHELL
[00:30:00] atomical: has joined #RubyOnRails
[00:30:17] idefine: has joined #RubyOnRails
[00:30:17] Papierkorb: Which also makes sure that there are less left-overs from fiddling with variables previously
[00:30:36] FailBit: >implying new users don't have bash
[00:31:08] owenjones: has joined #RubyOnRails
[00:31:19] Papierkorb: FailBit: You'd think! People at my company were using zsh long before I joined, but their knowledge of it didn't even scratch bash capabilities
[00:31:37] Radar: Papierkorb: patches welcome https://github.com/radar/ryanbigg.com/blob/master/_posts/2014-10-05-ubuntu-ruby-ruby-install-chruby-and-you.markdown
[00:33:12] tuelz: has joined #RubyOnRails
[00:36:13] Papierkorb: Radar: I created a PR through the magic of Githubs edit file button
[00:36:31] Radar: Papierkorb: truly magical
[00:36:47] Papierkorb: I even tested it! Amazing!
[00:37:44] codelahoma: has joined #RubyOnRails
[00:38:04] nettoweb: has joined #RubyOnRails
[00:41:36] pawnbox: has joined #RubyOnRails
[00:48:51] owenjones: has joined #RubyOnRails
[00:48:54] sarink: has joined #RubyOnRails
[00:49:31] bronson: has joined #RubyOnRails
[00:51:10] htmldrum: has joined #RubyOnRails
[00:57:00] _Tariq: has joined #RubyOnRails
[00:57:32] johnflux: has joined #RubyOnRails
[00:57:33] johnflux: has joined #RubyOnRails
[00:58:30] jessemcgilallen: has joined #RubyOnRails
[01:01:08] sevenseacat: has joined #RubyOnRails
[01:03:27] AnoHito: has joined #RubyOnRails
[01:03:47] nyaa: has joined #RubyOnRails
[01:06:45] doodlehaus: has joined #RubyOnRails
[01:09:14] selfagency: has joined #RubyOnRails
[01:09:32] DavidDudson: has joined #RubyOnRails
[01:10:05] sNipn: has joined #RubyOnRails
[01:15:17] shock_one: has joined #RubyOnRails
[01:18:21] paradisaeidae: has joined #RubyOnRails
[01:18:29] kmckelvin: has joined #RubyOnRails
[01:20:29] pontiki: good stuff
[01:21:17] pawnbox: has joined #RubyOnRails
[01:22:57] moeabdol: has joined #RubyOnRails
[01:28:32] alphaatom: has joined #RubyOnRails
[01:28:43] ElFerna: has joined #RubyOnRails
[01:30:57] shibabu: has joined #RubyOnRails
[01:33:57] tuelz: has joined #RubyOnRails
[01:36:51] alex88: has joined #RubyOnRails
[01:37:11] RegulationD: has joined #RubyOnRails
[01:40:34] ascarter: has joined #RubyOnRails
[01:40:51] beginnerRoR7: has joined #RubyOnRails
[01:41:35] twilling: has joined #RubyOnRails
[01:42:05] rickmasta: has joined #RubyOnRails
[01:43:42] idefine: has joined #RubyOnRails
[01:45:08] rickmasta: has joined #RubyOnRails
[01:47:10] twilling: has joined #RubyOnRails
[01:47:25] lessless: has joined #RubyOnRails
[01:48:46] pureofpure: has joined #RubyOnRails
[01:49:29] pureofpure: guys i am having an issue, finaly after 3 days i got to upload generated xlsx file to amazon s3
[01:49:51] pureofpure: but when i try to read the file from amazon i got this msg : This XML file does not appear to have any style information associated with it. The document tree is shown below.
[01:50:50] twilling: is it only when you try to read it from amazon or have you downloaded the generated file and tried opening it from the disk?
[01:50:55] owenjones: has joined #RubyOnRails
[01:51:03] FailBit: that's your browser
[01:51:08] FailBit: the actual XML file should be fine
[01:51:18] twilling: oh - yeah that ^
[01:51:21] pawnbox: has joined #RubyOnRails
[01:53:05] pureofpure: now i tried to download it
[01:53:11] pureofpure: and i got the error fails
[01:53:25] pureofpure: i think that the error is in the code
[01:53:33] pureofpure: when i try to upload to amazon
[01:54:16] harai: has joined #RubyOnRails
[01:54:29] pureofpure: anyone know how to get file with ToXls::Writer ?
[01:54:32] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[01:54:49] arBmind: has joined #RubyOnRails
[01:57:02] pontiki: pureofpure: that message is not an error
[01:58:07] pureofpure: i am afraid that the xls file is not rendering with the right way
[01:58:41] FailBit: you are afraid of the wrong things
[01:58:52] FailBit: ACTION turns off the lights and tells ghost stories
[01:59:44] pureofpure: so the problem may be with the browser?
[02:00:04] pontiki: you haven't shown a problem with anything but your understanding yet
[02:00:20] sevenseacat: pureofpure: please show us something, anything, to help us help you wiht your problem. this has been days now and we've got nothing to go on.
[02:00:28] pontiki: if you tell the browser to just load an xml file (what an xlsx file *is*) it won't have any style information.
[02:00:38] pontiki: that message was just a warning, as i said
[02:00:47] pureofpure: let me i show you
[02:02:35] upsell5: has joined #RubyOnRails
[02:02:42] DLSteve: has joined #RubyOnRails
[02:02:43] nyaa: has joined #RubyOnRails
[02:02:47] Hazim: has joined #RubyOnRails
[02:03:32] one_zero: has joined #RubyOnRails
[02:04:47] pureofpure: https://gist.github.com/stelro/cd6a45a61ab89d52b5c4
[02:04:53] pureofpure: look where i am wrong
[02:06:57] alphaatom: has joined #RubyOnRails
[02:07:12] pureofpure: i dont know if i am trying to pass the xlsx with the right way
[02:08:26] pureofpure: i am trying to use this method
[02:08:27] pureofpure: ToXls::Writer.new(users, :name => 'Users').write_io(file) # writes to a given file
[02:08:33] pureofpure: which is from to_xls gem
[02:08:51] pureofpure: but i dont know what i am doing wrong
[02:09:02] _Tariq: has joined #RubyOnRails
[02:09:15] pureofpure: damn i spend 3 days in row for this thing, and i got nothing
[02:09:53] pontiki: i don't understand that code at all
[02:10:28] rickmasta: has joined #RubyOnRails
[02:10:43] pureofpure: ok i can explain you
[02:10:50] pontiki: no, please don't
[02:12:53] pontiki: you're mixing up Users, Clients, and Contracts all together. the upload_to_s3 is called from the Contract method, yet you're calling it the User Model down below. The thing you're sending in the render is an S3 bucket
[02:13:43] pureofpure: sorry my bad
[02:13:57] pureofpure: replace Clients, and Contracts just with user
[02:14:03] pontiki: you do that
[02:14:18] FCser: has joined #RubyOnRails
[02:14:28] pontiki: and if that is not the *actual* code you have, don't bother posting it
[02:16:09] pureofpure: https://gist.github.com/stelro/4d79f6bba2262152bb5d
[02:16:16] pureofpure: here is the right one pontiki
[02:16:24] pureofpure: sorry my bad
[02:16:41] tvon: has joined #RubyOnRails
[02:19:04] pontiki: great. now show the errors.
[02:19:15] kmckelvin: has joined #RubyOnRails
[02:21:00] pureofpure: i dont have any error in the rails console, but when i am trying to download the file this is what i got
[02:21:01] pureofpure: https://gist.github.com/stelro/cadc16e0203daf980c95
[02:21:13] pureofpure: also when its downloaded to PC, its broken
[02:21:40] pontiki: you haven't set any permissions for people download that object
[02:21:45] sevenseacat: "access denied" looks pretty straightforward
[02:21:53] pontiki: line 4: AccessDenied
[02:22:03] pureofpure: i have set it all to public in amazon
[02:22:03] pontiki: line 5: Access Denied
[02:22:35] pontiki: so you say, yet here amazon doesn't think so
[02:23:03] pureofpure: ok i checke it again, but i set it to everyone
[02:23:09] pontiki: given the upload code you're showing doesn't have *any* permissions / acl code, i highly doubt it
[02:23:12] pureofpure: in the amazon properites
[02:23:57] doodlehaus: has joined #RubyOnRails
[02:24:35] pureofpure: pontiki: but my code looks ok? i mean the file is rendering with the right way?
[02:25:01] xcesariox: has joined #RubyOnRails
[02:26:50] pureofpure: no , nothing changed, i set premissions to everyone / read/ wriete/download / but i got the same error
[02:27:04] aruntomar: has joined #RubyOnRails
[02:27:34] pontiki: no, your code still makes no sense
[02:27:51] sankaber: has joined #RubyOnRails
[02:28:32] pontiki: i don't know why you have something to store a file in S3 in your User model, i don't know what you're doing to send it to S3 in the first place in a controller for a user awaiting a response, i don't know why you don't write tests to see what is happening...
[02:29:18] doctorly: has joined #RubyOnRails
[02:31:00] doctorly: Hello, I am working on a resume, to hopefully obtain my first job. I am having a hard time thinking of a proper objective, and which points to focus on. Here is my pre-draft, https://gist.github.com/brendenyule/34c096aa4a3ee230f384 , any advice is greatly appreciated.
[02:31:29] sevenseacat: doctorly: why do you want a position in web development?
[02:32:30] doctorly: sevenseacat: Do you think that would be a good objective, or are you actually asking?
[02:32:30] kpollich: has joined #RubyOnRails
[02:32:36] i: has joined #RubyOnRails
[02:32:45] sevenseacat: would you be happy sitting in a corner banging out wordpress templates? thats a position in web development
[02:32:52] sevenseacat: I'm asking to help you clarify your objective :)
[02:34:38] Jasaka: has joined #RubyOnRails
[02:34:43] tuelz: has joined #RubyOnRails
[02:35:01] pontiki: i'll pass on the same advice i've always heard: write you resume based on the problems encounteres, solutions you made, and the results you achieved, in a way that will appeal to the hiring manager
[02:35:26] pontiki: listing duties and responsibilities is boring, and provides no differentiation
[02:35:47] sevenseacat: +1 - based on those descriptions, I have no idea what you actually did
[02:36:11] doctorly: sevenseacat: I see what you mean, yeah, I have just put a placeholder there for now. Do you think I should put my reason for wanting to be a ruby on rails dev?
[02:36:52] sevenseacat: doctorly: so you'd be happy sitting over there in a corner managing a rails 1 app with no hope of upgrading it? thats also being a ruby on rails dev
[02:37:02] sevenseacat: I'm trying to get to what your actual objective is :P
[02:37:14] sevenseacat: 'to get a job' is of no interest to anyone
[02:37:21] doctorly: I was under the impression that I should explain my experience and accomplishments in the cover letter, should I do it here as well?
[02:38:26] sevenseacat: (this being said, I don't have a resume and haven't had one for like five years)
[02:39:03] syzygy_: has joined #RubyOnRails
[02:41:10] doctorly: sevenseacat: My personal objective is really clear: I want to secure a job, so I can pursue a career in development. I love problem solving, and I especially love the constantly developing problems and solutions you get to encounter when working on web applications. I love constantly having to learn new things, finding solutions. I also love working in a team, cooperating with intelligent people. BUT
[02:41:16] doctorly: the hard part is wording this in a professional manner.
[02:41:18] doctorly: that appeals to an employer
[02:41:59] sevenseacat: now that sounds like an objective - you want to be constantly challenged by solving problems and solutions that you can encounter when working on web applications, you want to keep learning
[02:42:12] sevenseacat: (to me anyway)
[02:42:35] sevenseacat: I once worked with a guy who said he didnt like learning new things. he didnt last very long
[02:43:19] sevenseacat: especially given he was hired as a junior dev ._.
[02:43:46] twilling: its sad when people stop caring :(
[02:43:58] matthewd: I never paid attention to the objective, or noticed whether there was one ??\_(???)_/??
[02:44:07] doctorly: I will try to word it more profesionnaly. Thanks.
[02:44:14] doctorly: matthewd: when hiring?
[02:44:34] matthewd: doctorly: Yeah
[02:45:16] kmckelvin: has joined #RubyOnRails
[02:46:03] nyaa: has joined #RubyOnRails
[02:46:29] doctorly: matthewd: Do you suggest I explain problems I encountered and how I solved them on the resume? or just in the cover letter, leaving only the basic information on the resume.
[02:48:55] arooni: has joined #RubyOnRails
[02:52:15] mary5030: has joined #RubyOnRails
[02:53:59] johnflux: has joined #RubyOnRails
[02:54:00] johnflux: has joined #RubyOnRails
[02:54:34] Bloomer: has joined #RubyOnRails
[02:54:46] krz: has joined #RubyOnRails
[02:55:49] nocd: has joined #RubyOnRails
[02:57:12] matthewd: doctorly: You might want to consider a Profile section instead of an Objective, maybe?
[02:57:25] nyaa: has joined #RubyOnRails
[02:57:58] matthewd: I had to write a resume for the first time last year, and found that easier to write, because it can be more like those "I love.." statements.
[02:59:01] sevenseacat: I remember hating writing resumes. I'm not good at selling myself
[02:59:26] doctorly: Yeah, it takes so much more work for me, compared to coding lmao
[02:59:48] doctorly: by that I mean, it takes so much more motivation to do so little work.
[02:59:52] sevenseacat: I'm glad I'm starting to build up a portfolio of things I can just point people to, like a blog, stack overflow profile, etc.
[03:00:16] matthewd: doctorly: This all depends on where you're applying, too
[03:00:35] sevenseacat: and what level of role you're applying for
[03:01:28] sarink: has joined #RubyOnRails
[03:01:32] sevenseacat: for a junior role, I'd argue that openness and enthusiasm matter a lot more than achievements
[03:01:41] matthewd: The more corporatey, the more you may need to structure your resume the way the Internet say HR wants it to be, regardless of what might actually carry the most info for the person making the final decision
[03:01:55] sevenseacat: indeed. keyword stuffing :D
[03:02:16] doctorly: lmao this sucks
[03:03:07] pawnbox: has joined #RubyOnRails
[03:03:11] doctorly: Well I would say, I want to be working at a more startup-y place, and there are enough here, but I will probably be applying to both types in mass
[03:03:26] doctorly: because it will be my first payed job, I really just need to get it
[03:03:28] matthewd: e.g., the Skills section full of keywords may be important for HR, whereas I'd rather see some of those strung into semi-sentences, giving at least a hint whether you know how to spell Linux, or can make it do all the things
[03:04:04] sevenseacat: mmmm good luck if you're just papering the town with resumes hoping to get any old job
[03:04:10] sevenseacat: our advice doesnt really mean much
[03:04:37] doctorly: sevenseacat: I am going to have lunch meetings as well, but I need to do both, right?
[03:05:17] matthewd: And tbh, there's a good chance there's very real variation in what's good/bad by region
[03:05:39] sevenseacat: indeed. mine and matthewd 's advice might be completely irrelevant in the US, given we're both australian :P
[03:05:41] matthewd: So our AUian advice could lead you completely astray
[03:06:13] matthewd: OTOH, I now work for a US company, so ??\_(?????????)_/??
[03:06:29] doctorly: sevenseacat: Like I am going to be introduced to a few places, and recommended, but I feel like I am going to still need to apply to a variety of places to be sure I get a job.
[03:06:44] sevenseacat: even within AU its so different. living in Perth, and working for a Sydney company, is like whoa
[03:06:56] alex88: has joined #RubyOnRails
[03:07:42] sevenseacat: doctorly: that sounds totally foreign to me - how can you be recommended if you have no experience?
[03:08:02] doctorly: sevenseacat: Unpaid internship for over a year
[03:08:12] sevenseacat: ah. thats totally illegal over here lol
[03:08:17] sevenseacat: (and should be everywhere)
[03:08:26] doctorly: sevenseacat: For a guy that is friends with a lot of startups
[03:08:36] sevenseacat: mmm slave labour
[03:08:58] doctorly: sevenseacat: Yeah, it isn't the slave labour type of internship, it is more two people trying to make an app, but one knows what is going on
[03:09:01] sevenseacat: gonna back out of this conversation now, don't think I have anything to add
[03:09:18] sevenseacat: other than snarky comments
[03:09:30] Radar: did someone say snarky?
[03:09:49] doctorly: sevenseacat: he basically has just taught me rails
[03:09:52] codeurge: has joined #RubyOnRails
[03:10:26] doctorly: sevenseacat: But it has gotten to the point, that if I am working, and not getting money, it would be slave labour lmao
[03:11:01] moeabdol: has joined #RubyOnRails
[03:12:01] doctorly: sevenseacat: I don't mind the comments, to a certain degree I agree. But on one hand I really really wanted to learn, and he has been an amazing teacher.
[03:14:03] ElFerna: has joined #RubyOnRails
[03:14:43] doctorly: and also thanks for the suggestions everyone (sevenseacat matthewd pontiki etc.) I am going to try my best to put a lot of it to practice
[03:15:29] matthewd: doctorly: As a specific point, if you've actually been writing actual Rails actual code (controllers/models), your current list of duties doesn't make that terribly clear
[03:16:41] shock_one: has joined #RubyOnRails
[03:17:13] Pupeno: has joined #RubyOnRails
[03:17:15] doctorly: matthewd: Can you expand on how I should mention it? Do you mean like, Say that I have made models? And controllers? I have done a lot of different stuff, and it is difficult to decide what I should focus on.
[03:19:00] DLSteve: has joined #RubyOnRails
[03:20:31] matthewd: Some form of explicit "Ruby on Rails application development" would be sufficient. Just looking at the current list, I see design, and I see specs... and those are both things that one could reasonably be assigned while not actually doing straight ruby development, IMO.
[03:21:39] matthewd: An "Implementing stated application requirements" shape may be more... active-sounding?
[03:22:40] doctorly: matthewd: Yeah, that makes a lot of sense. I didn't even think of that. Thank you
[03:23:14] Graphettion: has joined #RubyOnRails
[03:23:39] hardtail: has joined #RubyOnRails
[03:26:31] joshkovach: has joined #RubyOnRails
[03:33:02] shibabu: has joined #RubyOnRails
[03:35:27] tuelz: has joined #RubyOnRails
[03:35:53] fn2187: has joined #RubyOnRails
[03:37:33] nyaa: has joined #RubyOnRails
[03:37:35] ur5us: has joined #RubyOnRails
[03:38:30] fn2187: has joined #RubyOnRails
[03:41:25] FailBit: slave labor?
[03:41:36] _Tariq: has joined #RubyOnRails
[03:41:40] FailBit: ACTION looks in the backlog for mentions of the NBA
[03:42:29] FailBit: I'll show myself the door
[03:42:31] FailBit: has left #RubyOnRails: ("WeeChat 0.4.2")
[03:49:33] _Tariq: has joined #RubyOnRails
[03:52:22] Puffball: has joined #RubyOnRails
[03:53:39] bronson: has joined #RubyOnRails
[03:56:39] baash05: Hey... I'm trying to moc all methods on all instances of a class, during an rspec test. I just don't want anything of the class called.
[03:56:52] lindii_: has joined #RubyOnRails
[04:04:10] matthewd: baash05: Sounds like you want an instance of something other than that class
[04:05:39] pawnbox: has joined #RubyOnRails
[04:06:49] owenjones: has joined #RubyOnRails
[04:06:53] smathy: has joined #RubyOnRails
[04:09:42] mary5030: has joined #RubyOnRails
[04:12:22] Puffball: has joined #RubyOnRails
[04:12:53] nyaa: has joined #RubyOnRails
[04:13:40] iateadonut: has joined #RubyOnRails
[04:16:02] atomical: has joined #RubyOnRails
[04:17:32] braincrash: has joined #RubyOnRails
[04:17:45] stannard: has joined #RubyOnRails
[04:17:56] sarink: has joined #RubyOnRails
[04:21:37] codeurge: has joined #RubyOnRails
[04:21:47] rhizome: helpful little video by dhh on action_cable https://www.youtube.com/watch?v=n0WUjGkDFS0
[04:25:54] ElSif: has joined #RubyOnRails
[04:28:16] lacuna: has joined #RubyOnRails
[04:29:14] lacuna: has joined #RubyOnRails
[04:29:15] lacuna: has joined #RubyOnRails
[04:33:26] pawnbox: has joined #RubyOnRails
[04:35:09] StevenXL: has joined #RubyOnRails
[04:36:13] tuelz: has joined #RubyOnRails
[04:38:07] kpollich: has joined #RubyOnRails
[04:48:14] sevenseacat: ACTION watches it
[04:48:32] crdpink: has joined #RubyOnRails
[04:48:44] nyanz: has joined #RubyOnRails
[04:48:59] sevenseacat: wow, he still uses textmate
[04:49:45] pawnbox_: has joined #RubyOnRails
[04:52:11] sarink: has joined #RubyOnRails
[04:52:14] sevenseacat: I cant watch this - 'lets try this, oops it doesnt work, lets change this, oops, something else doesnt work'
[04:52:23] aruntomar: has joined #RubyOnRails
[04:53:13] pontiki: well, i still use emacs :P
[04:53:44] sevenseacat: yes, but us gui users are a fickle bunch :P
[04:54:00] matthewd: sevenseacat: You wouldn't know it was DHH without a few wupses
[04:55:36] alex88: has joined #RubyOnRails
[04:55:54] pontiki: what's the latest editor the cool kids use?
[04:56:06] sevenseacat: typically atom, sometimes sublime text 3
[04:56:27] pontiki: when i was in the clojurebridge course, they were telling folks to use LightTable
[04:56:32] kpollich: The current love triangle is Atom, Sublime Text, and Visual Studio Code
[04:56:44] krz: has joined #RubyOnRails
[04:56:49] pontiki: which i was *sure* was an adobe product (aka, lightroom)
[04:56:51] sevenseacat: oh yes, i forgot about visual studio code - thats also built on electron like atom, right?
[04:57:04] kpollich: LightTable got some hype for a while but it seems to have died down. It had inline clojure stuff built in iirc
[04:57:09] kpollich: Yeah VS Code is electron
[04:58:11] pontiki: i, being old and crotchety and set in my ways, used emacs with cider
[04:58:20] sevenseacat: and were probably more productive :P
[04:59:00] nyaa: has joined #RubyOnRails
[04:59:13] moeabdol: has joined #RubyOnRails
[05:00:32] kpollich: One of these days I'll take some time to learn more Vim
[05:01:11] sevenseacat: I'm happy enough with atom, it's not perfect, but it does the job for me
[05:02:23] srinidhi: has joined #RubyOnRails
[05:02:48] hardtail: has joined #RubyOnRails
[05:03:16] Grag_Harker: has joined #RubyOnRails
[05:07:16] owenjones: has joined #RubyOnRails
[05:08:06] pontiki: sometimes, i just into rubymine to do things rubymine does better
[05:08:06] dopie: has joined #RubyOnRails
[05:08:53] pontiki: but then i'm hitting key combos, like meta-d, which does delete-word in emacs, and starts up the debuggger in rubymine
[05:09:23] pontiki: i can't even tell you why i have bothered to just remap the key in RM
[05:09:37] GragHarker: has joined #RubyOnRails
[05:09:43] matthewd: pontiki: At least you're not accidentally filling files with ":w" :P
[05:10:24] berserk_ren: has joined #RubyOnRails
[05:11:50] sarink: has joined #RubyOnRails
[05:13:41] startupality: has joined #RubyOnRails
[05:21:11] celly: has joined #RubyOnRails
[05:28:12] tildes: has joined #RubyOnRails
[05:36:08] shibabu: has joined #RubyOnRails
[05:36:57] tuelz: has joined #RubyOnRails
[05:38:42] RegulationD: has joined #RubyOnRails
[05:42:09] jessemcgilallen: has joined #RubyOnRails
[05:47:48] njero: has joined #RubyOnRails
[05:47:53] makenoise: has joined #RubyOnRails
[05:53:16] lxsameer: has joined #RubyOnRails
[05:54:34] netzfisch: has joined #RubyOnRails
[05:54:56] njero: has joined #RubyOnRails
[05:56:21] dionysus69: has joined #RubyOnRails
[05:57:07] arup_r: has joined #RubyOnRails
[05:58:23] mbreedlove: has joined #RubyOnRails
[05:59:36] _Tariq: has joined #RubyOnRails
[06:01:16] arooni: has joined #RubyOnRails
[06:02:16] arup_r: I am using Rspec and Factory girl. Now, I have the same question like http://stackoverflow.com/questions/32689861/where-to-store-rspec-test-files-csvs-jsons-etc . Any body would tell me what is the best place to keep my static files which are needed for testing purposes ?
[06:03:10] dionysus69: has joined #RubyOnRails
[06:04:10] sevenseacat: it appears I already answered that question
[06:04:56] AntiSpamMeta: has joined #RubyOnRails
[06:05:01] rhizome: fixtures or support, it doesn't matter
[06:06:45] rhizome: ./garbage/DELETE_ME.csv
[06:07:31] Puffball: has joined #RubyOnRails
[06:07:53] cgfbee: has joined #RubyOnRails
[06:08:22] arup_r: sevenseacat: I saw only comments. but not the same who wrote it :)
[06:08:37] arup_r: s/same/name
[06:08:50] rhizome: they're right there
[06:13:09] nocd: has joined #RubyOnRails
[06:15:06] rickmasta: has joined #RubyOnRails
[06:19:54] crystalmaiden: has joined #RubyOnRails
[06:27:24] pontiki: how many answers to the same question do you need?
[06:27:26] idefine: has joined #RubyOnRails
[06:28:50] The_Phoenix: has joined #RubyOnRails
[06:29:01] bronson: has joined #RubyOnRails
[06:29:56] joshkovach: has joined #RubyOnRails
[06:32:37] alphaatom: has joined #RubyOnRails
[06:34:42] startupality: has joined #RubyOnRails
[06:37:51] idefine: has joined #RubyOnRails
[06:37:54] tuelz: has joined #RubyOnRails
[06:38:16] shibabu: has joined #RubyOnRails
[06:39:20] ewnd9_: has joined #RubyOnRails
[06:39:48] nyaa: has joined #RubyOnRails
[06:40:13] johnflux: has joined #RubyOnRails
[06:41:01] tvw: has joined #RubyOnRails
[06:42:58] DoubleMalt: has joined #RubyOnRails
[06:44:02] zpe: has joined #RubyOnRails
[06:45:10] DavidDudson: has joined #RubyOnRails
[06:46:09] moeabdol: has joined #RubyOnRails
[06:49:21] Kn|t3: has joined #RubyOnRails
[06:53:47] zpe: has joined #RubyOnRails
[06:58:48] nyanz: has joined #RubyOnRails
[07:00:17] tildes: has joined #RubyOnRails
[07:00:24] celly: has joined #RubyOnRails
[07:01:43] rickmasta: has joined #RubyOnRails
[07:02:17] celly: has joined #RubyOnRails
[07:02:23] harai: has joined #RubyOnRails
[07:04:07] celly: has joined #RubyOnRails
[07:05:51] ibouvousaime: has joined #RubyOnRails
[07:06:02] celly: has joined #RubyOnRails
[07:06:18] arup_r: as many as you can give
[07:07:13] zpe: has joined #RubyOnRails
[07:07:58] celly: has joined #RubyOnRails
[07:08:18] krz: has joined #RubyOnRails
[07:08:37] solars: has joined #RubyOnRails
[07:09:00] agit0: has joined #RubyOnRails
[07:09:33] helpa: Help vampire detected by sevenseacat. Dispersing e-Garlic and wooden stakes.
[07:09:51] celly: has joined #RubyOnRails
[07:11:28] ayonkhan: has joined #RubyOnRails
[07:11:41] celly: has joined #RubyOnRails
[07:13:33] celly: has joined #RubyOnRails
[07:15:27] celly: has joined #RubyOnRails
[07:16:16] Kn|t3: has joined #RubyOnRails
[07:17:22] celly: has joined #RubyOnRails
[07:19:00] yfeldblum: has joined #RubyOnRails
[07:19:13] celly: has joined #RubyOnRails
[07:19:16] DavidDudson: has joined #RubyOnRails
[07:21:06] celly: has joined #RubyOnRails
[07:21:23] comrad: has joined #RubyOnRails
[07:22:59] celly_: has joined #RubyOnRails
[07:24:54] celly: has joined #RubyOnRails
[07:25:06] cubicme: has joined #RubyOnRails
[07:26:27] cubicme: Hi, if I have A and B models and join model AB, how can I AB destroyed if either A or B destroyed? so far I can only have it destroyed through A or I can have both but when I destroy A, AB would be destroyed but not B
[07:26:31] AzaToth: has joined #RubyOnRails
[07:26:44] celly: has joined #RubyOnRails
[07:28:30] sarink: has joined #RubyOnRails
[07:28:37] celly: has joined #RubyOnRails
[07:29:27] shock_one: has joined #RubyOnRails
[07:30:11] tetraktys: has joined #RubyOnRails
[07:30:29] celly: has joined #RubyOnRails
[07:30:37] Mia: has joined #RubyOnRails
[07:30:37] Mia: has joined #RubyOnRails
[07:30:56] pawnbox: has joined #RubyOnRails
[07:32:20] harai54: has joined #RubyOnRails
[07:32:24] celly: has joined #RubyOnRails
[07:34:18] celly: has joined #RubyOnRails
[07:34:51] moeabdol: has joined #RubyOnRails
[07:36:13] celly: has joined #RubyOnRails
[07:36:29] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[07:38:02] celly: has joined #RubyOnRails
[07:38:26] tuelz: has joined #RubyOnRails
[07:38:29] ibouvousaime: has joined #RubyOnRails
[07:39:22] cubicme: has joined #RubyOnRails
[07:39:45] RegulationD: has joined #RubyOnRails
[07:39:46] benhuda: has joined #RubyOnRails
[07:39:53] nyaa: has joined #RubyOnRails
[07:39:57] celly: has joined #RubyOnRails
[07:40:16] PedramT: has joined #RubyOnRails
[07:40:45] yogeshrt: has joined #RubyOnRails
[07:41:11] artto: has joined #RubyOnRails
[07:41:34] yardenbar: has joined #RubyOnRails
[07:41:36] PedramT_: has joined #RubyOnRails
[07:41:50] celly: has joined #RubyOnRails
[07:41:58] ur5us: has joined #RubyOnRails
[07:42:36] Pupeno: has joined #RubyOnRails
[07:43:44] celly: has joined #RubyOnRails
[07:44:57] pawnbox: has joined #RubyOnRails
[07:45:36] celly: has joined #RubyOnRails
[07:45:56] shock_one: has joined #RubyOnRails
[07:47:32] celly_: has joined #RubyOnRails
[07:49:08] tildes: has joined #RubyOnRails
[07:49:21] tildes: cubicme: so you want AB destroyed if either A or B destroyed, and in addition you want B destroyed if A destroyed?
[07:49:24] celly: has joined #RubyOnRails
[07:49:41] cubicme: tildes: exactly
[07:50:26] helpa: 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.
[07:51:12] tildes: cubicme: you could try something like this http://pastie.org/private/yrksbyg1sum7gzolivpgtq
[07:51:18] celly_: has joined #RubyOnRails
[07:51:22] puria: has joined #RubyOnRails
[07:53:09] celly: has joined #RubyOnRails
[07:53:28] PedramT: has joined #RubyOnRails
[07:55:00] celly: has joined #RubyOnRails
[07:55:02] darutoko: has joined #RubyOnRails
[07:55:42] SanguineAnomaly: has joined #RubyOnRails
[07:56:20] cubicme: tildes: what I have if basically this: https://gist.github.com/anonymous/cb5456175cbbc1e96bee this way destroying B doesn???t destroy AB. if I use has_one on AB, I have to move the foreign key to A and B, right?
[07:56:56] celly: has joined #RubyOnRails
[07:58:37] shock_one: has joined #RubyOnRails
[07:58:48] celly: has joined #RubyOnRails
[07:59:20] Palsson: has joined #RubyOnRails
[07:59:42] wethu: has joined #RubyOnRails
[08:00:41] celly: has joined #RubyOnRails
[08:01:53] shanemcd: has joined #RubyOnRails
[08:02:03] baweaver: has joined #RubyOnRails
[08:02:36] celly: has joined #RubyOnRails
[08:04:29] celly: has joined #RubyOnRails
[08:06:21] celly: has joined #RubyOnRails
[08:06:22] iateadonut: has joined #RubyOnRails
[08:07:26] shock_one: has joined #RubyOnRails
[08:07:40] srinidhi: has joined #RubyOnRails
[08:08:15] celly: has joined #RubyOnRails
[08:08:39] PedramT_: has joined #RubyOnRails
[08:08:47] matthewd: cubicme: !fake
[08:08:47] helpa: cubicme: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[08:09:21] matthewd: Oh, sevenseacat already said that :P
[08:09:52] ziggy: has joined #RubyOnRails
[08:09:52] ziggy: has joined #RubyOnRails
[08:10:06] celly: has joined #RubyOnRails
[08:10:59] cubicme: sorry, I thought actual model names would further complicate things, since they are very horrible and domain specific
[08:11:04] pawnbox: has joined #RubyOnRails
[08:11:43] sevenseacat: we at the very least need to see how your associations are currently structured.
[08:11:52] startupality: has joined #RubyOnRails
[08:12:01] celly: has joined #RubyOnRails
[08:13:06] AntiSpamMeta: has joined #RubyOnRails
[08:13:09] matthewd: cubicme: It *sounds* like your has_one is backwards; maybe the real names would shed light on why you've got it like that.
[08:13:22] mark2: has joined #RubyOnRails
[08:13:31] pwnd_nsfw: top secret project
[08:13:33] helpa: Please do not use fake variables for your name such as "foo", "bar" or "x". Use the real names, as if it makes sense to you it probably will make sense to the people helping you.
[08:13:55] celly: has joined #RubyOnRails
[08:14:10] tildes: cubicme: I find 'B has_one :ab' odd, if the joint table 'ab' has 1-to-1 association with B, why use the joint table in the first place?
[08:15:38] aganov: has joined #RubyOnRails
[08:15:50] celly: has joined #RubyOnRails
[08:15:51] cubicme: tildes: because B can be either associated with A or another model
[08:16:13] pontiki: this is where the fake names get totally confusing
[08:16:26] tildes: cubicme: I thought I had it clear with a second, but I must admit the fake names have jumbled my mind, and can't really keep up with them anymore :)
[08:16:38] cubicme: pontiki: yeah, i???ll post the real one, wait
[08:16:42] tildes: therefore joining the choir of give us real names
[08:17:38] pwnd_nsfw: has joined #RubyOnRails
[08:17:42] celly: has joined #RubyOnRails
[08:19:32] celly: has joined #RubyOnRails
[08:19:55] cubicme: ok here it is https://gist.github.com/cubicme/4a68d9708959a013f211
[08:21:01] Sylario: has joined #RubyOnRails
[08:21:27] celly: has joined #RubyOnRails
[08:21:37] zpe: has joined #RubyOnRails
[08:22:40] sandstrom: has joined #RubyOnRails
[08:22:58] matthewd: cubicme: What's owner_type?
[08:23:20] celly: has joined #RubyOnRails
[08:23:45] cubicme: matthewd: the enum that determines whether the ???clipping??? belongs to a news or other stuff
[08:23:53] matthewd: It sounds like owner should be a polymorphic belongs_to on clipping, so I'm trying to understand the reasoning behind the current shape
[08:24:50] matthewd: So a clipping can only be linked to one thing?
[08:24:59] tildes: cubicme: which was B and which was A
[08:25:14] tildes: (to put the previous conversation to context)
[08:25:15] celly: has joined #RubyOnRails
[08:25:37] matthewd: I'm assuming there's a `has_one clipping_photos` & `has_one photos, through: :clipping_photos`
[08:26:06] cubicme: matthewd: this old horrible code, I???m not sure about reasoning either. clipping is the image of a news or articles, etc. and yes in only has one owner
[08:26:16] matthewd: Oh, those aren't plural, I'm just misreading because news is irregular
[08:26:16] cubicme: tildes: A would be news and B would be Clipping
[08:27:06] celly: has joined #RubyOnRails
[08:28:28] matthewd: Even without polymorphism, I'm not seeing why the clipping couldn't just belongs_to :news, as tildes said earlier... the extra table doesn't seem to add anything, unless both sides are has_many
[08:28:58] celly: has joined #RubyOnRails
[08:30:53] celly: has joined #RubyOnRails
[08:32:03] matthewd: cubicme: To your actual question, though, with the current structure I think you'd need to define an after_destroy on ClippingsNews to destroy the Clipping
[08:32:25] norc: has joined #RubyOnRails
[08:32:44] celly: has joined #RubyOnRails
[08:33:06] cubicme: matthewd: apparently ClippingsNews has an index attribute to set order of clippings
[08:33:37] cubicme: matthewd: but then there???s another models that can have only one clipping
[08:33:37] norc: Hi. Im using Mail with IMAP - is there a way to get the IMAP UID for a specific Message object, or do I have to use the block for IMAP#find?
[08:34:30] Kn|t3: has joined #RubyOnRails
[08:34:38] celly: has joined #RubyOnRails
[08:35:33] cubicme: matthewd: so back to the orignal question, how can I have ClippingsNews destroyed if either Clipping or News is destroyed with this structure
[08:36:13] matthewd: dependent: :destroy on the has_many and has_one, respectively
[08:36:26] blackhuey: has joined #RubyOnRails
[08:36:33] celly: has joined #RubyOnRails
[08:37:42] norc: Ah well, Ill just use the block variant it works.
[08:38:16] matthewd: norc: At a glance, it doesn't look like the uid escapes apart from where it gets yielded
[08:38:24] celly: has joined #RubyOnRails
[08:39:07] idefine: has joined #RubyOnRails
[08:39:11] tuelz: has joined #RubyOnRails
[08:39:35] Zamerick: has joined #RubyOnRails
[08:39:43] norc: matthewd: Fair enough, Ill just get by using find with a block then. :)
[08:40:20] celly: has joined #RubyOnRails
[08:40:24] shibabu: has joined #RubyOnRails
[08:41:15] shock_one: has joined #RubyOnRails
[08:41:27] norc: matthewd: I suppose it does make sense though, since if the mail gets moved to another mailbox for example, it will get another UID - so it is not useful for identifying the message itself.
[08:41:46] edwinvdgraaf: has joined #RubyOnRails
[08:42:15] celly: has joined #RubyOnRails
[08:42:23] matthewd: norc: Oh, yes; the UID is only valid for the current connection
[08:43:20] matthewd: It can change even if you just reconnect, without any change to the message or mailbox
[08:43:34] matthewd: (unless I'm misremembering... it's been a while since I read the spec)
[08:43:57] norc: As per spec anyhow, our exchange server uses the same UID - but Im not sure whether that is a guarantee by Microsoft.
[08:44:08] celly: has joined #RubyOnRails
[08:44:42] Kn|t3: has joined #RubyOnRails
[08:44:46] speaking1ode: has joined #RubyOnRails
[08:44:48] norc: matthewd: No you remember correctly. This is from the RFC: "The unique identifier of a message MUST NOT change during the session, and SHOULD NOT change between sessions."
[08:45:02] norc: Though honestly if the UID changes between sessions, it becomes quite useless for IMAP in general.
[08:45:20] norc: Since you do not have any other mechanism at finding out whether you have already retrieved a mail.
[08:45:43] matthewd: Message-ID ?
[08:46:01] celly: has joined #RubyOnRails
[08:46:38] DoubleMalt: has joined #RubyOnRails
[08:46:52] cubicme: matthewd: thanks, worked. i don???t know why it wasn???t like this in the first place
[08:47:33] norc: matthewd: That forces you to retrieve the message in order to find out whether you have already retrieved it.
[08:47:36] matthewd: cubicme: You're welcome. Though I do recommend a review of that general model structure :)
[08:47:44] norc: Which defeats the point. ;-)
[08:47:52] celly: has joined #RubyOnRails
[08:48:21] norc: matthewd: The RFC actually strongly recommends the UID is persisted, but recognizes that back in the day people wrote bad software.
[08:49:03] cubicme: matthewd: oh yeah. and this was just the tip of the crapberg
[08:49:49] matthewd: norc: Ah, okay. So you're supposed to store the UIDs and the UIDVALIDITY, and if the latter bumps, you'll need to resync based on Message-ID or something?
[08:49:50] celly: has joined #RubyOnRails
[08:50:43] matthewd: norc: I definitely only have "~ how it works" level knowledge of IMAP... not "could implement a client" :)
[08:50:57] norc: Same here. :)
[08:51:41] celly: has joined #RubyOnRails
[08:52:54] pawnbox: has joined #RubyOnRails
[08:53:37] celly_: has joined #RubyOnRails
[08:53:47] norc: matthewd: The spec says nothing about that case, but I think this is a really exotic exception for systems that cannot persist UID/UIDVALIDITY
[08:54:18] norc: But yeah; I suppose you have no choice to do a binary search for your last known Message-ID
[08:54:25] marr: has joined #RubyOnRails
[08:54:33] norc: Wait, not binary. Full search.
[08:55:18] PedramT: has joined #RubyOnRails
[08:55:27] celly_: has joined #RubyOnRails
[08:56:06] pawnbox: has joined #RubyOnRails
[08:56:18] fox_mulder_cp: hi. how to add .at_beginning_of_month to Article.all.group(:created_at.at_beginning_of_month).count ? i want create scope for BlogApp archives showing
[08:57:12] norc: fox_mulder_cp: Personally I would just use groupdate
[08:57:17] matthewd: fox_mulder_cp: You don't.. but you can use an SQL expression there
[08:57:24] celly: has joined #RubyOnRails
[08:58:10] norc: fox_mulder_cp: But then again my application makes use of it a lot for statistics generation, so its not just a singular use case.
[08:58:44] srinidhi: has joined #RubyOnRails
[08:58:57] roshanavand: has joined #RubyOnRails
[08:59:13] celly: has joined #RubyOnRails
[08:59:15] fox_mulder_cp: norc: preferred achievment in this case - learning Active record orm, so i don't wan use externaal gems
[08:59:46] fox_mulder_cp: thanks for hint for groupdate gem
[09:01:07] norc: fox_mulder_cp: https://github.com/ankane/groupdate/blob/master/lib/groupdate/magic.rb
[09:01:09] celly: has joined #RubyOnRails
[09:01:13] norc: That should give you a hint at how they implement that logic.
[09:01:19] roshanavand: has joined #RubyOnRails
[09:02:26] Kn|t3: has joined #RubyOnRails
[09:03:04] celly: has joined #RubyOnRails
[09:03:08] tibra: has joined #RubyOnRails
[09:03:27] srinidhi1: has joined #RubyOnRails
[09:03:52] jds: has joined #RubyOnRails
[09:04:35] kp666: has joined #RubyOnRails
[09:04:55] celly: has joined #RubyOnRails
[09:05:45] krz: has joined #RubyOnRails
[09:06:50] celly: has joined #RubyOnRails
[09:07:42] jsrn_: has joined #RubyOnRails
[09:08:43] celly: has joined #RubyOnRails
[09:08:44] teclator: has joined #RubyOnRails
[09:10:38] celly: has joined #RubyOnRails
[09:10:46] pawnbox: has joined #RubyOnRails
[09:10:57] puria: has joined #RubyOnRails
[09:11:42] Elion: has joined #RubyOnRails
[09:11:43] Elion: has joined #RubyOnRails
[09:12:33] celly: has joined #RubyOnRails
[09:13:01] drptbl: has joined #RubyOnRails
[09:14:28] celly_: has joined #RubyOnRails
[09:14:39] kmckelvin: has joined #RubyOnRails
[09:14:47] Zggb: has joined #RubyOnRails
[09:15:03] artto: has joined #RubyOnRails
[09:16:16] celly: has joined #RubyOnRails
[09:17:22] build22_: has joined #RubyOnRails
[09:18:14] celly: has joined #RubyOnRails
[09:18:25] drptbl: has joined #RubyOnRails
[09:20:09] celly: has joined #RubyOnRails
[09:21:02] futilegames: has joined #RubyOnRails
[09:21:07] theod: has joined #RubyOnRails
[09:22:03] celly: has joined #RubyOnRails
[09:23:57] celly: has joined #RubyOnRails
[09:24:16] snowy: has joined #RubyOnRails
[09:25:49] celly: has joined #RubyOnRails
[09:27:43] celly: has joined #RubyOnRails
[09:28:36] platzhirsch: has joined #RubyOnRails
[09:29:39] celly: has joined #RubyOnRails
[09:30:43] n008f4g_: has joined #RubyOnRails
[09:31:22] faisal: has joined #RubyOnRails
[09:31:31] celly: has joined #RubyOnRails
[09:31:59] platzhirsch: I have a model UserSession < Authlogic::Session::Base with after_create methods which make use of the controller. Unfortunately, the controller is stubbed per default in the model specs. Making all of my testsfail very early... any ideas how to work around this?
[09:32:25] pawnbox: has joined #RubyOnRails
[09:32:35] platzhirsch: I think it would already work if it's not a stub but the actual controller instance :-/
[09:33:39] SIGILL: has joined #RubyOnRails
[09:34:50] sevenseacat: your models shouldnt be talking to your controller. that makes no sense.
[09:35:00] sevenseacat: gist your model with its after_create callbacks?
[09:36:09] PedramT_: has joined #RubyOnRails
[09:36:51] platzhirsch: sevenseacat: https://gist.github.com/platzhirsch/6c6bb227c3756cb15d36
[09:37:00] platzhirsch: Yeah I guess that's where part of the problem is coming from
[09:37:10] sevenseacat: yeah you definitely shouldnt be doing that
[09:37:27] sevenseacat: that logic should be *in* the controller
[09:37:56] platzhirsch: sevenseacat: any idea where? It's session related, I didn't write that piece but I need to fix the design..
[09:38:07] defsdoor: has joined #RubyOnRails
[09:38:15] platzhirsch: I mean it's still related to Authlogic::Session::Base
[09:38:43] rodfersou: has joined #RubyOnRails
[09:39:40] sevenseacat: is that not a model?
[09:39:47] sevenseacat: if so, its not related to it at all
[09:39:59] tuelz: has joined #RubyOnRails
[09:40:13] ruid: has joined #RubyOnRails
[09:40:15] platzhirsch: yeah but apparently these session informations are set as after_create from Authlogic, mhm
[09:40:59] platzhirsch: Well thanks nayway sevenseacat, you pointed out the major problem here, I will talk to my colleague :)
[09:41:59] sandstrom: has joined #RubyOnRails
[09:42:09] timmyBsd_: has joined #RubyOnRails
[09:42:56] RubyNewbey___: has joined #RubyOnRails
[09:43:14] Killerkeksdose: has joined #RubyOnRails
[09:43:30] ArTiSTiX_: has joined #RubyOnRails
[09:44:40] SIGILL: has left #RubyOnRails: ("WeeChat 1.1.1")
[09:44:49] platzhirsch: it's basically unclear to me why this code must be there and not in the UserSessionController *sigh*, but I guess it's authlogic gem related :)
[09:44:49] droptone_: has joined #RubyOnRails
[09:44:55] K0nserv-_: has joined #RubyOnRails
[09:44:59] masscrx_: has joined #RubyOnRails
[09:45:07] tparenti_: has joined #RubyOnRails
[09:45:17] argoneus_: has joined #RubyOnRails
[09:45:19] pontiki_: has joined #RubyOnRails
[09:45:21] fryguy9: has joined #RubyOnRails
[09:45:25] badeball_: has joined #RubyOnRails
[09:45:28] _fortis_: has joined #RubyOnRails
[09:45:32] mattt: has joined #RubyOnRails
[09:45:33] The_Kingdutch: has joined #RubyOnRails
[09:45:35] Scriptonaut_: has joined #RubyOnRails
[09:45:40] kaspergr1bbe: has joined #RubyOnRails
[09:45:46] mattt: what is the best way to set a 'virtual attribute' on a rails model?
[09:47:03] jacobat: mattt: 'virtual attribute'?
[09:47:40] mattt: jacobat: i want to have an 'attribute' that isn't a field in the db
[09:47:59] targaf_: has joined #RubyOnRails
[09:48:14] jacobat: mattt: class User ; def email=(email) @email = email end ; def email() email end ; end
[09:48:22] sptq_: has joined #RubyOnRails
[09:48:25] Pazician: has joined #RubyOnRails
[09:48:25] Pazician: has joined #RubyOnRails
[09:48:25] jacobat: mattt: That should work no?
[09:48:34] jacobat: Or just add an "attr_accessor" to the class
[09:48:36] tbuehlmann: that's a simple attr_accessor, and yes, this will just work
[09:48:37] ql6wlld: has joined #RubyOnRails
[09:48:39] KorriX_: has joined #RubyOnRails
[09:48:43] Liothen-: has joined #RubyOnRails
[09:48:45] russt_: has joined #RubyOnRails
[09:48:45] waseem__: has joined #RubyOnRails
[09:48:46] LBRapid_: has joined #RubyOnRails
[09:48:47] dustinm`_: has joined #RubyOnRails
[09:48:48] matthewd_: has joined #RubyOnRails
[09:48:52] dshoreman_: has joined #RubyOnRails
[09:48:56] mattt: jacobat: yes and no :) so i tried that, but i have a json API and i want the virtual attribute to be accessible on the object without having to explicitly make a call on the method
[09:48:56] Dfoolz: has joined #RubyOnRails
[09:48:58] humding3r: has joined #RubyOnRails
[09:49:02] loglaunc-: has joined #RubyOnRails
[09:49:04] tris-: has joined #RubyOnRails
[09:49:06] MarqueI: has joined #RubyOnRails
[09:49:10] pawnbox: has joined #RubyOnRails
[09:49:27] tbuehlmann: what does that mean?
[09:49:33] jacobat: mattt: I don't know what you mean by "be accessible... without having to call the method"?
[09:49:43] Gm4n_: has joined #RubyOnRails
[09:49:46] davidcelis_: has joined #RubyOnRails
[09:49:51] tbuehlmann: do you mean when serializing into JSON?
[09:49:54] unCork: has joined #RubyOnRails
[09:50:29] jalcine-: has joined #RubyOnRails
[09:50:29] rheddry: has joined #RubyOnRails
[09:50:29] Marquel: has joined #RubyOnRails
[09:50:29] KrzaQ: has joined #RubyOnRails
[09:50:30] mattt: jacobat: so i'm using render: json in my controller
[09:50:30] nizmow: has joined #RubyOnRails
[09:50:32] mattt: jacobat: limiting the turned fields with only:
[09:50:52] mattt: jacobat: but the 'virtual attribute' never gets included when i do that
[09:51:40] michael_mbp: has joined #RubyOnRails
[09:52:24] jacobat: mattt: You're aware that "virtual_attributes" won't survive between requests? It will always be nil when you send a GET request?
[09:52:51] Pupeno: has joined #RubyOnRails
[09:52:52] Pupeno: has joined #RubyOnRails
[09:53:32] mattt: jacobat: sorry, got a severe case of the mondays, plus i'm crap w/ rails :)
[09:54:06] mattt: jacobat: let's try this another way, what if i want to do Something.find(id) and have some sort of virtual attribute appended to the object
[09:54:12] mattt: jacobat: how would one go about doing that?
[09:55:02] jacobat: mattt: If you could explain what you're trying to achieve with real names it would probably be easier to help
[09:55:53] svkurowski: has joined #RubyOnRails
[09:56:36] royvandermeij: has joined #RubyOnRails
[09:56:48] vasilakisFiL: has joined #RubyOnRails
[09:56:59] speaking2ode: has joined #RubyOnRails
[09:57:15] mattt: jacobat: sure
[09:57:32] dmz: has joined #RubyOnRails
[09:57:40] mclee: has joined #RubyOnRails
[09:57:43] mattt: jacobat: so i have a model, backed by a database, but i want to establish an attribute on that model that is the combination of two fields in the database
[09:57:56] djinni`_: has joined #RubyOnRails
[09:58:00] mattt: jacobat: i obviously don't want to create another column for something that i can craft using existing columns
[09:58:02] Silex: has joined #RubyOnRails
[09:58:19] jacobat: mattt: Now that's something quite different :)
[09:58:24] mattt: jacobat: i thought that was what you called a 'virtual attribute' :)
[09:58:25] tvw: has joined #RubyOnRails
[09:58:38] jacobat: mattt: It might be :)
[09:58:39] sunya7a__: has joined #RubyOnRails
[09:59:20] jacobat: mattt: You can make a writer method "def fullname(name) ; self.firstname = name.split.first ; self.lastname = name.split.last ; end"
[09:59:55] yaewa: has joined #RubyOnRails
[10:00:07] jacobat: mattt: Of course that logic I just presented is faulty - but you get the idea
[10:00:11] Junaos_: has joined #RubyOnRails
[10:00:30] artto: has joined #RubyOnRails
[10:00:35] bphogan_: has joined #RubyOnRails
[10:00:43] kitallisii: has joined #RubyOnRails
[10:00:44] Davey_: has joined #RubyOnRails
[10:00:44] Davey_: has joined #RubyOnRails
[10:00:44] existensil_: has joined #RubyOnRails
[10:00:56] mattt: jacobat: so if i use render: json on that model object will fullname be accessible as an attribute?
[10:01:14] samuelkadolph1: has joined #RubyOnRails
[10:01:24] proboszc1: has joined #RubyOnRails
[10:01:31] jacobat: mattt: Probably not - you probably need to instrument the serializer somehow - but I don't know off the top of my head how to do that
[10:01:39] Gizmokid2010: has joined #RubyOnRails
[10:01:51] plantigrade: has joined #RubyOnRails
[10:01:52] spectra-: has joined #RubyOnRails
[10:01:58] Kilobyte22: has joined #RubyOnRails
[10:02:00] boshhead_: has joined #RubyOnRails
[10:02:30] Helheim_: has joined #RubyOnRails
[10:02:33] matthewd: mattt: Sounds like you want as_json
[10:02:33] herenow_: has joined #RubyOnRails
[10:02:38] Tempesta_: has joined #RubyOnRails
[10:02:40] zacts_: has joined #RubyOnRails
[10:03:14] tbuehlmann: I'm checking the code right now, too. seems like it's not too easy to hook into the attributes of a model
[10:03:20] fox_mulder_cp: how a make a names for "a = Article.all.group(:created_at).count" construction, where have " {Wed, 01 Jan 2014 01:01:00 UTC +00:00=>2, Sun, 01 Feb 2015 01:01:00 UTC +00:00=>2}" output?
[10:03:29] Bearie: has joined #RubyOnRails
[10:03:30] spastorino_: has joined #RubyOnRails
[10:03:43] clamstar-: has joined #RubyOnRails
[10:03:45] _joelsmith: has joined #RubyOnRails
[10:03:51] fox_mulder_cp: want name date and count, for access him by names
[10:03:57] djellemah_: has joined #RubyOnRails
[10:04:03] zamerick_: has joined #RubyOnRails
[10:04:03] OmegaA_: has joined #RubyOnRails
[10:04:11] jayne_: has joined #RubyOnRails
[10:04:39] Grag_Harker: has joined #RubyOnRails
[10:04:42] mattt: matthewd: *head implodes*
[10:04:43] rtl_: has joined #RubyOnRails
[10:05:06] tbuehlmann: some answers here: https://stackoverflow.com/questions/6892044/add-virtual-attribute-to-json-output
[10:05:15] kadoppe_: has joined #RubyOnRails
[10:05:31] tparenti: has joined #RubyOnRails
[10:05:37] tbuehlmann: overriding #attributes seems to work, though
[10:05:51] matthewd: Or maybe serializable_hash
[10:06:03] tbuehlmann: I wouldn't override that, I guess
[10:06:06] beingjohnm_: has joined #RubyOnRails
[10:06:07] tbuehlmann: quite a method..
[10:06:09] matthewd: Eeep, overriding #attributes seems dangerous
[10:06:12] mattt: tbuehlmann: think i saw that post!
[10:06:21] fox_mulder_cp: tbuehlmann: it's not json, but thanks
[10:06:44] tbuehlmann: matthewd, yea, don't know the consequences, possible :)
[10:06:51] gr3yR0n1-: has joined #RubyOnRails
[10:06:54] fox_mulder_cp: i want create archive list for my Articles - "$Year/$Month - $count"
[10:06:56] tbuehlmann: fox_mulder_cp, wasn't talking to you
[10:07:53] matthewd: fox_mulder_cp: Didn't norc already give you an answer for that?
[10:08:15] axilla_: has joined #RubyOnRails
[10:08:17] shmoon_: has joined #RubyOnRails
[10:08:41] alphaatom: has joined #RubyOnRails
[10:08:49] fumduq-: has joined #RubyOnRails
[10:08:59] shmoon_: needed some help regarding SSL authentication from my app, anyone aware of it ?
[10:09:04] fox_mulder_cp: matthewd: yes, a see his link, but want experiments
[10:09:06] shibabu: has joined #RubyOnRails
[10:09:23] Detch: has joined #RubyOnRails
[10:09:27] fox_mulder_cp: shmoon_: add ssl cert at nginx/apache froont server
[10:09:54] fox_mulder_cp: and rewrite rules for ssl at 443 port using only
[10:10:26] drptbl: has joined #RubyOnRails
[10:10:47] Symbiosisz2: has joined #RubyOnRails
[10:10:56] ayonkhan_: has joined #RubyOnRails
[10:11:38] rgtk: has joined #RubyOnRails
[10:12:02] PlasmaStar: has joined #RubyOnRails
[10:13:03] bronson: has joined #RubyOnRails
[10:13:03] shmoon_: fox_mulder_cp: basically we already have ssl enabled (our devops team did that), right now I'm usin one of our bank's APIs. They have a SOAP API and every request will require auth with 2 way ssl - now that's what the bank guys said and I'm not too sure what to do here. they also sent me a SSL certification from their side and asked us to generate one which I've got done from our devops team and forwarded to them.
[10:13:13] xhoy: has joined #RubyOnRails
[10:14:23] thejoecarroll: has joined #RubyOnRails
[10:15:14] AntiSpamMeta: has joined #RubyOnRails
[10:15:19] norc: shmoon_: Im guessing by SSL you mean TLS?
[10:15:28] jamo: has joined #RubyOnRails
[10:17:29] norc: shmoon_: Anyhow, what is your actual question?
[10:17:30] iateadonut: has joined #RubyOnRails
[10:17:50] fox_mulder_cp: shmoon_: you want use your own ssl cert for request some soap from your bank?>
[10:18:17] nfk|laptop: has joined #RubyOnRails
[10:19:02] owenjones: has joined #RubyOnRails
[10:20:17] alphaatom: has joined #RubyOnRails
[10:21:34] sloggerkhan: has joined #RubyOnRails
[10:22:06] Tempesta: has joined #RubyOnRails
[10:22:10] shmoon_: yeah like I should send certificates for verifiction by the bank and I also have banks certificates that should verify the api endpoint - so like a 2 way ssl authentication is what they said
[10:22:48] sevenseacat: am I the only one who finds this really scary?
[10:23:33] Kn|t3: has joined #RubyOnRails
[10:24:01] norc: sevenseacat: Which part? The one that he seems to be responsible dealing with TLS with a bank without any experience?
[10:24:07] mices: if i have config.reconfirmable = true in config/devise.rb then i don't need to put reconfimable in my model? (because it causes an error uninitialized constant ...reconfirmable
[10:24:15] sevenseacat: norc: thats the one
[10:26:22] shmoon_: norc: sevenseacat: haha, but I've to learn someday :)
[10:26:59] shmoon_: agreed I don't have experience, it's not as scary as you think. I just need to hit their API endpoint for some transfer requests. its just that for auth till now I was using basic auth on their sandbox but now to make it live I've to use ssl certificates.
[10:27:52] shmoon_: they gave another sandbox that uses ssl cert rahter than basic auth so first have to make it work on that and then can I make it live. I'm googling and studying, let's see. was wondering if someone could give me some sort of simple tutorial or pointers, would be great! :-)
[10:28:53] quazimodo: has joined #RubyOnRails
[10:29:05] stesind: has joined #RubyOnRails
[10:30:58] rickmasta: has joined #RubyOnRails
[10:32:37] lxsameer: has joined #RubyOnRails
[10:36:37] netzfisch: has joined #RubyOnRails
[10:37:12] chrisseaton: has left #RubyOnRails: ()
[10:37:26] sonalkr132: has joined #RubyOnRails
[10:38:46] PedramT: has joined #RubyOnRails
[10:39:14] sandstrom: has joined #RubyOnRails
[10:40:17] artto: has joined #RubyOnRails
[10:40:42] tuelz: has joined #RubyOnRails
[10:41:52] puria: has joined #RubyOnRails
[10:41:57] ElFerna: has joined #RubyOnRails
[10:43:58] wldcordeiro: has joined #RubyOnRails
[10:44:11] srinidhi: has joined #RubyOnRails
[10:46:28] arup_r: has joined #RubyOnRails
[10:47:47] alphaatom: has joined #RubyOnRails
[10:51:51] arBmind: has joined #RubyOnRails
[10:53:58] shock_one: has joined #RubyOnRails
[10:55:57] shock_one: has joined #RubyOnRails
[10:58:04] norc: shmoon_: The entire topic is fairly complex, the mistakes you can make are so subtle with severe consequences. So no, I don't really condone learning like this.
[10:58:48] eyck: has joined #RubyOnRails
[10:59:42] Kn|t3: has joined #RubyOnRails
[11:05:09] Tempesta: has joined #RubyOnRails
[11:07:38] Pupeno: has joined #RubyOnRails
[11:07:38] Pupeno: has joined #RubyOnRails
[11:09:19] Kn|t3: has joined #RubyOnRails
[11:11:04] tildes: has joined #RubyOnRails
[11:11:23] alphaatom: has joined #RubyOnRails
[11:13:51] cassioscabral: has joined #RubyOnRails
[11:13:54] Kn|t3: has joined #RubyOnRails
[11:19:41] celly: has joined #RubyOnRails
[11:20:22] artto: has joined #RubyOnRails
[11:20:50] IanMalcolm: has joined #RubyOnRails
[11:22:29] stamina: has joined #RubyOnRails
[11:25:13] zeel: has joined #RubyOnRails
[11:29:33] nfk|laptop: has joined #RubyOnRails
[11:29:50] build22: has joined #RubyOnRails
[11:29:55] build22: has left #RubyOnRails: ()
[11:30:55] nickjj: has joined #RubyOnRails
[11:30:55] tibra_: has joined #RubyOnRails
[11:31:39] tibra: has joined #RubyOnRails
[11:32:13] johnflux: has joined #RubyOnRails
[11:32:14] johnflux: has joined #RubyOnRails
[11:34:34] sankaber: has joined #RubyOnRails
[11:35:22] sankaber: has joined #RubyOnRails
[11:36:53] FailBit: has joined #RubyOnRails
[11:37:18] benhuda: has joined #RubyOnRails
[11:41:17] RegulationD: has joined #RubyOnRails
[11:41:29] tuelz: has joined #RubyOnRails
[11:44:43] netzfisch: has joined #RubyOnRails
[11:45:35] avelldiroll: has joined #RubyOnRails
[11:47:46] cassioscabral: has joined #RubyOnRails
[11:49:07] beingjohnm_: has joined #RubyOnRails
[11:50:10] chridal: What do you guys think about this test https://gist.github.com/christiandalsvaag/07d0e93eae323bb8923b ?
[11:50:20] chridal: Should I be testing that in another way
[11:50:28] mikecmpbll: has joined #RubyOnRails
[11:54:19] rhizome: has joined #RubyOnRails
[11:57:09] tetraktys: has joined #RubyOnRails
[11:57:48] Ropeney: has joined #RubyOnRails
[12:00:49] nyaa: has joined #RubyOnRails
[12:02:42] yos7ph: has joined #RubyOnRails
[12:04:25] elaptics: chridal: it's reasonable
[12:06:51] Pupeno: has joined #RubyOnRails
[12:07:04] dideler: has joined #RubyOnRails
[12:07:10] hardtail: has joined #RubyOnRails
[12:08:21] Pupeno: has joined #RubyOnRails
[12:08:22] Pupeno: has joined #RubyOnRails
[12:09:03] pawnbox: has joined #RubyOnRails
[12:09:13] ElFerna: has joined #RubyOnRails
[12:09:15] iateadonut: has joined #RubyOnRails
[12:09:35] nettoweb: has joined #RubyOnRails
[12:09:47] czerasz: has joined #RubyOnRails
[12:11:08] waseem__: has left #RubyOnRails: ()
[12:11:29] waseem_: has joined #RubyOnRails
[12:12:27] yos7ph_: has joined #RubyOnRails
[12:13:05] yfeldblum: has joined #RubyOnRails
[12:13:52] yfeldblum: has joined #RubyOnRails
[12:16:41] anoob: has joined #RubyOnRails
[12:16:42] doodlehaus: has joined #RubyOnRails
[12:17:06] platzhirsch: has left #RubyOnRails: ()
[12:23:08] anoob: is it possible to uglify js in a development environment? config/environments/development.rb: https://pastebin.mozilla.org/8855016
[12:23:43] yfeldblum: has joined #RubyOnRails
[12:23:57] Hazim: has joined #RubyOnRails
[12:25:26] yogeshrt: has joined #RubyOnRails
[12:27:05] pawnbox: has joined #RubyOnRails
[12:31:56] c355E3B: has joined #RubyOnRails
[12:32:31] gaustin_: has joined #RubyOnRails
[12:35:30] Kn|t3: has joined #RubyOnRails
[12:36:46] artto: has joined #RubyOnRails
[12:37:37] belgiantruffles: has joined #RubyOnRails
[12:37:57] pawnbox: has joined #RubyOnRails
[12:39:34] syzygy_: has joined #RubyOnRails
[12:41:23] pawnbox: has joined #RubyOnRails
[12:48:50] pawnbox: has joined #RubyOnRails
[12:49:16] qejk: has joined #RubyOnRails
[12:49:16] atomical: has joined #RubyOnRails
[12:50:34] futilegames: has joined #RubyOnRails
[12:51:54] krz: has joined #RubyOnRails
[12:57:58] futilegames_: has joined #RubyOnRails
[12:59:03] build22__: has joined #RubyOnRails
[12:59:23] ewnd9: has joined #RubyOnRails
[13:01:23] netzfisch: has joined #RubyOnRails
[13:04:24] artto: has joined #RubyOnRails
[13:06:28] drptbl: has joined #RubyOnRails
[13:07:09] netzfisch: has joined #RubyOnRails
[13:07:51] celly: has joined #RubyOnRails
[13:18:55] sandstrom: has joined #RubyOnRails
[13:20:48] cornerma1: has joined #RubyOnRails
[13:21:54] d0nn1e: has joined #RubyOnRails
[13:23:15] pawnbox: has joined #RubyOnRails
[13:24:21] gNoobie: has joined #RubyOnRails
[13:25:00] gNoobie: has left #RubyOnRails: ()
[13:26:08] dstarh: has joined #RubyOnRails
[13:26:20] shanemcd: has joined #RubyOnRails
[13:27:09] ubikretail: has joined #RubyOnRails
[13:27:26] tuelz: has joined #RubyOnRails
[13:27:31] ubikretail: has left #RubyOnRails: ()
[13:27:38] Pupeno: has joined #RubyOnRails
[13:31:54] amortimer: has left #RubyOnRails: ()
[13:33:16] pawnbox: has joined #RubyOnRails
[13:35:21] gNoobie: has joined #RubyOnRails
[13:36:27] gNoobie: has left #RubyOnRails: ()
[13:36:46] broman: has joined #RubyOnRails
[13:37:17] ubiks: has joined #RubyOnRails
[13:37:30] futilegames: has joined #RubyOnRails
[13:37:33] ubiks: hi, I registered and this is a test
[13:37:48] broman: can someone please help me? I need to install the sql adapter for mssql... I'm using a turnkey vm and issuing the 'gem install activerecord-sqlserver-adapter' command... it says 1gem installed everytime I run this.. what can i do to solve this?
[13:38:27] Palsson: has joined #RubyOnRails
[13:39:08] pawnbox: has joined #RubyOnRails
[13:39:53] tbuehlmann: ubiks, works!
[13:44:31] ubiks: I'm following Rails Tutorial for a many-to-many relation with through but getting a weird output. When I call usr1.aim usr2 it returns ActiveRecord::AssociationTypeMismatch: User(#59121216) expected, got Fixnum(#443
[13:45:10] ubiks: here is the aim(other) method: active_facings.create(aimed_id: other.id)
[13:45:15] ubiks: any idea? :/
[13:45:15] sevenseacat: usr2 should be a user record, and its actually a number
[13:45:54] ubiks: both exist in the db; do you mean that by record? (sorry I just started with rails)
[13:46:02] sevenseacat: no, I mean in your code
[13:46:15] sevenseacat: the variable usr2 should be a User instance
[13:46:39] sevenseacat: though gisting the full error might help
[13:47:00] ubiks: first I do usr1 = User.find(5) and usr2 = User.find(6)
[13:47:06] rickmasta: has joined #RubyOnRails
[13:47:08] ubiks: at the rails console
[13:47:34] alphaatom: has joined #RubyOnRails
[13:47:38] ubiks: then I call usr1.aim usr2 and get the exception
[13:49:22] sevenseacat: can you gist your schema?
[13:49:48] sevenseacat: ubiks: gist it at http://gist.github.com
[13:49:55] sevenseacat: its considered rude to PM people without permission.
[13:50:12] ubiks: (allright)
[13:50:57] kmckelvi1: has joined #RubyOnRails
[13:53:26] build22: has joined #RubyOnRails
[13:54:19] yogeshrt: has joined #RubyOnRails
[13:54:37] gr3yR0n1n: has joined #RubyOnRails
[13:55:47] ubiks: I added User and Facing models and the Facings migrations; is there anything else you need? https://gist.github.com/anonymous/32898aab5bb23a12ddee
[13:59:52] sevenseacat: https://gist.github.com/anonymous/32898aab5bb23a12ddee#file-gistfile1-txt-L3-L4 these should be :aimer and :aimed
[14:00:53] snowy: has joined #RubyOnRails
[14:02:13] kmckelvi1: has joined #RubyOnRails
[14:02:33] hardtail: has joined #RubyOnRails
[14:02:55] ubiks: sevenseacat: it works! thank you very much, and thank you for the netiquette lesson as well
[14:05:56] alphaatom: has joined #RubyOnRails
[14:07:10] Spami: has joined #RubyOnRails
[14:08:57] broman: now I am getting ODBC::Error: IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified ... somebody?
[14:11:00] Oliphaunte: has joined #RubyOnRails
[14:11:19] arup_r: has joined #RubyOnRails
[14:15:05] sankaber: has joined #RubyOnRails
[14:15:54] mrbubbles: has joined #RubyOnRails
[14:16:14] artto: has joined #RubyOnRails
[14:16:14] twilling: has joined #RubyOnRails
[14:16:29] tuelz: out of curiosity, when did IRC etiquette deem PMs rude without permission? Did old irc clients have obnoxious notification noises or something?
[14:16:59] tuelz: I've just never seen it considered rude outside of irc, so I presume there is some historic reason for it
[14:17:28] upsell5: has joined #RubyOnRails
[14:17:30] sevenseacat: since it's been in our channel rules for many years
[14:17:45] tuelz: yeah, but I doubt rails was the first to have that rule
[14:17:49] tetraktys: has joined #RubyOnRails
[14:17:53] tuelz: it's been around a while iirc
[14:18:32] tuelz: I've seen it in a few different channels, some I would think are much older than rails...just curious if there was some interesting reason for it
[14:19:20] matthewd: tuelz: For the PM recipient: If one has a couple of channels open, a sudden query window is disorienting, at best... loss of context, loss of multiplexing
[14:19:44] sevenseacat: typically it happens because someone thinks theyre a special snowflake and can seek private help from a channel helper
[14:19:57] matthewd: tuelz: For the channel: Now no-one else gets to help, no-one else gets to learn from the conversation... you've just become a full-on unpaid consultant
[14:19:59] tuelz: matthewd: ahh, see I don't think I've ever used a client that auto-focuses PMs...that would make sense
[14:20:39] sevenseacat: in an unrelated note, I'd like to punch brunch in the face
[14:21:19] tuelz: I'd like to punch the js community in the face for thinking there needs to be 100 asset building tools
[14:21:34] twilling: has joined #RubyOnRails
[14:21:52] tuelz: but I get it, reading js is harder than just writing your own tool, so they just make their own
[14:21:59] tuelz: ACTION only kinda trolling
[14:22:27] matthewd: tuelz: Exactly... we have one, it's awful, and we like it. ;)
[14:23:24] tuelz: matthewd: hah, yep. I'm actually a rather insignificant part of the pakyow dev team and we're in the process of talking to volt and I believe one other ruby framework to figure out a good modular asset pipeline type tool we can all colab on
[14:24:24] twilling: has joined #RubyOnRails
[14:24:31] tuelz: I believe sprockets is really the only thing out there in the ruby world, unless I'm mistaken
[14:25:36] matthewd: Yeah.. it has both the advantages and disadvantages of having come into existence quite early in relative history, I think
[14:25:42] shibly: has joined #RubyOnRails
[14:26:15] matthewd: So, it's well established enough that it didn't spawn a bunch of contemporary competitors... but it's architecturally complicated by not having known exactly what it should look like in the beginning
[14:26:26] tuelz: it could be worse. I could have to learn a new asset toolchain for every new project I start
[14:27:10] tuelz: I do like having at least one alternative for tools like that, though. For instance I have fun playing with Sequel even though AR has done just fine for me
[14:27:28] twilling: has joined #RubyOnRails
[14:27:51] matthewd: I'm hopeful we can make sprockets better.. rip out abstractions that aren't actually/still needed, mostly
[14:28:34] tuelz: at this point I think ripping out from sprockets will be much harder than starting a new project all together, wouldn't it?
[14:28:47] matthewd: But (apart from lack of sourcemaps, which is now nearly there) it's generally just "good enough" that people's efforts & interest are elsewhere
[14:28:49] sevenseacat: oops, look what I stated
[14:29:23] sevenseacat: ACTION still triyng to work out how to include bootstrap js in a brunch-powered app
[14:29:28] tuelz: matthewd: are you a contributor to sprockets?
[14:29:55] matthewd: tuelz: Rails, so yes
[14:30:18] twilling: has joined #RubyOnRails
[14:31:06] matthewd: Though I don't think I've actually touched sprockets-proper personally since we got control of it
[14:31:17] mostlybadfly: has joined #RubyOnRails
[14:31:23] matthewd: So it may depend on your definition of contributor :)
[14:31:23] tuelz: matthewd: any ideas what an ideal new tool would look like? I'd like to see a framework agnostic toolchain in rubyland
[14:31:33] tuelz: hah, gotcha
[14:33:03] matthewd: Sprockets is framework agnostic... and as far as I know (again, apart from sourcemaps, which are long overdue) it kinda does everything one needs... largely because there aren't *that* many things an asset pipeline tool *needs* to do
[14:33:24] tuelz: interesting, I don't know that I've tried sprockets in anything but rails
[14:33:47] matthewd: It's "just" architecturally awful^Wovercomplicated... thus some of the difficulty with sourcemaps, for example
[14:34:02] StevenXL: has joined #RubyOnRails
[14:34:10] matthewd: I think middleman uses sprockets, for example
[14:34:32] tuelz: is it modular or kinda an all or nothing deal?
[14:34:45] matthewd: Googling suggests that might be a "used to", though ??\_(???)_/??
[14:35:47] matthewd: Modular how?
[14:36:27] twilling_: has joined #RubyOnRails
[14:36:43] alphaatom: has joined #RubyOnRails
[14:37:42] sevenseacat: I think I am too stupid to use brunch, or its too late at night
[14:38:05] sevenseacat: possibly both
[14:44:20] Kn|t3: has joined #RubyOnRails
[14:44:22] sankaber: has joined #RubyOnRails
[14:45:02] kmckelvi1: has joined #RubyOnRails
[14:45:55] twilling: has joined #RubyOnRails
[14:46:50] platzhirsch: has joined #RubyOnRails
[14:47:32] platzhirsch: I am defining some helpers in my spec_helper, one method I want to call controller, do something to it and then return the original controller. That results in StackLevelTooDeep, any idea how to solve this with alias or similar?
[14:47:49] sevenseacat: platzhirsch: don't call it controller.
[14:48:03] platzhirsch: sevenseacat: still trying to monkey patch that mess form earlier
[14:48:22] platzhirsch: I think my boss is reluctant to fix it on a design level
[14:48:24] sevenseacat: i dont know what mess you're talking about, and by the sounds of it, i dont want to be reminded.
[14:48:53] shibly: has left #RubyOnRails: ()
[14:48:58] polishdub: has joined #RubyOnRails
[14:49:29] platzhirsch: looks like in model specs the controller gets mocked after the :each calls in RSpec
[14:49:35] platzhirsch: so I cannot stub it globally
[14:49:42] sevenseacat: oh *that* mess.
[14:49:48] sevenseacat: stop calling your controller from your model.
[14:49:56] sevenseacat: problem solvered.
[14:50:07] sevenseacat: its a huuuuuge violation of MVC
[14:50:21] platzhirsch: yeah I explained that..
[14:50:57] platzhirsch: I mean .. problems with testing? Code smell!!
[14:52:11] moei: has joined #RubyOnRails
[14:52:12] platzhirsch: I'll hack something together... this will make angels weep
[14:52:36] Yomero3: has joined #RubyOnRails
[14:52:58] shibabu: has joined #RubyOnRails
[14:53:04] sevenseacat: 'theres a horrible hack that is causing me problems! I know... i'll put another horrible hack in around it'
[14:53:21] 17WABD02O: has joined #RubyOnRails
[14:53:40] atomical_: has joined #RubyOnRails
[14:54:16] stannard: has joined #RubyOnRails
[14:54:18] tvon: has joined #RubyOnRails
[14:54:53] sevenseacat: ACTION is just grumpy at brunch right now
[14:56:01] celly: has joined #RubyOnRails
[14:59:02] zacts_: has left #RubyOnRails: ()
[15:00:05] lacrymology: has joined #RubyOnRails
[15:00:11] FailBit: that's ruby for ya
[15:00:52] momomomomo: has joined #RubyOnRails
[15:01:00] leslie: has joined #RubyOnRails
[15:01:00] leslie: has joined #RubyOnRails
[15:02:19] leslie: has joined #RubyOnRails
[15:02:20] leslie: has joined #RubyOnRails
[15:02:36] snowy: has joined #RubyOnRails
[15:04:44] esparkman: has joined #RubyOnRails
[15:08:56] arup_r: why my spec is not happy ? It is failing .. :/ Event though I have a right stub https://gist.github.com/aruprakshit/6058f560762623450230
[15:09:31] zpe: has joined #RubyOnRails
[15:09:31] jpterry: has joined #RubyOnRails
[15:09:31] csmb: has joined #RubyOnRails
[15:09:31] swhitt: has joined #RubyOnRails
[15:09:31] w5isp: has joined #RubyOnRails
[15:10:07] tvon: has joined #RubyOnRails
[15:10:23] sevenseacat: arup_r: does your controller action require authentication?
[15:10:47] sandstrom: has joined #RubyOnRails
[15:11:28] arup_r: yes, ok..I have that, I snipped it out from gist. I see the destroy action is called in the `tail -f log/test.log`
[15:11:50] sevenseacat: is your test authenticating the user?
[15:12:04] arup_r: yes it is . Let me add that in gist
[15:12:40] sevenseacat: waaaait a second - you're adding the expectation *after* you call the controller action
[15:12:42] sevenseacat: that makes no sense
[15:12:47] sevenseacat: no wonder if fails
[15:12:59] arup_r: https://gist.github.com/aruprakshit/6058f560762623450230
[15:13:11] smathy: has joined #RubyOnRails
[15:13:15] _Tariq: has joined #RubyOnRails
[15:13:25] IanMalcolm: has joined #RubyOnRails
[15:13:26] joshkovach: has joined #RubyOnRails
[15:13:27] arup_r: sevenseacat: expect() can't go after the call ... ?
[15:13:34] idefine_: has joined #RubyOnRails
[15:13:44] Oliphaunte: has joined #RubyOnRails
[15:14:02] sevenseacat: it can, but expectations are typically against future events
[15:14:18] esparkman: has joined #RubyOnRails
[15:15:36] atomical: has joined #RubyOnRails
[15:15:37] jgpawletko: has joined #RubyOnRails
[15:15:42] sNipn: has joined #RubyOnRails
[15:16:09] snowy: has joined #RubyOnRails
[15:16:16] kpollich: has joined #RubyOnRails
[15:16:30] syzygy_: has joined #RubyOnRails
[15:17:02] Cervajz_: has joined #RubyOnRails
[15:17:17] lxsameer: has joined #RubyOnRails
[15:17:17] lxsameer: has joined #RubyOnRails
[15:17:17] nertzy: has joined #RubyOnRails
[15:17:52] Cervajz__: has joined #RubyOnRails
[15:18:20] arup_r: sevenseacat: thanks.. I used to follow allow(..) .. then call .. then expect() .. But now I moved the expect(..) as you said all is green
[15:19:29] czerasz: has joined #RubyOnRails
[15:19:53] johnnegron: has joined #RubyOnRails
[15:20:17] johnnegron: has left #RubyOnRails: ()
[15:20:41] The_Phoenix: has joined #RubyOnRails
[15:21:27] dllama: has joined #RubyOnRails
[15:21:30] Meow-J: has joined #RubyOnRails
[15:21:58] Trynemjoel: has joined #RubyOnRails
[15:22:31] johnnegron: has joined #RubyOnRails
[15:22:46] axl_: has joined #RubyOnRails
[15:24:47] Snowy_: has joined #RubyOnRails
[15:27:14] Scriptonaut_: has left #RubyOnRails: ()
[15:27:17] twilling: has joined #RubyOnRails
[15:28:08] alphaatom: has joined #RubyOnRails
[15:28:29] mary5030: has joined #RubyOnRails
[15:31:03] broman: Please! Can someone try to help me connecting to a MSSQL2008? I'm googling about it for 4 hours now :(
[15:31:19] tuelz: has joined #RubyOnRails
[15:32:02] mrtomme: has joined #RubyOnRails
[15:33:24] Oliphaunte: has joined #RubyOnRails
[15:33:44] benhuda: has joined #RubyOnRails
[15:36:50] lacuna: has joined #RubyOnRails
[15:36:52] twilling: has joined #RubyOnRails
[15:39:26] naftilos76: has joined #RubyOnRails
[15:39:35] tenderlove: has joined #RubyOnRails
[15:40:17] xardion: has joined #RubyOnRails
[15:42:20] pawnbox_: has joined #RubyOnRails
[15:42:32] dllama: morning all, can anyone help out with capybara please? I'm trying to select the first non-disabled option from a dropdown, couldn't find anything by googling, adding disabled: true/false to find() actually netted identical results (which was wrong)
[15:42:50] nateberkopec: has joined #RubyOnRails
[15:43:09] yardenbar: has joined #RubyOnRails
[15:43:21] rgtk: has joined #RubyOnRails
[15:45:23] netzfisch: has joined #RubyOnRails
[15:45:29] Oliphaunte: has joined #RubyOnRails
[15:45:39] pawnbox: has joined #RubyOnRails
[15:46:22] ElFerna: has joined #RubyOnRails
[15:48:44] dllama: https://gist.github.com/mvoloz/d0d3ecd52c2d228eef6c ??? can't figure out how to select the first non disabled field via capybara, any help would be greatly apprecaited
[15:54:21] _Tariq: has joined #RubyOnRails
[15:55:00] sharkman: has joined #RubyOnRails
[15:55:04] Oliphaunte: has joined #RubyOnRails
[15:55:49] tvon: dllama: I've done that before but my memory is hazy... does option:checked work as a css selector?
[15:56:19] dllama: option:checked on a dropdown/
[15:56:23] sharkman: i have a table called Game. why is it that if i do Game.all() it returns this #<Game::ActiveRecord_Relation:0x000000031f4890>, instead o a list of the games?
[15:56:25] fryguy9: has left #RubyOnRails: ()
[15:56:40] fryguy: has joined #RubyOnRails
[15:56:53] tvon: dllama: yes
[15:57:04] tubbo: sharkman: because you haven't asked it for any data yet. if you did Game.all.to_a, it would give you a list of models back. but it would also do a SELECT query.
[15:57:04] Spami: has joined #RubyOnRails
[15:57:29] tubbo: sharkman: the way rails works, simply doing Game.all doesn't actually produce a query. ActiveRecord only executes the query when it's actually needed, e.g. when data is requested.
[15:58:05] lacrymology: has joined #RubyOnRails
[15:58:17] sharkman: then how come when i do this, print Game.all[0], it still has the same issue
[15:58:29] tuelz: has joined #RubyOnRails
[15:58:32] matthewd: sharkman: "same issue"?
[15:58:34] sharkman: but if i do bundle exec rails c, and run the command, it gives me actual entries
[15:58:35] tubbo: sharkman: i don't know, i've never tried to do that.
[15:58:43] sharkman: <Game:0x0000001057a868>
[15:58:51] tubbo: sharkman: that's not the same issue
[15:59:08] matthewd: That's an instance of Game... what are you expecting?
[15:59:13] sharkman: yes matthewd
[15:59:29] tubbo: yeah that's just how ruby expresses instances of an object in string format
[15:59:32] sharkman: why wont it show the information associated with the instance
[15:59:51] teclator: has joined #RubyOnRails
[15:59:55] dllama: tvon: adding option:checked is returning "The expression is not a legal expressoin
[15:59:58] dllama: expression
[16:00:23] tubbo: sharkman: you mean like <Game:0x0000 @id="1" @foo="bar">?
[16:00:26] tvon: hrm, one sec
[16:00:31] sharkman: oh i know what i did. i was doing "print" not "p"
[16:00:36] matthewd: sharkman: You haven't described what "print" means here, other than that it's *not* the output form rails c
[16:00:56] ubiks: can a belongs_to relation point to two classes? Like belongs_to :player, "Boy"; belongs_to :player, "Girl"
[16:01:08] tubbo: ahh yes, the `print` command i *believe* just runs #to_s, while `p` runs #inspect (or maybe i have that backwards?)
[16:01:21] matthewd: ubiks: You probably want polymorphic
[16:01:38] Kn|t3: has joined #RubyOnRails
[16:02:06] dllama: i've updated the gist with several other attempts, https://gist.github.com/mvoloz/d0d3ecd52c2d228eef6c
[16:02:18] hardtail: has joined #RubyOnRails
[16:02:42] dllama: thanks in advance btw! :)
[16:02:52] ubiks: matthewd: I've seen the other way around, pointing different whatever_id to the same class; but yeah, you I right... gonna Googl
[16:03:02] twilling: has joined #RubyOnRails
[16:03:25] dllama: ubiks: you might be better off with setting a scope
[16:04:05] dllama: for instance define a scope as boy to be @game.player.where(sex: "male")
[16:04:11] dllama: or something to that effect
[16:04:15] reaVer: has joined #RubyOnRails
[16:04:47] argoneus_: has joined #RubyOnRails
[16:05:35] gambl0re: has joined #RubyOnRails
[16:06:02] tvon: dllama: well, I think there is a better way but you can use the css selector: 'select.date_select option:not([disabled="disabled"])
[16:06:25] dllama: or polymorphic, but it really depends on how you define each boy/girl class, if its just a single flag that differentiates it, or actually 2 separate classes,
[16:06:31] tvon: That would get all of the not-disabled options. Or select.date_select option[selected="selected"]
[16:06:33] mattt: has left #RubyOnRails: ("WeeChat 0.3.7")
[16:06:45] dllama: tvon: going to try that now, thanks!
[16:07:14] tvon: I'm going off of a nokogiri test, I don't recall the exact capaybara API to it.
[16:08:07] rgtk: has joined #RubyOnRails
[16:08:26] ubiks: the classes are gamers and clans, and they both can have many participations into different matches
[16:09:08] dllama: ubiks: there are various ways of handling it, but i think i might lean towards setting a scope
[16:09:30] ubiks: so I am going polymorphic, by saying that a Participation belongs_to :participant, :polymorphic => true; and that a Clan or a Player has_many :participations, as: participant, class_name: "Participation", foreign_key: "player_id", dependent: :destroy
[16:09:35] dllama: you add a scope in your game class to select based on various flags, so while you have the game.players association, you can still pass a where clause to it,
[16:09:50] dllama: alrighty then, forget what i said lol
[16:10:01] ubiks: now am considering it xD
[16:10:39] przemosk: has joined #RubyOnRails
[16:10:44] mag42c: has joined #RubyOnRails
[16:12:35] dllama: Unable to find css "#date_select_2i option:not[disabled='disabled']" ??? capybara is not my friend today
[16:13:22] mag42c_: has joined #RubyOnRails
[16:13:32] dllama: well not just today, i started writing this spec on Friday, i thought by some miracle on Monday it would just work lol
[16:13:36] DoubleMalt: has joined #RubyOnRails
[16:13:48] matthewd: dllama: I'm pretty sure that's not valid CSS
[16:13:56] matthewd: Or at least not CSS that means what you think it means
[16:14:22] matthewd: ubiks: Use a polymorphic association.
[16:15:15] ubiks: matthewd: thanks, I left that code and it seems like the correct way: labelling many under a single name and calling it from belongs_to
[16:16:52] doodlehaus: has joined #RubyOnRails
[16:17:00] slash_join: dllama: for one, you dont't need to say option[selected="selected"]... option[selected] is enough
[16:18:20] slash_join: ACTION must be cross-eyed....
[16:18:30] dllama: slash_join: i'm not looking for the first selected, i'm looking for the first option that is NOT disabled
[16:19:09] dllama: https://gist.github.com/mvoloz/d0d3ecd52c2d228eef6c ??? thats the select and some of the capybara things i've tried in console
[16:19:40] slash_join: dllama: have you tried option:not([disabled]):first-of-type?
[16:19:58] slash_join: oh, and you're trying to select the element with capybara, not trying to create a matching rule in css?
[16:20:14] krz: has joined #RubyOnRails
[16:21:04] dllama: right now find(:field, "#date_select_2i option[selected=selected]").text returns the correct value, but its also because right now december is the only available option
[16:21:18] dllama: i suck at capybara, so this is all a major PITA for me
[16:21:41] kr1shnak: has joined #RubyOnRails
[16:22:31] tvon: dllama: don't use :field, use :css
[16:22:38] matthewd: dllama: I think you'll have more luck with a selector closer to what tvon suggested, and not a mangled version thereof
[16:22:42] tvon: or just find('.your.css.here')
[16:22:57] tvon: matthewd: you're right about the not([disabled]) btw
[16:22:59] slash_join: "option:not([disabled])" works with jquery
[16:23:40] slash_join: page.first("option:not([disabled])")
[16:23:56] Kn|t3: has joined #RubyOnRails
[16:24:07] nyaa: has joined #RubyOnRails
[16:24:18] dllama: u are a scholar and a gentleman, (if lady please forgive) :D
[16:24:27] idefine_: has joined #RubyOnRails
[16:25:28] dllama: tvon: i think you also gave me this solution, but i mistakingly kept insisting on using find(:field, "") doing it purely as a css selector works much better, thank you very much!
[16:25:58] lictor36: has joined #RubyOnRails
[16:26:20] tvon: No problem
[16:26:22] markh: has joined #RubyOnRails
[16:26:32] alphaatom: has joined #RubyOnRails
[16:26:49] Oliphaunte: has joined #RubyOnRails
[16:27:30] nocontrol: has joined #RubyOnRails
[16:29:19] sarink: has joined #RubyOnRails
[16:29:55] johnnegron: has joined #RubyOnRails
[16:30:25] FooMunki: has joined #RubyOnRails
[16:31:49] Oliphaunte: has joined #RubyOnRails
[16:32:01] aaronr: has joined #RubyOnRails
[16:32:02] sandstrom: has joined #RubyOnRails
[16:33:22] pawnbox_: has joined #RubyOnRails
[16:34:00] arup_r: has joined #RubyOnRails
[16:35:18] silverdust: I'm using this http://everydayrails.com/2012/03/19/testing-series-rspec-models-factory-girl.html to get myself familiar with rspec but in the model where I have Factory.create(:user) after creating a factory for user I get uninitialized constant Factory when the test is run
[16:36:06] silverdust: I couldn't find any recent article as detailed as that
[16:37:34] creature: silverdust: I didn't read the URL, but the slug suggests that you're using FactoryGirl and you're trying to use the constant "Factory".
[16:37:50] creature: So you probably want FactoryGirl.create(:user).
[16:38:41] arup_r: people here very often ask for some free resources to learn Ruby on Rails. Till 25 of this mobth, author of the book giving it free http://goo.gl/5F7sGR ... You can get it if you want..
[16:39:01] tvon: fits the budget
[16:39:29] ElFerna: has joined #RubyOnRails
[16:39:36] silverdust: Factorygirl.create(:user) is what throws the error uninitialized constant Factory
[16:40:18] Scient: because its FactoryGirl
[16:40:20] Scient: case matters
[16:40:30] silverdust: I'm setting I have the factory_girl gem installed but what I'm not sure of is if it's loaded
[16:40:30] tom_lowndes: has joined #RubyOnRails
[16:41:30] silverdust: I didn't see that. Thanks
[16:43:24] shibly: has joined #RubyOnRails
[16:43:33] shibly: What's the size of ruby on rails? How many megabytes?
[16:44:11] celly: has joined #RubyOnRails
[16:44:13] dllama: ruby base or a ruby app?
[16:44:20] dllama: cuz the size can vary wildly based on gems you install
[16:44:49] ferr: has joined #RubyOnRails
[16:44:53] tubbo: well, the question was "ruby on rails", not "a ruby on rails app", so i'm guessing the framework is what was meant
[16:45:00] shibly: only standalone ruby on rails size
[16:45:28] tubbo: shibly: 1.41mb apparently ;) just kidding...it's a combination of all the gem sizes
[16:45:51] tubbo: shibly: you can see all of them here, https://rubygems.org/gems/rails add up all the MB sizes and that's the total size of the framework.
[16:45:52] axl_: has joined #RubyOnRails
[16:45:57] tubbo: it's the rails gem + all of its runtime dependencies
[16:46:40] tubbo: shibly: honestly though, an easier way to find out would be to just install all the gems through bundler and see how big your bundle directory is
[16:46:57] tubbo: just make a Gemfile and only install `gem 'rails'`.
[16:47:07] shanemcd: has joined #RubyOnRails
[16:47:13] flashpoint9: has joined #RubyOnRails
[16:47:22] silverdust: Is it okay to use expect in recent days or it's better to explicitly enable :should for rspec test?
[16:47:22] lacrymology: has joined #RubyOnRails
[16:47:43] flashpoint9: i think expect is the right syntax now
[16:47:55] silverdust: okay thank you
[16:48:27] tubbo: i use expect() and turn off monkeypatching in rspec for great justie
[16:49:07] silverdust: but I get undefined method expect
[16:50:16] tubbo: silverdust: what version of rspec are you using?
[16:51:03] silverdust: should works but with the deprecation warning suggesting I enable it
[16:51:22] silverdust: and also including that expect should work without having to enable
[16:51:53] tubbo: silverdust: it definitely should work without having to enable. can you paste your spec file to gist.github.com? i think you might be missing something.
[16:52:25] bronson: has joined #RubyOnRails
[16:52:48] silverdust: yes I was just about to do that
[16:53:20] silverdust: https://gist.github.com/bl4ckdu5t/7a01ef050ff7f56962dc
[16:53:24] shibabu: has joined #RubyOnRails
[16:54:14] silverdust: I know I should use Faker for the values but I want to do without it for my first time
[16:56:23] tvon: has joined #RubyOnRails
[16:56:23] shibly: I have installed pip as a standalone application, then , pip install Django
[16:56:28] tubbo: silverdust: ah, right. you're not using expect correctly...it's not just a name change, it's a different syntax altogether.
[16:56:40] tubbo: silverdust: check this out http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
[16:56:47] shibly: has left #RubyOnRails: ()
[16:56:49] tubbo: shibly: traitor! ;)
[16:57:13] tubbo: he must be working on a DEC PDP-11 since he's so concerned about framework download size ;)
[16:57:15] speakingcode: has joined #RubyOnRails
[16:57:25] Scriptonaut: has joined #RubyOnRails
[16:58:42] flashpoint9: Im getting a no route matches POST but everything looks exactly like another model controller view thats working http://paste.ofcode.org/hYRcFVN9s4WxzymsF6gMkm
[16:59:13] hardtail: has joined #RubyOnRails
[16:59:17] dllama: where are you posting to? /credits and /debits?
[16:59:29] flashpoint9: dllama: this is for debits
[16:59:30] silverdust: I see tubbo . Thanks
[16:59:52] dllama: flashpoint9: have you restarted your app since adding the routes?
[17:00:08] flashpoint9: dllama: yes but i can do it again
[17:00:17] nertzy: has joined #RubyOnRails
[17:00:24] twilling: has joined #RubyOnRails
[17:01:01] Liothen-: has left #RubyOnRails: ()
[17:01:01] flashpoint9: dllama: so strange, thats the third time ive restarted and now it works but the other two didnt, have no idea why
[17:01:05] Kn|t3: has joined #RubyOnRails
[17:01:10] flashpoint9: anyway its working, weird
[17:01:15] dllama: could be spring
[17:01:18] dllama: it does funky things sometimes
[17:01:29] dllama: i've had it "cache" stuff in the past to a point of having to kill it
[17:02:23] shibabu: has joined #RubyOnRails
[17:03:58] Oliphaunte: has joined #RubyOnRails
[17:04:46] Liothen: has joined #RubyOnRails
[17:06:19] rickmasta: has joined #RubyOnRails
[17:07:03] silverdust: tubbo: Don't I get to see the values factory is assigning?
[17:07:19] tubbo: silverdust: i don't know what you mean
[17:07:44] silverdust: I would like to see those values I entered for each field
[17:08:13] silverdust: It's why I entered my own values. I checked the test db and it's empty and it doesn't show in my test result
[17:08:37] silverdust: I just read that Faker users funny values and I wanted to see what the values are like before using it
[17:09:23] lacrymology: has joined #RubyOnRails
[17:09:40] tubbo: silverdust: ah ok, well i'm not sure they stick around in the DB after the test is completed. i think everything is contained within a transaction and when the test is over, rails just ROLLBACKs the transaction so it doesn't actually write anything to the DB
[17:10:48] silverdust: oh okay so I never get to see what values Faker's using :( not like it matters. I'm just curious
[17:10:55] syzygy_: has joined #RubyOnRails
[17:14:06] lacrymology: anyone knows the easiest way to remove a couple endpoints/methods from devise routes?
[17:14:40] lacrymology: namely, passwords#new, passwords#edit
[17:15:07] tubbo: lacrymology: you don't want people to be able to change their password?
[17:15:39] build22: has left #RubyOnRails: ()
[17:16:06] lacrymology: tubbo: I'm making an API, I don't want to present an HTML route to it
[17:17:06] lacrymology: POST /users/password with an email sends a reset email, PUT /users/password allows modification
[17:17:25] cassioscabral: has joined #RubyOnRails
[17:17:47] Oliphaunte: has joined #RubyOnRails
[17:19:41] rodfersou: has joined #RubyOnRails
[17:20:59] chouhoulis: has joined #RubyOnRails
[17:23:11] snguyen: has joined #RubyOnRails
[17:23:35] broman: everything is going ok.. but... when i click some link, the controller says redirect_to(:controller => "home", :action => 'index') and the address in the browser bar goes ... the wrong path... what can i do to fix this?
[17:25:20] alphaatom: has joined #RubyOnRails
[17:26:29] Cervajz: has joined #RubyOnRails
[17:27:00] lsone: broman: where are you wanting to point to? that is the correct path based on the information
[17:27:13] lsone: are you looking for "root_url" instead?
[17:27:48] lsone: redirect_to root_url will point to whatever you have root set as in your routes.rb
[17:28:11] anjanar: has joined #RubyOnRails
[17:29:11] broman: lsone, locally it works fine.. when I upload this to the server (running phusion) this happens
[17:29:25] StevenXL: What's the correct way to add a lightbox to a view, if i want the lightbox to appear to a form for a new record?
[17:29:25] lsone: "works fine" as in?
[17:29:34] lsone: Where should that be pointing?
[17:29:35] broman: works smoothly
[17:29:40] broman: let me paste
[17:29:47] StevenXL: Do I pass in an empty object every time?
[17:29:51] lsone: controller home, action index should point to home/index
[17:29:55] broman: http://pastie.org/10645769
[17:30:00] Cervajz_: has joined #RubyOnRails
[17:30:18] broman: the problem is that if it redirects to http://ip/home/index it doesn't work.. i get a forbidden 403
[17:30:33] broman: but if I remove the /home/index leaving only the http://ip it works!
[17:30:36] dici: has joined #RubyOnRails
[17:30:38] the_nick_me: has joined #RubyOnRails
[17:30:53] broman: You don't have permission to access /home/index on this server.
[17:31:20] nyaa: has joined #RubyOnRails
[17:31:47] lsone: your get "/home/index" isn't pointing to any controller#action
[17:32:08] sharkman: has joined #RubyOnRails
[17:32:32] lsone: get '/home/index', to: 'home#index'
[17:35:45] broman: still getting the 403
[17:35:56] sandstrom: has joined #RubyOnRails
[17:36:42] lsone: rake routes and see what it says about /home/index in there
[17:36:47] Cervajz: has joined #RubyOnRails
[17:37:08] broman: home_index GET /home/index(.:format) home#index
[17:38:48] lsone: i am thinking your root is setup incorrectly in your nginx config for passenger
[17:39:06] Oliphaunte: has joined #RubyOnRails
[17:39:21] lsone: broman: http://thelazylog.com/how-to-fix-403-fobidden-issue-on-nginx-rails-application/
[17:39:23] cassioscabral: has joined #RubyOnRails
[17:39:47] lsone: Check that out. Sounds like you are having a problem that I had years ago, just can't remember all the steps I want through to fix it right now.
[17:40:06] Hazim: has joined #RubyOnRails
[17:41:21] johnnegron: has joined #RubyOnRails
[17:42:03] broman: lsone, im using Apache
[17:44:00] benlieb: has joined #RubyOnRails
[17:44:18] shanemcd: has joined #RubyOnRails
[17:45:38] DoubleMalt: has joined #RubyOnRails
[17:47:24] nfk|laptop: has joined #RubyOnRails
[17:48:56] mices: in a social networking app should there be a profile (or my_page) model or add relevant columns to the user model?
[17:49:56] shibly: has joined #RubyOnRails
[17:50:17] shibly: What's the latest version of gem? like gem install rails
[17:50:38] Oliphaunte: has joined #RubyOnRails
[17:50:43] broman: can someone please help me??? my route /home/index is returning a 403
[17:51:59] mices: broman: did you create files when you were logged in as root?
[17:52:25] Maletor: has joined #RubyOnRails
[17:53:27] StevenXL: Im trying to use render in a view for a lightbox.
[17:53:45] StevenXL: I know that I have to pass to render a string with a path relative to app/views
[17:54:14] StevenXL: but for some reason, it is only looking in app/views folder instead of the sub-folder app/views/locations
[17:54:23] shibly: has left #RubyOnRails: ()
[17:54:28] StevenXL: This is what I'm passing ing
[17:54:28] StevenXL: <%= render '/locations/new' %>
[17:54:35] shanemcd: has joined #RubyOnRails
[17:54:39] StevenXL: I've also tried without the first "/"
[17:55:00] broman: mices, there is only the root login here.. everything else works
[17:55:44] sleungcy: has joined #RubyOnRails
[17:56:07] ElFerna: has joined #RubyOnRails
[17:56:42] Cervajz_: has joined #RubyOnRails
[17:57:46] StevenXL: hm.. it works if I try to render a partial, but not if I try to render a complete view.
[17:57:50] StevenXL: What am I doing wrong?
[17:59:11] Cervajz__: has joined #RubyOnRails
[17:59:21] smathy: broman, !gist your home controller and your application controller.
[17:59:21] helpa: broman: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:59:23] elaptics: stevenxl: you don't render a view in a view
[18:00:06] pawnbox: has joined #RubyOnRails
[18:00:12] elaptics: stevenxl: in the code you pasted above, the expectation is that there's a partial called _new
[18:00:24] pawnbox: has joined #RubyOnRails
[18:00:35] elaptics: stevenxl: you specify what view to render in the controller
[18:00:55] StevenXL: elaptics: thanks.
[18:01:03] tvon: has joined #RubyOnRails
[18:01:05] StevenXL: it makes more sense to render the _form partial anyway.
[18:01:09] StevenXL: and that works.
[18:01:13] axl_: has joined #RubyOnRails
[18:01:21] n008f4g_: has joined #RubyOnRails
[18:01:40] berserk_ren: has joined #RubyOnRails
[18:01:43] drptbl: has joined #RubyOnRails
[18:01:44] StevenXL: What I'm trying to do is create a lightbox that shows a form for a new object.
[18:01:52] StevenXL: I think I'm making progress towards it.
[18:01:56] broman: smathy, https://gist.github.com/anonymous/672c15b5ef4a01d1ffaa
[18:03:12] broman: smathy, when i do a "rails s", it works fine...
[18:04:04] broman: also, i got this from apache error log AH01630: client denied by server configuration: /home/index.html
[18:04:32] StevenXL: grrr - the javascript on this is in coffeescript.
[18:04:39] smathy: broman, ok, so add your apache configuration to the gist.
[18:05:36] elaptics: stevenxl: there's multiple ways you could achieve that goal, depends what you have and the specific context
[18:06:03] broman: smathy, https://gist.github.com/anonymous/c95ac73f55b1929f7972
[18:06:45] marahin: has joined #RubyOnRails
[18:07:24] nfk|laptop: has joined #RubyOnRails
[18:08:38] broman: why is it trying to go to /home/index.html?
[18:08:44] marahin: Hello. I'm having an issue where I created a model with a :bool type of field, which is not recognized by Rails. Now I'm struggling to make a migration which changes the type to :boolean, however change_column throws an exception because this code implies of a type :bool which is a nil symbol. How should I fix it? I cannot drop the database due to loads of data inside. Code of the migration I'm trying to create: https://gist.github.com/Marahin
[18:08:44] marahin: /2ae645d71b4d04cf159d
[18:08:53] marahin: OOps, the breakline... https://gist.github.com/Marahin/2ae645d71b4d04cf159d
[18:09:22] broman: anything, guys?
[18:10:30] Oliphaunte: has joined #RubyOnRails
[18:10:44] smathy: broman, does any Rails route work through apache?
[18:11:21] smathy: broman, you don't have a PassengerRuby or PassengerDefaultRuby
[18:11:59] smathy: broman, also it's unlikely that you need to set RailsBaseURI and that might be messing things up too.
[18:12:06] [Butch]: has joined #RubyOnRails
[18:12:18] broman: smathy, i got a rails turnkey ...
[18:12:19] Scriptonaut: Hey guys, I'm doing fragment cacheing with: - cache listing do ... Where listing is an activerecord object. However, I don't think the cache key is being generated correctly. When I update the listing object, it is still showing the old object. How do I make it use a cache key based on the updated_at attribute?
[18:12:22] broman: everything is default
[18:14:25] smathy: broman, I'm just telling you what a normal passenger setup is, if you're stuck with some configuration then I'd recommend contacting the people who provided you with that, or people who control that.
[18:16:20] smathy: Scriptonaut, easy way to check, def cache_key; key = super; logger.debug "Key is #{key}"; key; end
[18:16:52] tvon: has joined #RubyOnRails
[18:17:32] IanMalcolm: has joined #RubyOnRails
[18:17:45] joshkovach: has joined #RubyOnRails
[18:18:41] marahin: anyone @ my issue? :/
[18:18:44] marahin: Seems kinda basic.
[18:19:22] IanMalcolm: has joined #RubyOnRails
[18:19:28] arooni: has joined #RubyOnRails
[18:21:20] IanMalcolm: has joined #RubyOnRails
[18:22:13] lacrymology: I've got a model that has a field `fixed_by_user_id`, and I'd like that user to be accesible via .fixed_by_user (or even fixed_by). I'm guessing I should be able to do that from the model itself, I tried `has_one :user, as: :fixed_by_user` (assuming the _id bit would be inferred), but it's not working. How should I do this?
[18:23:19] smathy: marahin, I don't understand what "because this code implies of a type :bool which is a nil symbol" - rather than explaining that though, can you just add the exception to your gist.
[18:23:33] netzfisch: has joined #RubyOnRails
[18:24:23] sbarg: has joined #RubyOnRails
[18:24:29] elaptics: marahin: is this for your development box only?
[18:24:59] smathy: lacrymology, !associations
[18:24:59] helpa: lacrymology: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[18:25:00] marahin: smathy, I created a model by "rails g model User admin:bool".
[18:25:21] smathy: marahin, I guessed, not sure why you're telling me.
[18:25:53] idefine_: has joined #RubyOnRails
[18:26:15] marahin: smathy, I don't really get what do you mean by "adding the exception to gist", sorry
[18:26:15] meoblast001: has joined #RubyOnRails
[18:26:25] pwnd_nsfw: has joined #RubyOnRails
[18:26:28] elaptics: marahin: if this is in development (and I would guess/hope it would only be there) then if you've only just generated the model, you might as well just drop the table and fix the dodgy migration and rerun it
[18:26:34] marahin: elaptics, not really, I want to make it work on production as well
[18:26:46] elaptics: how has this code made it to production already?
[18:26:49] marahin: yeah, that's what I am now trying to do :P
[18:26:59] smathy: marahin, copy the error you're getting when you run `rake db:migrate` and paste it into your gist.
[18:27:07] marahin: elaptics, it's "production" aka student-level project. I'm defining production as "it can be visible by other people through WWW"
[18:27:16] marahin: smathy, ah, I'll drop it in in a moment.
[18:27:16] SteenJobs: has joined #RubyOnRails
[18:27:51] elaptics: marahin: are you just developing "live" on a server?!?!
[18:28:16] marahin: elaptics, it went through on GitHub's repo development branch, which I later on usually pull to the server
[18:28:19] marahin: however it's not being served yet.
[18:28:21] diegoviola: has joined #RubyOnRails
[18:28:47] marahin: I haven't seen that it's wrong data type until I started developing admin options - I must have not seen that I am commiting something extra :P.
[18:28:58] nocontrol: has joined #RubyOnRails
[18:29:04] elaptics: and you've already pushed it?
[18:29:28] marahin: elaptics, to the development branch, yes. Long time ago. Haven't seen that the admin field is screwed up - everything else I was developing at a time worked well
[18:29:57] elaptics: marahin: ah I see, I guess you're about to learn some valuable lessons about coding discipline :D
[18:30:01] marahin: but as I today started doing something with this field I noticed it's screwed. Now I'm trying to fix it, and I came here to get help ;)
[18:30:06] lacrymology: smathy: does this look good to you? `belongs_to :fixed_by_user, class_name: "User"`. It works, but I don't know how 'ralisy' it is
[18:30:06] marahin: elaptics, indeed!
[18:30:07] elaptics: marahin: this is one of the reasons to write tests
[18:30:20] elaptics: lacrymology: that's railsy :D
[18:30:24] smathy: lacrymology, yes, that's precisely what I'd do :)
[18:30:27] marahin: elaptics, I agree highly! However so far I couldn't find any guides that strictly and simplisticly explain how to create tests :(
[18:30:28] lsone: lacrymology: that is a pretty standard railsy way to do it
[18:30:48] theblang: has joined #RubyOnRails
[18:30:49] lacrymology: will deleting user make the field nil, or modify it in any way?
[18:30:52] elaptics: marahin: have you tried any kind of test frameworks so far?
[18:31:19] lacrymology: I'd like the id to remain even if the user disappears
[18:31:20] elaptics: marahin: there's quite a few books on the subject of testing in a rails context
[18:31:20] smathy: lacrymology, see the has_many options in either the guide or the API docs.
[18:31:22] marahin: elaptics, I've used rspec a few times, but it seemed abstract to me at the time, I guess it's the time to take a peek at it again :D
[18:31:33] lacrymology: smathy: why has_many and not belongs_to?
[18:31:37] marahin: I'm rather looking for something online, can't afford the time to get through a book now (which is kind of sad)
[18:32:18] smathy: lacrymology, because if you're deleting the User then it's the User side of the association that you need to define the options for what to do to this model's foreign key field.
[18:32:23] celly: has joined #RubyOnRails
[18:32:36] elaptics: marahin: if you want a comprehensive guide to take you through concepts in a structured manner a book is probably the cheapest investment otherwise you're just going to have to google and read random, conflicting blog posts and pick things up piecemeal
[18:32:51] smathy: marahin, http://guides.rubyonrails.org/testing.html
[18:32:53] lacrymology: lemme just testthen
[18:33:55] zanzarel: has joined #RubyOnRails
[18:35:24] elaptics: marahin: to resolve your issue though, I think you'll just want to define a new migration that drops the bad column, - use remove_column for that and then just add the new column the way it was supposed to be defined. Your down should just raise an irreversible migration because it would be daft to try and put back a bad column so you don't want to be able to reverse it
[18:35:27] bronson: has joined #RubyOnRails
[18:36:22] marahin: elaptics, OK, thank you very much for your time and advices!
[18:36:56] edwinvdgraaf: has joined #RubyOnRails
[18:36:57] chrislotix: has joined #RubyOnRails
[18:38:45] joshkovach: has joined #RubyOnRails
[18:39:01] bmalum: has joined #RubyOnRails
[18:39:18] [Butch]: has joined #RubyOnRails
[18:39:50] nfk|laptop: has joined #RubyOnRails
[18:40:28] StevenXL: how can i test if jquery ui is included on a page?
[18:41:47] edwinvdgraaf: has joined #RubyOnRails
[18:42:04] arBmind: has joined #RubyOnRails
[18:42:25] smathy: stevenxl, look at the source.
[18:43:23] Hans267: has joined #RubyOnRails
[18:44:13] Pazician: has joined #RubyOnRails
[18:46:19] idefine_: has joined #RubyOnRails
[18:47:14] pawnbox_: has joined #RubyOnRails
[18:47:52] tsmango: has joined #RubyOnRails
[18:48:27] chrislotix: Is join table best for storing records (which shouldn't be changed) which you can later use to select from? EG: Choice of same classes for students and teachers?
[18:48:37] alfie_max15: has joined #RubyOnRails
[18:50:59] smathy: chrislotix, "a join table" tends to mean a table used to join two other tables in a many:many.
[18:51:38] axl__: has joined #RubyOnRails
[18:52:31] chrislotix: smathy: student has_many classes, teacher has_many classes, i want both of them to be able to choose classes from prepopulated table (join table?)
[18:53:37] smathy: No, not a lookup table.
[18:53:48] smathy: I mean, not a join table, it's more often referred to as a lookup table.
[18:54:08] smathy: ...or something else which I can't remember.
[18:54:41] smathy: chrislotix, but maybe you want a join table between students/teachers and this lookup table.
[18:54:49] elaptics: chrislotix: when you say "classes" as the join table you mean this is the table you're storing the course (or other term) that a student could take and a teacher could teach?
[18:54:59] smathy: chrislotix, and that join table will have a polymorphic association to students and teachers.
[18:55:20] chrislotix: elaptics: exactly that yes
[18:55:32] elaptics: chrislotix: so is courses your lookup table?
[18:56:37] treehug88: has joined #RubyOnRails
[18:57:04] chrislotix: elaptics: i'm not exactly sure what a lookup table is, but if its the same as join table as smathy mentioned then yes i think
[18:57:28] smathy: ACTION didn't mention that they were the same at all
[18:57:49] elaptics: chrislotix: let's start again. We got that you have teachers and students. What is the term you're using for a specific thing that a student can take and a teacher can teach?
[18:58:11] chrislotix: elaptics: courses
[18:58:12] alphaatom: has joined #RubyOnRails
[18:58:56] elaptics: chrislotix: right, so you have a courses table that has rows pertaining to e.g. the subject matter?
[18:59:16] elaptics: e.g. history, geography, english, maths, science
[18:59:28] chrislotix: elaptics: exactly that yes
[18:59:31] manfrin: has joined #RubyOnRails
[18:59:36] elaptics: so as a student I could take a course in history and science and they would be my classes?
[18:59:57] elaptics: and similarly for a teacher they could teach those two courses and that would be their classes?
[19:00:07] chrislotix: elaptics: you got it all right yes
[19:00:29] chrislotix: elaptics: i'm reading on the best approach to do this sort of thing and i'm unsure what's the best way to go about it
[19:00:32] elaptics: ok, so the terminology that smathy and I are talking about is that courses is your lookup table
[19:01:26] elaptics: chrislotix: you then want a classes "join" table which is polymorphic so that you can join both teachers and students to those courses
[19:01:27] alphaatom: has joined #RubyOnRails
[19:01:41] elaptics: your only real problem here is the word Class
[19:02:00] shanemcd: has joined #RubyOnRails
[19:02:25] flashpoint9: has joined #RubyOnRails
[19:02:39] chrislotix: elaptics: I understand it might cause some issues, i will go with "Subjects"
[19:03:01] elaptics: chrislotix: ok, so you want to look into has_many :through associations
[19:04:00] elaptics: because you'll want something like students to has_many :subjects and has_many :courses through: :subjects
[19:04:04] shibabu: has joined #RubyOnRails
[19:04:46] elaptics: chrislotix: the guides should help you understand better http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association
[19:05:27] chrislotix: elaptics: Just to make sure i understand it a bit better, do i need a seperate model which will hold id references to both, students and teachers?
[19:05:29] elaptics: chrislotix: you'll also want to look at polymorphic associations so that both students and teachers can have the same things http://guides.rubyonrails.org/association_basics.html#polymorphic-associations
[19:06:10] elaptics: chrislotix: you need a separate model which has a belongs_to reference to a course and then a polymorphic one for the student/teacher
[19:06:51] chrislotix: elaptics: okay then i think i'm beginning to grasp it, i will take a look at the guides
[19:07:00] elaptics: chrislotix: having an actual model for this means that you can put specific behaviours into it as necessary
[19:08:07] chrislotix: elaptics: follow up question, if i had to enforce limitations for students and teachers to have only one subject, in which model/s would i do that?
[19:08:51] hardtail: has joined #RubyOnRails
[19:11:22] elaptics: chrislotix: you mean so they could only sign up to a given course once? e.g. if they've signed up to the history course, they can't sign up to it again?
[19:11:37] Frem: has joined #RubyOnRails
[19:11:51] chrislotix: elaptics: exactly that yes
[19:12:42] akshat: has joined #RubyOnRails
[19:12:52] nettoweb: has joined #RubyOnRails
[19:12:56] elaptics: the rails-y way would be to add uniqueness validation scopes to the subject model (and I'd put them in the db too with unique indexes)
[19:13:04] SteenJobs: has joined #RubyOnRails
[19:14:59] chrislotix: elaptics: gotcha, you've been a great help, thank you
[19:15:31] greg: has joined #RubyOnRails
[19:20:55] snowdrift: has joined #RubyOnRails
[19:22:05] diego2: has joined #RubyOnRails
[19:22:29] momomomomo: has joined #RubyOnRails
[19:24:32] diego3: has joined #RubyOnRails
[19:24:52] brupm: has joined #RubyOnRails
[19:24:56] twilling: has joined #RubyOnRails
[19:25:53] tildes: has joined #RubyOnRails
[19:26:00] flashpoint9: If I have 2 models with amount fields and I want to do some calculations with those numbers and display that on the home page of my app where should the logic for that go?
[19:30:15] doodlehaus: has joined #RubyOnRails
[19:30:19] DavidDudson: has joined #RubyOnRails
[19:30:36] rgtk: has joined #RubyOnRails
[19:31:35] brandtam: has joined #RubyOnRails
[19:32:48] JakFrist: has joined #RubyOnRails
[19:35:25] axl_: has joined #RubyOnRails
[19:36:05] rgtk: has joined #RubyOnRails
[19:36:27] ur5us: has joined #RubyOnRails
[19:37:37] twilling: flashpoint9: did you ever get the answer
[19:38:36] nettoweb: has joined #RubyOnRails
[19:39:57] nertzy: has joined #RubyOnRails
[19:42:17] banister: has joined #RubyOnRails
[19:46:23] flashpoint9: has joined #RubyOnRails
[19:46:51] PedramT: has joined #RubyOnRails
[19:49:02] ramortegui: has joined #RubyOnRails
[19:49:02] bphogan_: has left #RubyOnRails: ()
[19:51:19] Synthead: has joined #RubyOnRails
[19:53:08] manfrin_: has joined #RubyOnRails
[19:54:10] yfeldblum: has joined #RubyOnRails
[19:55:53] The_Kingdutch: has left #RubyOnRails: ()
[19:56:20] nettoweb: has joined #RubyOnRails
[19:56:58] fox_mulder_cp: has joined #RubyOnRails
[19:57:04] ElFerna: has joined #RubyOnRails
[19:57:25] nfk|laptop: has joined #RubyOnRails
[19:57:34] Palsson: has joined #RubyOnRails
[19:57:45] smathy: flashpoint9, can just make a service object to handle that.
[20:01:33] flashpoint9: smathy: ok thanks
[20:01:58] alphaatom: has joined #RubyOnRails
[20:03:37] RegulationD: has joined #RubyOnRails
[20:05:29] nocd: has joined #RubyOnRails
[20:06:09] shibabu: has joined #RubyOnRails
[20:06:28] benhuda: has joined #RubyOnRails
[20:06:32] mrbubbles: has joined #RubyOnRails
[20:08:06] snguyen: has joined #RubyOnRails
[20:08:13] blackmesa: has joined #RubyOnRails
[20:09:35] pawnbox: has joined #RubyOnRails
[20:10:53] momomomomo: has joined #RubyOnRails
[20:10:54] pawnbox: has joined #RubyOnRails
[20:12:06] kramsee: has joined #RubyOnRails
[20:13:45] twilling: has joined #RubyOnRails
[20:14:51] ferr: has joined #RubyOnRails
[20:18:15] Pupeno: has joined #RubyOnRails
[20:18:15] Pupeno: has joined #RubyOnRails
[20:20:12] tuelz: has joined #RubyOnRails
[20:20:16] kramsee: has joined #RubyOnRails
[20:20:31] celly: has joined #RubyOnRails
[20:23:08] rickmasta: has joined #RubyOnRails
[20:23:19] kramsee: has joined #RubyOnRails
[20:24:06] djbkd: has joined #RubyOnRails
[20:25:12] kramsee: has joined #RubyOnRails
[20:26:08] kramsee: has left #RubyOnRails: ()
[20:28:24] flashpoint9: if i have a model and I have 2 fields, field 1 takes user input and then from that I make calculations and input a value into field 2, I think I should place the logic in the model file. Is that correct?
[20:29:39] futilegames: has joined #RubyOnRails
[20:30:26] FailBit: https://www.youtube.com/watch?v=lXMskKTw3Bc
[20:31:01] jgpawletko: has left #RubyOnRails: ()
[20:32:14] safety_cut: has joined #RubyOnRails
[20:32:49] momomomomo: has joined #RubyOnRails
[20:33:53] safety_c_: has joined #RubyOnRails
[20:34:05] flashpoint9: FailBit: eat glass
[20:35:18] safetypin: has joined #RubyOnRails
[20:38:30] rgtk: has joined #RubyOnRails
[20:39:03] Mazhug: has joined #RubyOnRails
[20:40:02] nfk|laptop: has joined #RubyOnRails
[20:40:32] rgtk: has joined #RubyOnRails
[20:41:11] stel_ro: has joined #RubyOnRails
[20:41:34] uranther: has joined #RubyOnRails
[20:43:14] jessemcgilallen: has joined #RubyOnRails
[20:43:57] build22: has joined #RubyOnRails
[20:44:29] _Tariq: has joined #RubyOnRails
[20:46:01] edwinvdgraaf: has joined #RubyOnRails
[20:46:54] Radar: GOOD MORNING
[20:47:28] Radar: flashpoint9: yup, the model is fine for that
[20:47:31] idefine_: has joined #RubyOnRails
[20:47:47] flashpoint9: Radar: morning, cool, thats what i thought, thanks
[20:50:35] Oliphaunte: has joined #RubyOnRails
[20:51:20] maxx88: has joined #RubyOnRails
[20:52:02] Pazician: has joined #RubyOnRails
[20:52:06] teamcoltra: has joined #RubyOnRails
[20:52:55] syzygy_: has joined #RubyOnRails
[20:53:47] pawnbox: has joined #RubyOnRails
[20:55:19] zanzarel: has joined #RubyOnRails
[20:55:23] fwaokda: I'm using ransack and i'm doing the advanced option where I select an attribute and then provide the value to search on. I want to have only certain options available for the user inputted values depending on the attribute selected. Anyone know of a good way to do this? I was going to use jquery to see when the value has been change but the generated attribute select box has a random identifier it assigns
[20:55:48] teamcoltra: Can anyone give me some advice on this error ? It started popping up last night but on every book page... I looked up "WRONGTYPE Operation against a key holding the wrong kind of value" and I did't understand the problem. I don't know if this is more for #redis or not but thought I would ask here first
[20:55:51] nocd: has joined #RubyOnRails
[20:59:03] jgpawletko: has joined #RubyOnRails
[20:59:14] AndroidLoverInSF: has joined #RubyOnRails
[20:59:50] Oliphaunte: has joined #RubyOnRails
[20:59:58] Radar: teamcoltra: !ncnh
[20:59:58] helpa: teamcoltra: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[21:00:30] Radar: teamcoltra: It'd be helpful to know the value that Redis has stored and what operation it's trying to run on it as well.
[21:01:00] Radar: looks like the predictor code might be too hard for me this early in the morning
[21:01:04] Radar: the kinda thing I would charge for typically
[21:02:27] teamcoltra: Radar the code that was raising the issue was in the link so I figured if you needed something else someone would ask (since I am lost to the point I have no idea what someone might need). It's weird though because that code doesn't update anything it just selects it, so I feel like that should be an easier operation
[21:02:42] Radar: teamcoltra: !rule3
[21:02:42] helpa: teamcoltra: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[21:02:55] teamcoltra: (and again it was working before which is the kind of problem that always bugs me the most)
[21:02:58] Radar: teamcoltra: Code goes into a Gist. While I can see _some_ of the code in the link, I can't see all of it.
[21:03:00] teamcoltra: Thanks Radar
[21:04:43] manfrin: has joined #RubyOnRails
[21:04:43] edwinvdgraaf: has joined #RubyOnRails
[21:05:23] edwinvdgraaf: has joined #RubyOnRails
[21:05:45] build22: has joined #RubyOnRails
[21:06:00] doctorly: has joined #RubyOnRails
[21:06:07] momomomomo: has joined #RubyOnRails
[21:06:15] StevenXL: has joined #RubyOnRails
[21:06:15] StevenXL: has joined #RubyOnRails
[21:07:20] djbkd: has joined #RubyOnRails
[21:09:33] Synthead: is there a way I can put model concerns into namespaces?
[21:09:45] shanemcd: has joined #RubyOnRails
[21:10:18] srinidhi: has joined #RubyOnRails
[21:11:04] StevenXL: Hi everyone. I was wondering if someone can help me figure out how to over-ride the action and controller a form is posting to
[21:11:43] StevenXL: I know that this is a code smell, but I'm generating a form in a modal. The actual page is /events/new and in it, if the folks can't find a location, they can create a new on by clicking on the link.
[21:12:22] teamcoltra: Radar I think this might be a redis issue, since redis is giving me the same information when I am just trying to access it from the console. I appreciate links on how to properly ask a question I will certainly do that next time
[21:12:48] Radar: teamcoltra: thank you
[21:13:23] netzfisch: has joined #RubyOnRails
[21:14:23] Synthead: stevenxl: where are you trying to get it to go instead?
[21:14:28] Synthead: stevenxl: to another controller?
[21:15:15] StevenXL: Synthead: Right now it is going to "/events", since the model is being generated on the /events/new page, I can see where it is getting that. But what I really need it to do is to post to /locations, since the model is a form for creating a new location.
[21:15:40] Synthead: stevenxl: is /locations a route for another controller?
[21:15:43] StevenXL: I know that I'm passing in teh @location variable correctly, because in teh modal, I use <%= @location %> to "debug"
[21:16:00] Synthead: stevenxl: are you trying to get it to go to /locations (by itself), or /locations/new, etc.
[21:16:35] snguyen: has joined #RubyOnRails
[21:17:04] StevenXL: I want it to use the Locations controller and the create action. I thought that if I posted to /locations, the method + location would result in the Location#create action.
[21:17:33] tubbo: hey folks, i'm looking for some advice on how i should be handling assets on heroku
[21:18:01] tubbo: sorry not assets, file uploads
[21:18:23] Synthead: stevenxl: is the data going to populate a model?
[21:18:39] edwinvdgraaf: has joined #RubyOnRails
[21:18:43] tubbo: i'm using Refile with the Refile::S3 plugin, and it should be sending stuff to amazon S3 and since my cloudfront CDN is originating from my S3 bucket (as well as my app's /assets dir), I should see the uploads after i upload them right
[21:19:03] tubbo: because cloudfront is giving me a long URL and an access denied response when i go to it
[21:19:11] tubbo: doesn't seem to be an image file that it's pointing to either...
[21:19:49] owenjones: has joined #RubyOnRails
[21:20:01] Synthead: stevenxl: this might help: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_for
[21:20:32] sandstrom: has joined #RubyOnRails
[21:20:34] StevenXL: Synthead: Yea the data is going to be used to create a new location. i.e., the create action has @location = Location.new(location_params)
[21:20:38] nertzy: has joined #RubyOnRails
[21:20:47] Synthead: stevenxl: in those options, you can specify the url as just {url: your_url, other_option: ...}
[21:22:02] Synthead: stevenxl: also, rails is going to bring some JS to that form, so if you plan to use AJAX, also include "remote: true" in the options
[21:22:20] Synthead: stevenxl: it'll help you manage the CSRF tokens, etc
[21:22:22] StevenXL: Synthead: thanks I've done the remote: true part.
[21:22:42] fryguy: is rubygems down for anybody else? trying to install a specific version of a gem?
[21:22:44] StevenXL: I'm looking at the form contained within the model
[21:23:10] StevenXL: It generates the correct information - i.e., action="/locations", method="post", so I'm not sure why it's not working.
[21:23:18] rickmasta: has joined #RubyOnRails
[21:23:19] Oliphaunte: has joined #RubyOnRails
[21:23:26] Synthead: stevenxl: got any errors or anything?
[21:23:46] StevenXL: The error I get from simple form is: undefined method `model_name' for nil:NilClass
[21:24:06] Synthead: stevenxl: also, you might want to use .on("ajax:success", function(...) {...}) for that form too (rails stuff)
[21:24:24] Synthead: stevenxl: are you familiar with pry?
[21:24:35] StevenXL: And, on that page, the request params shows that it is going to the wrong action despite the form being created correctly
[21:24:40] StevenXL: "commit"=>"Create Location", "controller"=>"events", "action"=>"create"}
[21:24:45] Synthead: stevenxl: https://github.com/rails/jquery-ujs/wiki/ajax
[21:24:56] StevenXL: As you can see, I was expecting the controller to be locations and the action to be create.
[21:26:01] Synthead: stevenxl: you might be able to pass controller: :locations in your options
[21:26:30] Synthead: well, maybe not
[21:27:50] Synthead: stevenxl: I think you can do url: url_for(controller: :locations, action: :create), though: http://apidock.com/rails/ActionView/RoutingUrlFor/url_for
[21:28:12] Synthead: pass {url: url_for(...)} in the form_for options
[21:28:39] StevenXL: Synthead: thanks, I'll try that.
[21:28:49] StevenXL: I'm wondering why this says that the @location instance variable is nil
[21:28:49] Synthead: stevenxl: it's really good practice to stick to controllers and actions, etc. if you can. direct links are like static variables and can end up biting you ;)
[21:28:58] Synthead: stevenxl: are you familiar with pry?
[21:29:07] bmalum: has joined #RubyOnRails
[21:29:25] StevenXL: Synthead: I am. But this is a legacy app. Whatever they are using has a live shell whenever it runs into an error with a lot of dbeug information
[21:29:31] StevenXL: Which is what's got me scratching my head.
[21:29:51] Synthead: stevenxl: you should be able to supersede that with pry
[21:29:53] StevenXL: if, in the _form I output <%= @location %>, I get the memory location of @location, that's all good.
[21:29:59] Synthead: stevenxl: are you running a local instance?
[21:30:10] StevenXL: Synthead: yea
[21:30:55] Synthead: stevenxl: pop gem "pry" in the Gemfile, run bundle, then put "require 'pry'; binding.pry" in a place you're curious about
[21:31:14] Synthead: stevenxl: then take a scientific look at all the variables flying around without having all those silly print statements ;)
[21:31:32] StevenXL: I'm rendering the modal within the /events/new page. And in the Events#new controller, I set the @location variable. So I am guessing it should be available when I call <%= render "locations/form" %>
[21:32:07] Synthead: stevenxl: you can put binding.pry into erb files, too: <% require "pry"; binding.pry %>
[21:32:16] zpe: has joined #RubyOnRails
[21:32:33] Synthead: stevenxl: this is all assuming that you want to debug with this approach; it's something I'm acquainted to so I'm biased
[21:32:53] StevenXL: Synthead: Yes I will do taht.
[21:33:12] StevenXL: In fact, I'm going to do that in the Events#create. First, I want to make sure that that is where stuff is actually being posted. The server logs seem to suggest so.
[21:33:23] pawnbox: has joined #RubyOnRails
[21:33:25] Synthead: stevenxl: there you go :)
[21:33:45] atomical: has joined #RubyOnRails
[21:37:40] StevenXL: Yea - so for whatever reason, the modal, despite it being a form to create a location, is being processed by Events#create.
[21:38:24] StevenXL: so now I'm going to to check the @location variable
[21:38:43] dllama: has left #RubyOnRails: ()
[21:41:15] moeabdol1: has joined #RubyOnRails
[21:41:40] flashpoint9: my delete links for objects stopped working when i checked "dont open this dialog again", they dont even delete anymore. http://paste.ofcode.org/N9xxWxAhdmh266kC59Xvif
[21:42:21] Synthead: stevenxl: great work :)
[21:42:22] StevenXL: Synthead: when the location partial is being rendered (app/views/locations/_form.html.erb), the @location instance variable, which empty (simply Location.new), is set.
[21:42:50] StevenXL: So since I'm passing that variable to simple_form, I'm a bit confused as to why it keeps posting to the Events controller.
[21:44:37] yfeldblum: has joined #RubyOnRails
[21:44:52] Synthead: stevenxl: sounds like you're working down the rabbit hole there :) I am not sure what your app looks like so I can't say. If you figure out a weird one, might make a paste with the unrelated and confidential stuff ripped out ;)
[21:45:34] defsdoor: has joined #RubyOnRails
[21:47:14] threeminutemonta: has joined #RubyOnRails
[21:47:48] doctorly: I followed everyone's advice yesterday, and I have been making progress on my resume. If anyone could give me advice, that would be appreciated! https://gist.github.com/brendenyule/990196c35c4ad56fc44b
[21:49:14] Oliphaunte: has joined #RubyOnRails
[21:49:28] Cervajz_: has joined #RubyOnRails
[21:50:25] boboc: has joined #RubyOnRails
[21:50:49] _Tariq: has joined #RubyOnRails
[21:50:49] Radar: Don't have 10 years experience with Rails? bye
[21:50:50] Radar: :trollface:
[21:51:07] Radar: doctorly: backend + frontend are usually conjoined.
[21:51:23] doctorly: Radar: Should I just put rails development?
[21:51:50] doctorly: Radar: I'm sure some of the things I am saying sound awkward to an experienced dev too, that is something I am worried about
[21:51:59] Radar: doctorly: Something like working to accomplish goals using my skills in Ruby, Rails, HTML, CSS and JavaScript.
[21:52:05] Radar: https://gist.github.com/brendenyule/990196c35c4ad56fc44b#file-resume-first-draft-L24-L36
[21:52:09] Radar: These are too specific
[21:52:15] lacrymology: has joined #RubyOnRails
[21:52:30] Radar: https://gist.github.com/brendenyule/990196c35c4ad56fc44b#file-resume-first-draft-L46-L47
[21:52:35] Radar: Seems like a rehash of the first point
[21:52:42] sepandb: has joined #RubyOnRails
[21:52:47] doctorly: Radar: a lot of the advice I was getting, was to be more specific about what I did.
[21:52:47] sepandb: has left #RubyOnRails: ()
[21:53:01] doctorly: I will go through and try to make sure I'm not repeating myself.
[21:53:07] Radar: "I have Rails experience" and then "I can generate partials!"
[21:53:13] Radar: Former proves the latter.
[21:53:13] |PiP|: has joined #RubyOnRails
[21:53:21] Radar: https://gist.github.com/brendenyule/990196c35c4ad56fc44b#file-resume-first-draft-L49-L50 I'd expect the Pry thing to be a given. Regression tests are already mentioned in 41.
[21:53:43] Radar: doctorly: Remove jQuery + AJAX from your resume.
[21:53:49] Radar: doctorly: Brush up on your ES6 and React knowledge.
[21:53:55] Radar: Remove GitHub too.
[21:54:00] Radar: Aqmnd Pry.
[21:54:00] |PiP|: How can I retrieve the last 25 Distinct value of a property of an ActiveRecord class, ordered by created_at using postgresql?
[21:54:23] doctorly: Radar: How come I should remove jQuery + AJAX?
[21:54:30] Oliphaunte: has joined #RubyOnRails
[21:54:36] Radar: doctorly: This is no longer 2009, where those technologies were popular.
[21:55:13] ruurd: |PiP| order upside down, use limit
[21:55:24] doctorly: Radar: Do you mean remove them from my skills and experience?
[21:55:49] Radar: doctorly: JavaScript experience means, to me at least, that you have jQuery and AJAX experience. It's effectively mentioning the same thing three times.
[21:55:50] Synthead: is there a way I can have a model "remember" the .includes() that were previously ran on it? I want to add a model concern that "recycles" .includes() from a past statement
[21:56:16] |PiP|: ruurd: yes, but i want 25 records that have a uniq value for a specific column, not just the last 25
[21:56:26] Radar: Synthead: example code please
[21:56:31] doctorly: Radar: By that I mean, should I keep line 24
[21:56:40] Synthead: the best way I've found to do this is to just have a generic method that takes the model as a parameter (with the .includes() taken care of), but that feels hacky
[21:56:54] tectonic: has joined #RubyOnRails
[21:56:56] Radar: doctorly: imo it's too specific. I don't think employers want that kind of specificity.
[21:57:07] ruurd: select unique(whatever) order upside down limit 25?
[21:57:25] doctorly: Radar: I was thinking that, but I was actually getting the exact opposite opinions from multiple people yesterday
[21:57:39] doctorly: Radar: So now I am confused
[21:57:44] Radar: doctorly: and now you're getting more opinions
[21:57:50] Radar: doctorly: the thing with opinions is that everyone has different ones.
[21:58:12] ferr: has joined #RubyOnRails
[21:58:35] Radar: of course, only mine are correct
[21:58:40] doctorly: Radar: Yeah, I am not shrugging any of them away, I am just saying that I am more conflicted now haha. I think your advice is probably good advice though
[21:58:53] doctorly: Radar: because you are well known-ish
[21:59:04] Radar: so are the other people ;)
[21:59:40] doctorly: Radar: would you suggest a style closer to this: http://insights.dice.com/2013/05/03/sample-resume-ruby-on-rails-developer/
[21:59:46] JakFrist: has joined #RubyOnRails
[21:59:48] _Tariq: has joined #RubyOnRails
[21:59:53] cassioscabral: has joined #RubyOnRails
[22:00:04] Radar: Buzzword bingo at the start instantly turns me off.
[22:00:20] LambdaSource: has joined #RubyOnRails
[22:00:21] doctorly: But the way experience is worded
[22:00:34] Radar: Yes, that's much better.
[22:00:53] doctorly: Radar: alright, I will go more in that direction
[22:01:08] doctorly: Radar: and try again lmao
[22:02:22] claytonzaugg: has joined #RubyOnRails
[22:02:55] nertzy: has joined #RubyOnRails
[22:03:42] pawnbox: has joined #RubyOnRails
[22:06:17] kadoppe: has joined #RubyOnRails
[22:07:31] sandstrom: has joined #RubyOnRails
[22:07:55] shibabu: has joined #RubyOnRails
[22:08:11] moei: has joined #RubyOnRails
[22:08:36] moei: has joined #RubyOnRails
[22:08:44] celly: has joined #RubyOnRails
[22:10:24] neanderslob: has joined #RubyOnRails
[22:11:02] grn: has joined #RubyOnRails
[22:12:13] nettoweb: has joined #RubyOnRails
[22:12:53] insu: has joined #RubyOnRails
[22:17:46] _Tariq: has joined #RubyOnRails
[22:18:13] bmalum: has joined #RubyOnRails
[22:21:43] twilling: has joined #RubyOnRails
[22:22:28] flashpoint9: I want to have some logic in a helper but I am having problems getting the correct value to return, it should inject a variable into a string but its not working http://paste.ofcode.org/ytnGNdqBdscnNev8exemVn
[22:23:02] flashpoint9: #{calculated_budget} is rendering literally as '#{calculated_budget}'
[22:23:21] rhizome: use @calculated_budget
[22:23:31] rhizome: and double quotes
[22:23:54] slash_join: single quotes don't do interpolation flashpoint9
[22:24:57] Spami: has joined #RubyOnRails
[22:25:04] flashpoint9: rhizome: that doesnt work
[22:25:21] flashpoint9: @calculated_budget = "<span class='green'>@calculated_budget</span>" spits out @calculated_budget
[22:25:56] slash_join: flashpoint9: yeah, you're problem is an html_safe problem
[22:26:05] doctorly: radar: How do you feel about this? https://gist.github.com/brendenyule/38d38d9f72443e281acc
[22:26:31] quazimodo: has joined #RubyOnRails
[22:27:23] lacrymology: how can I change a Time object to a given timezone?
[22:27:28] slash_join: flashpoint9: imagine you have a blog post app with comments... and a user comments with <script type='text/javascript'>[[[NEFARIOUS_STUFF_HERE]]]</script>... and then say your app renders that comment. You'd hope it doesn't render the script, right?
[22:27:45] flashpoint9: slash_join: yea
[22:28:03] rhizome: flashpoint9: "...#{@cal_bu}..."
[22:28:06] flashpoint9: i wanted to avoid any logic in the view but this actually looks like a valid reason
[22:28:30] lacrymology: If it's any difference, specifically I want the generated json to have the right offset
[22:28:46] flashpoint9: rhizome: that worked thanks!
[22:29:11] rhizome: how do i do a thumbs up emoticon
[22:29:54] Radar: doctorly: Taking a look
[22:30:16] twilling: has joined #RubyOnRails
[22:30:56] _Tariq: has joined #RubyOnRails
[22:31:34] jessemcgilallen: has joined #RubyOnRails
[22:31:35] doctorly: Radar: ah actually need to take out the github bit too
[22:32:21] doctorly: Radar: alright, removed the bits I forgot to.
[22:32:42] _Tariq: has joined #RubyOnRails
[22:33:37] pawnbox: has joined #RubyOnRails
[22:34:10] dopie: well i asked this in vim and tmux and got no reply
[22:34:55] Radar: dopie: please try asking it in #mysql
[22:34:56] alphaatom: has joined #RubyOnRails
[22:35:09] dopie: yeah i tried that
[22:36:48] arBmind: has joined #RubyOnRails
[22:36:57] Coldblackice: has joined #RubyOnRails
[22:37:36] bshelton229: has joined #RubyOnRails
[22:38:31] Oliphaunte: has joined #RubyOnRails
[22:39:28] Radar: doctorly: got caught up reviewing a PR from a colleague now looking.
[22:39:52] _Tariq: has joined #RubyOnRails
[22:39:53] Radar: " Ruby on Rails application components." <- This means something very specific to someone who has been around in Rails as long as I have ;)
[22:40:06] Radar: Components were the precursors to engines. Components never really took off and were abandoned in Rails 2.
[22:40:24] Radar: doctorly: https://gist.github.com/brendenyule/38d38d9f72443e281acc#file-gistfile1-txt-L17-L19 Does this mean that you only ever talk once a week?
[22:40:25] bshelton229: has left #RubyOnRails: ()
[22:40:43] Radar: https://gist.github.com/brendenyule/38d38d9f72443e281acc#file-gistfile1-txt-L24-L25 should be removed. I still don't think it adds anything.
[22:41:51] Radar: The point above it could be expanded to mention that you have experience pairing JavaScript with Rails code.
[22:42:08] Radar: https://gist.github.com/brendenyule/38d38d9f72443e281acc#file-gistfile1-txt-L27-L29 I feel like Sass or CSS needs a mention here.
[22:42:21] Radar: https://gist.github.com/brendenyule/38d38d9f72443e281acc#file-gistfile1-txt-L36-L37 Merge this into the original point.
[22:43:03] Oliphaunte: has joined #RubyOnRails
[22:43:34] doctorly: Radar: merge my education into work?
[22:43:45] Radar: Oh you've edited it.
[22:43:58] Radar: It was the "working through weekly tasks" thing
[22:44:12] Radar: The last point sounded a lot like the first point.
[22:44:19] doctorly: Radar: Oh yeah, I mentioned that earlier sorry
[22:44:27] doctorly: Radar: that I edited it I mean
[22:45:09] doctorly: Radar: Is there anything I should mention that I haven't? I am confused on which information to include
[22:45:21] doctorly: Radar: It seems like most of the stuff should be implied
[22:45:42] Radar: https://gist.github.com/brendenyule/38d38d9f72443e281acc#file-gistfile1-txt-L17-L19 Perhaps mention here that you work through those objectives in an effective and collaborative manner.
[22:45:56] Radar: Merge "Designing and implmeneting" with "Implementing an asyncronous"
[22:46:13] doctorly: Oh yeah, that makes a lot of sense
[22:47:27] doodlehaus: has joined #RubyOnRails
[22:47:40] banister: has joined #RubyOnRails
[22:48:24] doctorly: Radar: But do you think I should just drop the whole asynchronous part? Is that not relevent?
[22:48:28] johnnegron: has joined #RubyOnRails
[22:48:55] _Tariq: has joined #RubyOnRails
[22:49:12] StaticVoid: has joined #RubyOnRails
[22:49:51] zpe: has joined #RubyOnRails
[22:50:07] dopie: since their is a bunch of vim users here
[22:50:08] dopie: https://gist.github.com/staycreativedesign/bc071590a1996711a3d0
[22:50:10] dopie: any help?
[22:51:21] slash_join: no clue dopie, have you tried stack overflow?
[22:51:42] doctorly: dopie: your problem is that it doesn't keep the window open? Vim isn't meant to be used this way. Have you tried neovim yet?
[22:51:45] dopie: slash_join, yes ... I'm trying to run what they say but i guess I'm doing it wrong
[22:51:55] dopie: doctorly, ... I'm using tmux
[22:52:16] Radar: doctorly: It's implied.
[22:52:17] slash_join: dopie: well, link to your SO post... maybe someone here can explain the answer you've receieved (even though they can't answer the question itself)
[22:52:28] doctorly: dopie: then what does it have to do with vim. You didn't give enough information in your gist
[22:52:37] slash_join: receieieieieivied, i mean
[22:52:49] Radar: doctorly: might help to explain what the application was that you helped to develop
[22:53:23] doctorly: Radar: Like a small paragraph before the points? That is a solid idea
[22:53:28] Radar: doctorly: yes
[22:53:37] Radar: doctorly: exactly like what http://insights.dice.com/2013/05/03/sample-resume-ruby-on-rails-developer/ has
[22:54:12] doctorly: Radar: alright, that makes a lot of sense. Thanks for the advice
[22:54:24] doctorly: Radar: hopefully it will make a big difference
[22:58:40] doctorly: dopie: I can probably help you if you provide a clear question and objective. But you should really be asking in #tmux anyway. This question has nothing to do with rails or vim as far as I can see.
[22:58:41] atomical: has joined #RubyOnRails
[22:59:16] bphogan: has joined #RubyOnRails
[22:59:39] Radar: "I am not getting a question in #appropriate-channel, so I'm going to ask in #rubyonrails instead"
[22:59:51] Radar: - dopie's thought process
[23:00:08] dopie: pretty much
[23:00:18] dopie: as a lot of users here in this channel use tmux / vim
[23:00:21] Radar: not getting an answer
[23:00:35] _Tariq: has joined #RubyOnRails
[23:00:40] zanzarel: has joined #RubyOnRails
[23:00:40] Radar: A lot of users in this channel also eat sandwiches, but I'd consider it an offtopic thing
[23:00:54] doctorly: dopie: I don't understand what it has to do with vim though.
[23:01:20] doctorly: dopie: if you asked that question in #vim they probably didn't answer because it has nothing to do with vim lmao
[23:02:10] teamcoltra: has joined #RubyOnRails
[23:02:17] zanzarel: has left #RubyOnRails: ()
[23:02:21] _Tariq: has joined #RubyOnRails
[23:02:25] dopie: set-remain-on-exit ... except I'm not sure how to set that correctly even using the man page
[23:03:30] doctorly: dopie: That keeps the window open when you leave tmux.
[23:03:40] doctorly: dopie: still have no idea what you are trying to do.
[23:03:50] doctorly: dopie: xy problem.
[23:03:56] Radar: please take this to #ruby-offtopic
[23:04:13] SteenJobs: has joined #RubyOnRails
[23:04:17] doctorly: dopie: go to #tmux and I will help you
[23:04:38] doctorly: dopie: or one of the hundreds of active user will
[23:05:00] quazimodo: https://gist.github.com/siassaj/2f00369784575514a427
[23:06:30] quazimodo: I have this simple schema, and when creating a booking I need to ensure that a booking for a particular employee is only created if they are available at the booking's starting_at and all the way to booking starting_at + service_option duration (in minutes)
[23:06:54] rhizome: quazimodo: custom validation
[23:07:10] quazimodo: this validation's easy enough in ruby code, but i think during a validation there is the race condition, what if 2 threads are doing this same process of validating
[23:07:22] quazimodo: thinking maybe table lock?
[23:07:46] quazimodo: or shuold I forget the table lock and code up an sql constraint?
[23:07:51] ql6wlld: has joined #RubyOnRails
[23:08:09] quazimodo: it's just a little non trivial, the sql i can come up with but it'll take 3 hours
[23:08:28] Trynemjoel: has joined #RubyOnRails
[23:09:04] banister: has joined #RubyOnRails
[23:09:06] Radar: table locking would be fine imo
[23:09:21] quazimodo: so it looks to me that validations are fantastic if the validation is only concerned with the current row, the moment it involves any other rows/tables then it becomes a bit hairy
[23:09:59] quazimodo: Radar: yeah ok, i've seen the rails pessimistic locking but that looked to be row specific. I'll keep googling around,
[23:10:00] atomical: has joined #RubyOnRails
[23:10:07] Radar: ACTION whips out clue-by-four
[23:10:22] Radar: http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html
[23:10:27] Radar: Account.lock.find(10
[23:10:34] Radar: Then do your update
[23:10:37] jessemcgilallen: has joined #RubyOnRails
[23:10:41] futilegames: has joined #RubyOnRails
[23:10:42] Radar: After the update complete, it will be freed for reading.
[23:10:52] insu: has joined #RubyOnRails
[23:10:58] quazimodo: i'm not clueless
[23:11:13] quazimodo: just thought that exact examples was going to throw a lock only on row with id 10
[23:12:01] nyaa: has joined #RubyOnRails
[23:12:16] Radar: So the next connection that tries to load that record will have to wait for the lock to complete
[23:12:26] Radar: You don't need to lock the whole bookings table in this instance.
[23:12:39] Radar: Only one connection will be able to get a lock on the "accounts" table at once.
[23:14:05] quazimodo: so presuming that each process/thread is using a separate connection then this is an implied table lock, per connection
[23:14:13] Radar: row lock*
[23:14:30] Radar: if you want whole-table-locking then please use Microsoft Access
[23:14:35] Radar: I have Fun Stories(tm) about that
[23:14:53] quazimodo: I haven't used the concept before so I actually am pretty clueless
[23:15:02] Radar: [10:10:58] <quazimodo> i'm not clueless
[23:15:10] quazimodo: yeah i'm getting it now
[23:16:52] n00bDev: has joined #RubyOnRails
[23:19:36] flashpoint9: Active Record Calculations are siiiick
[23:19:49] Radar: someone call the doctor
[23:21:43] mrbubbles: has joined #RubyOnRails
[23:22:33] shanemcd: has joined #RubyOnRails
[23:26:27] n00bDev: can somoene explain to me what the path specs part in gemfile.lock does?
[23:27:09] Radar: n00bdev: !rule0
[23:27:09] helpa: n00bdev: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[23:27:12] shibly: has joined #RubyOnRails
[23:27:13] p8m: has joined #RubyOnRails
[23:27:39] Radar: shibly: Good morning.
[23:28:12] shibly: gem install rails = https://bpaste.net/show/265d9bcbff28
[23:28:16] yfeldblum: has joined #RubyOnRails
[23:28:16] shibly: got error
[23:28:31] Radar: ./home/shibly/.rvm
[23:28:33] Radar: I see your problem
[23:28:50] n00bDev: https://gist.github.com/gwong89/8d651eebc9ffd7dfed16
[23:29:29] shibly: What to do?
[23:29:35] Radar: shibly: What OS?
[23:29:39] yfeldblum: has joined #RubyOnRails
[23:29:54] Radar: shibly: !rvm
[23:29:54] helpa: shibly: Remove RVM (with 'rvm implode --force') and use chruby + ruby-install. Ubuntu guide: http://bit.ly/1mvdEuH Mac guide: http://bit.ly/1QA85bc
[23:30:04] Radar: shibly: Ubuntu guide will work for Debian too
[23:30:12] Radar: n00bdev: What's in your Gemfile?
[23:31:04] Radar: n00bdev: So it's pulling in a gem from the current directory
[23:32:43] Oliphaunte: has joined #RubyOnRails
[23:32:49] n00bDev: okay thanks
[23:33:25] shibly: What's wrong with rvm?
[23:33:49] Radar: shibly: Read the "Postscript" at the bottom of the post.
[23:33:56] guitiengo: has joined #RubyOnRails
[23:35:13] havenwood: shibly: It's over 10,000 lines of shell which is never any fun. Plenty of folk use it though.
[23:36:12] havenwood: shibly: Your gem corruption problem was probably a download error that made its way into your gem cache. You could fix it with RVM or yeah switching to a different Ruby switcher would give you fresh gems.
[23:36:17] shibly: Is it valid line? rm -rf /.rvm
[23:36:37] havenwood: shibly: Did you follow the instructions Radar gave?
[23:36:49] Radar: shibly: !rvm
[23:36:49] helpa: shibly: Remove RVM (with 'rvm implode --force') and use chruby + ruby-install. Ubuntu guide: http://bit.ly/1mvdEuH Mac guide: http://bit.ly/1QA85bc
[23:36:58] kiloreux: has joined #RubyOnRails
[23:37:04] Radar: havenwood: I've declared war on all RVM installs.
[23:37:13] Radar: Too many times have I helped newbies debug issues with their RVM installs.
[23:37:15] havenwood: Radar: haha
[23:37:15] Radar: It is not a fun process.
[23:37:26] Radar: Therefore: death to RVM. Viva la chruby+ruby-install.
[23:37:42] quazimodo: i've been slowly converting the macs in my office too
[23:37:50] Radar: This is why the RVM tip in this channel now points to uninstall instructions, rather than RVM's website.
[23:37:54] quazimodo: rvm does weird shit to ssl credentials
[23:38:33] Radar: You could've stopped at just "weird shit" and I still would be nodding vigorously.
[23:38:45] Radar: yesterday's issue was that RVM didn't install development tools for a user to install pg.
[23:38:53] Radar: Surprise surprise, ruby-install did that for the user transparently.
[23:39:27] ss_much: has joined #RubyOnRails
[23:39:30] quazimodo: i like ruby-install, although one time it did compile a weeeiiird version of ruby 2.0.0, redoing the install fixed it though
[23:40:15] quazimodo: anyway, i can'tget this lock to stop other processes from inserting bookings at the same time for the same employee & service option
[23:42:06] havenwood: reminds me that Rubinius' move to x.y versioning instead of x.y.z broke ruby-install cache branch syncing to ruby-versions - uhg
[23:42:38] havenwood: Everyone stop breaking things so the auto-updating branch can get merged!
[23:44:04] USvER: has joined #RubyOnRails
[23:44:48] shibly: Is there any problem if i install ruby from source by hand?
[23:44:50] celly: has joined #RubyOnRails
[23:45:09] Radar: shibly: It might not setup the paths correctly for you like chruby would.
[23:46:00] havenwood: shibly: And you'll need to install the dependencies yourself or your have to rebuild Ruby every time you run into something not being linked.
[23:46:22] USvER: Hi. How to make all links remote without specify remote: true for each one?
[23:46:28] havenwood: shibly: https://github.com/postmodern/chruby/wiki/Ruby
[23:49:24] shibly: Is it valid command? rm -rf /.rvm or would it be rm -rf ~/.rvm ?
[23:49:31] Radar: shibly: For the third and final time
[23:49:32] Radar: shibly: !rvm
[23:49:32] helpa: shibly: Remove RVM (with 'rvm implode --force') and use chruby + ruby-install. Ubuntu guide: http://bit.ly/1mvdEuH Mac guide: http://bit.ly/1QA85bc
[23:49:33] shibly: http://stackoverflow.com/questions/3558656/how-can-i-remove-rvm-ruby-version-manager-from-my-system
[23:49:34] havenwood: shibly: the latter
[23:49:39] Radar: shibly: The command is rvm implode --force
[23:49:42] Radar: shibly: That's now _four times_
[23:50:05] shibly: Yes, it's rvm implode ,
[23:50:14] Radar: shibly: With the --force.
[23:50:20] tildes: has joined #RubyOnRails
[23:50:22] teclator: has joined #RubyOnRails
[23:50:58] SteenJobs: has joined #RubyOnRails
[23:51:50] blackmesa: has joined #RubyOnRails
[23:51:50] snowy: has joined #RubyOnRails
[23:52:58] rails969: has joined #RubyOnRails
[23:53:05] |PiP|: has left #RubyOnRails: ()
[23:54:03] Radar: Use the --force.
[23:54:06] ElFerna: has joined #RubyOnRails
[23:57:02] crystal77: has joined #RubyOnRails