« Back to channel list

#RubyOnRails - 15 June 2016

« Back 1 day Forward 1 day »
[00:02:26] Darmani: Radar: Hey, what should I be studying to solve this problem?
[00:02:34] JakFrist: has joined #RubyOnRails
[00:02:46] Darmani: Is there like an article or a book I should be looking at?
[00:04:14] JakFrist: has joined #RubyOnRails
[00:04:34] Osmosis311: has joined #RubyOnRails
[00:08:54] dblessing: has joined #RubyOnRails
[00:09:04] jancel: has joined #RubyOnRails
[00:11:40] upsell5: has joined #RubyOnRails
[00:12:08] roamingdog: has joined #RubyOnRails
[00:14:50] dopie: has joined #RubyOnRails
[00:15:37] jancel: has joined #RubyOnRails
[00:16:48] Osmosis311: hey...anyone up for a quick question?
[00:17:46] havenwood: Osmosis311: Ask away!
[00:18:07] Darmani: Osmosis311: You should probably just ask, if anyone's around they will try to answer.
[00:18:18] Osmosis311: got it...very new to this channel :-)
[00:18:26] Osmosis311: getting an error running an rspec test
[00:18:27] ekinmur: has joined #RubyOnRails
[00:18:38] Osmosis311: undefined method `reject' for #<Publisher:0x7ba623d1>
[00:19:00] Radar: Osmosis311: !code
[00:19:00] helpa: Osmosis311: 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.
[00:19:08] Brackson: has joined #RubyOnRails
[00:19:32] Osmosis311: http://pastie.org/private/cttacu3k59keghbq40w
[00:20:09] Brackson: Hi, I want to load a javascript file that blocks adblock in my rails application. Is there any way that I can make rails randomly name the anti-adblock javascript file, so it can't be blocked by an adblock filter?
[00:20:14] diegoaguilar: has joined #RubyOnRails
[00:22:56] havenwood: brackson: You can do such a thing, but it won't be successful it'll just proliferate the arms race.
[00:24:33] Brackson: havenwood: the site is a BTC faucet, ads are necessary to be profitable :)
[00:26:07] havenwood: brackson: Have you tried making the ads unobtrusive? I'm not sure on the stats but it seems some adblockers allow ads of certain types.
[00:26:15] jancel: has joined #RubyOnRails
[00:26:58] ensyde__: has joined #RubyOnRails
[00:27:02] havenwood: I doubt you'll get clicks from those using adblockers. You might consider it a zero-profit sector.
[00:27:08] Brackson: havenwood: not many anonymous/bitcoin ad networks offer unobtrusive advertising.
[00:27:27] havenwood: brackson: Do you get paid per click or per display?
[00:27:37] Brackson: havenwood: I get paid per display
[00:27:54] rueben: has joined #RubyOnRails
[00:29:21] roamingdog: has joined #RubyOnRails
[00:30:44] Osmosis311: anyone able to help me with my error
[00:32:36] srinidhi: has joined #RubyOnRails
[00:33:11] dblessing: has joined #RubyOnRails
[00:44:13] Ropeney: has joined #RubyOnRails
[00:45:43] jstransky: has joined #RubyOnRails
[00:48:36] Osmosis311: has joined #RubyOnRails
[00:51:56] Radar: Darmani: Hi.
[00:51:59] Radar: Did you figure it out yet?
[00:52:28] Radar: Did you figure out how to get the FIRST element out of that array?
[00:52:47] qejk: has joined #RubyOnRails
[00:54:47] allcentury: has joined #RubyOnRails
[00:59:22] ElFerna: has joined #RubyOnRails
[01:00:35] Oliphaunte: has joined #RubyOnRails
[01:00:38] ekinmur: has joined #RubyOnRails
[01:01:57] jhass: I see Radar is bored :D
[01:02:16] Radar: Looking for a distraction between the meetings I have today.
[01:02:44] lightt: wow, hing sai malong pong tai. sigh.
[01:03:08] Radar: lightt: what
[01:03:23] lightt: sorry i have oriential torrets
[01:03:45] lightt: why are people mean towards ruby wow
[01:03:51] lightt: hing sigh..
[01:03:54] roamingdog: has joined #RubyOnRails
[01:03:56] ChanServ: +q *!*@unaffiliated/lightt
[01:04:05] Radar: http://logs.ryanbigg.com/p/lightt
[01:04:07] Radar: I remember you :)
[01:04:08] jhass: aw, such a good distraction!
[01:05:42] Osmosis311: has joined #RubyOnRails
[01:06:33] lightt: has left #RubyOnRails: ()
[01:06:44] norc-2: has joined #RubyOnRails
[01:08:46] rueben: has joined #RubyOnRails
[01:15:57] djj: has joined #RubyOnRails
[01:18:22] hahuang62: has joined #RubyOnRails
[01:21:29] macsteps: has joined #RubyOnRails
[01:23:41] jstransky: has joined #RubyOnRails
[01:25:56] Osmosis311: hi..anyone around who can help me with an rspec error?
[01:26:11] Radar: Osmosis311: Did you show your code?
[01:26:20] Radar: Oh yes you did, sorry I missed that earlier.
[01:26:34] Osmosis311: yep! http://pastie.org/private/cttacu3k59keghbq40w
[01:26:35] Radar: Osmosis311: What does FactoryMachinist.publisher(id: 1, name: 'my pub', publisher_type: 'MY_PUB') return?
[01:26:40] Radar: Is that a hash?
[01:26:56] Osmosis311: not exactly sure, i can check now, i was assuming it was a mock of a new object
[01:27:14] Osmosis311: but i guess, now that im thinking about it, i can just really create an object, i don't need factorymachinist to do it for me....
[01:27:20] Osmosis311: (a real object in the db)
[01:27:49] Radar: Osmosis311: I think the issue might be that you're passing a Publisher object through to Publisher.create
[01:28:06] sevenseacat: has joined #RubyOnRails
[01:28:12] elton: has joined #RubyOnRails
[01:28:18] Osmosis311: right, so either, do FactoryMachinist, or, Publisher.create
[01:28:22] Radar: I think so.
[01:28:28] Osmosis311: gotcha...ok thanks trying that now
[01:31:25] dblessing: has joined #RubyOnRails
[01:32:21] wd40s: has joined #RubyOnRails
[01:32:23] wd40s_: has joined #RubyOnRails
[01:36:34] wethu: has joined #RubyOnRails
[01:40:39] Jasaka: has joined #RubyOnRails
[01:43:35] Dios: has joined #RubyOnRails
[01:43:56] jancel: has joined #RubyOnRails
[01:44:42] jstransky: has joined #RubyOnRails
[01:50:14] safetypin: has joined #RubyOnRails
[01:50:36] jord-n: has joined #RubyOnRails
[01:51:02] jord-n: has joined #RubyOnRails
[01:53:35] jstransky: has joined #RubyOnRails
[01:53:46] jord-n: has joined #RubyOnRails
[01:54:17] haaj: has joined #RubyOnRails
[01:56:58] blackmesa: has joined #RubyOnRails
[02:00:40] jhack: has joined #RubyOnRails
[02:01:42] jstransky: has joined #RubyOnRails
[02:05:21] srinidhi: has joined #RubyOnRails
[02:06:17] tgeeky: has joined #RubyOnRails
[02:09:15] Osmosis311: has joined #RubyOnRails
[02:12:07] dblessing: has joined #RubyOnRails
[02:12:12] wilsonc91: has joined #RubyOnRails
[02:15:05] tjbiddle: has joined #RubyOnRails
[02:17:14] rafaelfranca: has joined #RubyOnRails
[02:23:25] nettoweb: has joined #RubyOnRails
[02:23:46] jstransky: has joined #RubyOnRails
[02:27:57] ketherah: has joined #RubyOnRails
[02:28:20] DoctorMonocular: has joined #RubyOnRails
[02:29:18] ebbflowgo: has joined #RubyOnRails
[02:30:41] rubyonrails113: has joined #RubyOnRails
[02:31:52] quazimodo: has joined #RubyOnRails
[02:33:14] dblessing: has joined #RubyOnRails
[02:33:35] flashpoi_: has joined #RubyOnRails
[02:41:55] Osmosis311: has joined #RubyOnRails
[02:42:27] confounds: has joined #RubyOnRails
[02:43:02] binaryplease1: has joined #RubyOnRails
[02:43:22] aagp: has joined #RubyOnRails
[02:46:02] aagp: hi, did someone have implement onfleet api under ruby on rails application?
[02:52:32] jenrzzz: has joined #RubyOnRails
[02:52:32] jenrzzz: has joined #RubyOnRails
[02:53:38] jstransky: has joined #RubyOnRails
[02:54:14] flashpoint9: has joined #RubyOnRails
[02:54:52] rubyonrails113: has left #RubyOnRails: ()
[02:55:45] aagp: need some help, im trying to consume or make calls to an api from my rubyonrails app, can someone help me out to figure it out how to start?
[02:56:03] haaj: has joined #RubyOnRails
[02:59:34] blackmesa: has joined #RubyOnRails
[03:00:15] Rodya_: has joined #RubyOnRails
[03:10:31] blindMoe: has joined #RubyOnRails
[03:11:54] DoctorMonocular: has joined #RubyOnRails
[03:18:53] wd40s: has joined #RubyOnRails
[03:19:08] hahuang62: has joined #RubyOnRails
[03:19:24] justrohu: has joined #RubyOnRails
[03:19:58] DoctorMonocular: has joined #RubyOnRails
[03:20:54] k3rn31: has joined #RubyOnRails
[03:22:09] jhack: has joined #RubyOnRails
[03:23:05] havenn: has joined #RubyOnRails
[03:29:56] polyidus: has joined #RubyOnRails
[03:30:30] DZj091231kld: has joined #RubyOnRails
[03:32:12] jenrzzz: has joined #RubyOnRails
[03:32:12] jenrzzz: has joined #RubyOnRails
[03:34:01] rubyonrails208: has joined #RubyOnRails
[03:35:07] confounds: has joined #RubyOnRails
[03:35:57] Klumben: has joined #RubyOnRails
[03:44:17] PotatoChipz: has joined #RubyOnRails
[03:45:42] PotatoChipz: I know there's a column_exists? method to check if a certain table column exists for that model but.. how do i make sure.. upon loeading my module that the field really exists?
[03:47:44] arathald: potatochipz: you mean that it's populated, or that the model actually exposes the attribute, or that the column actually does exist in your backing database (and you don't trust column_exists?)
[03:47:52] arathald: or something else entirely?
[03:48:24] PotatoChipz: that the column actually exists.. but how do i make sure that upon loading my rails concern, the column exists? I mean, where do I put the checking?
[03:48:37] dblessing: has joined #RubyOnRails
[03:49:18] arathald: it really depends on the context. why are you worried that the column might not exist?
[03:49:27] tjbiddle: I'd like to hear opinions on service objects (http://stevelorek.com/service-objects.html) - Just heard about them. Am I being naïve - to me it just seems like we're moving logic from the model into something else and abstracting it further.
[03:49:42] tjbiddle: Which is ironic, because that's the argument the article makes about other options.
[03:50:42] arathald: tjbiddle: maybe I'm missing something, but my initial skimming makes it sound like "service" is just a fancy way of referring to a library?
[03:51:23] tjbiddle: arathald: I'm still grasping the concept myself. Found the initial reference in Pete Keen's Mastering Modern Payments e-book.
[03:51:42] tjbiddle: Seems like the purpose is to have single-purpose classes for business logic
[03:51:43] arathald: a library that lives directly inside your codebase, but otherwise, I don't actually see a strong distinction there?
[03:51:50] PotatoChipz: arathald http://pastebin.com/P3MiiE9q -- it's a re-usable module. i just want to make sure the the developer who will include it will make sure the column exists..
[03:52:37] PotatoChipz: oops sorry. arathald here's a pastie link http://pastie.org/private/yeo6jmi77m2xj4tca3ceg
[03:53:28] k3rn31: has joined #RubyOnRails
[03:53:44] kgrz: has joined #RubyOnRails
[03:55:34] PotatoChipz: tjbiddle i read before that models (ideally) should just deal with associations, scopes, validations etc... so i think service objects will help DRY the models
[03:57:05] duncannz: has joined #RubyOnRails
[03:57:16] haaj: has joined #RubyOnRails
[03:57:30] arathald: potatochipz: seems like the kind of thing you'd just want to check once at load, rather than each time you call chips. What do you expect it to do, not implement :chips in the case it doesn't exist? Throw an error? something else?
[03:58:01] duncannz: has joined #RubyOnRails
[03:58:09] PotatoChipz: arathald aaah yes! I just want to check it once at load.. If i wanna do that, where should i do it?
[03:58:13] upsell5: has joined #RubyOnRails
[03:58:32] rueben: has joined #RubyOnRails
[03:58:32] arathald: I imagine something like raise "whatever" unless has_attribute?(:chips) could do it
[03:58:51] duncannz: has joined #RubyOnRails
[03:58:59] tildes: has joined #RubyOnRails
[03:59:01] arathald: that is, if you want to raise an error
[04:00:10] sypheren: has joined #RubyOnRails
[04:00:16] arathald: depending on who's using it, you may also be able to just say that your concern won't work if the model doesn't have chips - when your concern tries to access it, the error message would likely be clear enough, even though handling it yourself would be a little friendlier
[04:04:42] blackmesa: has joined #RubyOnRails
[04:17:36] jenrzzz: has joined #RubyOnRails
[04:17:36] jenrzzz: has joined #RubyOnRails
[04:19:52] hahuang62: has joined #RubyOnRails
[04:30:16] rickmasta: has joined #RubyOnRails
[04:30:39] phredus_: has joined #RubyOnRails
[04:34:49] rubyonrails484: has joined #RubyOnRails
[04:35:15] rubyonrails484: hey guys, is there a way to see if a particular user is signed in via devise?
[04:36:05] Radar: rubyonrails484: Check if their current_sign_in_at time is within 15 minutes of the current moment
[04:38:09] rubyonrails484: i have an article page (where the author of the article is @article.user) and i want the "Delete article" button to appear only if that author is signed in
[04:38:17] andatche: has joined #RubyOnRails
[04:38:17] rubyonrails484: @radar but isn't that prone to error?
[04:38:24] Radar: rubyonrails484: Is it?
[04:38:33] Radar: rubyonrails484: Oh you mean if the CURRENT user is signed in?
[04:39:15] djj: has joined #RubyOnRails
[04:39:33] rubyonrails484: no i meant if the author of that particular article is signed in -- only then do i want to show the "delete" button
[04:39:40] rails815: has joined #RubyOnRails
[04:39:43] rubyonrails484: so that only the author can delete it
[04:40:02] rubyonrails484: i tried.. if @article.user_signed_in?
[04:40:07] rubyonrails484: but that returns an error
[04:40:15] Radar: rubyonrails484: if user_signed_in? && @article.user == user
[04:40:18] Radar: oops, == current_user
[04:41:15] rubyonrails484: ahh silly me. that worked like a charm! thanks a lot!
[04:45:35] jayc0b0: has joined #RubyOnRails
[04:45:45] rubyonrails484: @radar hmm that worked fine when no user is logged in. but as soon as i log in as a different user (not the author) and try to view the article, i get a "undefined method `user' for nil:NilClass" error
[04:46:07] Radar: rubyonrails484: is @article set?
[04:46:30] Radar: Are you certain?
[04:46:40] Radar: Where else are you calling .user then?
[04:46:42] Radar: What is the stacktrace?
[04:46:47] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[04:48:51] AdamOnRails: has joined #RubyOnRails
[04:49:29] AdamOnRails: Hi Guys, I haven't used RoR in about 7 years but getting back into it now. A few things have changed evidently!
[04:50:04] AdamOnRails: Anyone ever have any issues with "Object doesn't support this property or method" when using stylesheet_link_tag?
[04:50:17] AdamOnRails: Devving on Windows. :x
[04:51:29] rubyonrails484: @radar here you go https://gist.github.com/anonymous/be1f0125dae85dc40cba3a0519828a4e
[04:51:49] rubyonrails484: i see it now. it's a typo
[04:51:53] Radar: mmmmmhmmmmmm
[04:53:59] wethu: has joined #RubyOnRails
[04:56:35] sevenseacat: AdamOnRails: its not much to go on
[04:56:39] sevenseacat: also, we're not all guys here
[04:58:51] haaj: has joined #RubyOnRails
[04:58:57] duncannz: has joined #RubyOnRails
[04:59:43] AdamOnRails: sevenseacat - I've always considered 'guys' a unisex term, though I know that makes no sense :P Apologies.
[05:00:55] AdamOnRails: Well, as far as I'm aware I'm using the stylesheet_link_tag as per normal... one parameter being the name of the css file which is stored in assets/css. But for some reason it is throwing the exception
[05:01:19] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[05:02:09] pawnbox: has joined #RubyOnRails
[05:02:11] specialblend_: has joined #RubyOnRails
[05:02:13] kgrz: has joined #RubyOnRails
[05:04:26] neanderslob: has joined #RubyOnRails
[05:05:42] blackmesa: has joined #RubyOnRails
[05:07:36] AdamOnRails: http://pastebin.com/kazwePCx
[05:08:42] AdamOnRails: http://pastie.org/private/7taoqvrb3oqmqibg4atw0a
[05:09:00] mdw: has joined #RubyOnRails
[05:09:03] AdamOnRails: Hope that is a bit more helpful? forgive my n00bness
[05:09:48] sevenseacat: for starters it should just be "bootstrap" not "bootstrap.css"
[05:10:04] ksoze: has joined #RubyOnRails
[05:10:16] sevenseacat: for second, I wouldnt include that at all - I'd load bootstrap into your existing application manifest
[05:10:17] AdamOnRails: ignore the actual html <link> tag on line 17 -> was just a placeholder I forgot to remove.
[05:10:39] sevenseacat: a little confused why coffeescript is being invoked there
[05:11:35] AdamOnRails: Coffee script is completely new to me
[05:11:45] AdamOnRails: didn't used to exist when I used to play aroud
[05:12:21] rvanlieshout: has joined #RubyOnRails
[05:13:41] AdamOnRails: ill install bootstrap properly and get back to you, but I also had this problem when I very first created the App. I had to remove the stylesheet_link_tag and javascript one before my app would load.
[05:14:02] null__: maybe a bit unrelated, but I think the coffeescript ship has sailed
[05:14:13] null__: maybe even before it got included with rails
[05:16:57] jenrzzz: has joined #RubyOnRails
[05:18:44] Radar: na, it was popular when that happened
[05:19:04] Radar: but now thanks to the advent of ES6 (or whatever number is your favourite), it's not necessary.
[05:19:19] Radar: The advantage was writing shorter JS. ES<num> supports that fine.
[05:19:39] hutch: has joined #RubyOnRails
[05:20:36] hahuang62: has joined #RubyOnRails
[05:20:51] jancel: has joined #RubyOnRails
[05:24:53] rafaelfranca: has joined #RubyOnRails
[05:25:16] zave: has joined #RubyOnRails
[05:29:14] pwnd_nsfw`: has joined #RubyOnRails
[05:32:56] wethu: has joined #RubyOnRails
[05:33:42] dionysus69: has joined #RubyOnRails
[05:47:00] arup_r: has joined #RubyOnRails
[05:48:41] lightt: has joined #RubyOnRails
[05:48:55] PaulePanter: Hi. http://paste.debian.net/739332/
[05:49:15] PaulePanter: “undefined method `validate_yubikey_otp' for #<UserSessionsController:0xd06ed7c>” is the error I get.
[05:49:23] PaulePanter: Even namespacing the methods does not work.
[05:49:29] PaulePanter: This is with Rails 3.2.
[05:49:50] PaulePanter: >> YubikeyValidator.validate_yubikey_otp("test")
[05:49:50] PaulePanter: !! #<NoMethodError: undefined method `validate_yubikey_otp' for YubikeyValidator:Module>
[05:49:53] PaulePanter: >> YubikeyValidator::validate_yubikey_otp("test")
[05:49:55] PaulePanter: !! #<NoMethodError: undefined method `validate_yubikey_otp' for YubikeyValidator:Module>
[05:50:06] KnownSyntax: has joined #RubyOnRails
[05:50:18] d0nn1e: has joined #RubyOnRails
[05:50:42] sevenseacat: PaulePanter: I think you want to include it in your controller, not just list it as a dependency?
[05:50:51] sevenseacat: `include YubikeyValidator` ?
[05:52:14] wethu: has joined #RubyOnRails
[05:56:09] lightt: has joined #RubyOnRails
[05:57:07] pontiki: has joined #RubyOnRails
[05:57:17] PaulePanter: sevenseacat: It didn’t find it then.
[05:57:19] arup_r: PaulePanter: YubikeyValidator.validate_yubikey_otp will not work, because `validate_yubikey_otp` is defined as instanced method.
[05:57:20] PaulePanter: Let me try again.
[05:57:46] PaulePanter: arup_r: So I need `self.`.
[05:58:36] arup_r: PaulePanter: yes
[06:00:17] haaj: has joined #RubyOnRails
[06:02:57] PaulePanter: arup_r: Awesome. That was it. Stupid me.
[06:03:09] PaulePanter: arup_r: Is there a way, to avoid prefixing this with the module name?
[06:04:13] arup_r: then u need to make those instance method, and include them inside the controller,, then u can call them without any prefixing.. :)
[06:06:29] blackmesa: has joined #RubyOnRails
[06:10:29] Niham: has joined #RubyOnRails
[06:10:37] Dimik: has joined #RubyOnRails
[06:12:19] AdamOnRails: "No route matches [GET] stylesheets/application.css"
[06:12:39] AdamOnRails: Do I need to add a route for every single asset I have in my app?
[06:13:17] PaulePanter: sevenseacat, arup_r: Thanks. Now it works in development mode with `include` and instance methods. I had that before several months ago, and hit errors.
[06:13:21] xpl0iter: has joined #RubyOnRails
[06:13:28] PaulePanter: I’ll test it later in production (with JRuby).
[06:13:32] AdamOnRails: Hmm...What am I missing here...
[06:14:03] xpl0iter: Hi, when I try to save the data from a form to my db, it webbrick logs shows this: http://pastie.org/private/jpvtcq0pacluallayftzg. But only id, mobile and created ate updated at are being saved.
[06:14:14] xpl0iter: Can someone please help em?
[06:15:15] sevenseacat: thats not what the log says - its saving id, name, email, password_digest, and mobile
[06:15:28] sandelius: has joined #RubyOnRails
[06:15:28] arup_r: AdamOnRails: U have the file application.css in the app/assets/stylesheet folder right?
[06:16:01] dextertzu: has joined #RubyOnRails
[06:16:32] AdamOnRails: Yup, though it is saved as application.css.sass as per the "install bootstrap" guide I followed...
[06:16:42] xpl0iter: sevenseacat, yeah, but it doesn't save that in the db. So can it be a db problem?
[06:16:53] sevenseacat: xpl0iter: according to those logs it does
[06:17:04] sevenseacat: what makes you think its not saving in the db?
[06:17:35] xpl0iter: sevenseacat, one sec. Let me check again in the db.
[06:18:02] yfeldblum: has joined #RubyOnRails
[06:18:31] xpl0iter: sevenseacat, sorry, I think I did something and it started saving :( my bad
[06:18:56] arup_r: AdamOnRails: try application.sass only, and let me know. these things need real time debug.. :)
[06:19:15] arup_r: because that is what I see in readme either .scss or .sass
[06:23:53] yfeldblum: has joined #RubyOnRails
[06:25:05] AdamOnRails: Please install node.js
[06:25:23] AdamOnRails: ^^ after changing to application.sass
[06:25:33] alfiemax: has joined #RubyOnRails
[06:25:49] phrozen77: has joined #RubyOnRails
[06:26:53] AdamOnRails: Ah, but then I went from stylesheet_link_tag "application" to stylesheet_link_tag "application.sass"
[06:27:02] raunicolae: has joined #RubyOnRails
[06:27:09] raunicolae: has left #RubyOnRails: ()
[06:27:16] axxyhtrx: has joined #RubyOnRails
[06:27:19] AdamOnRails: and it worked, although I don't see any actual stylesheet effectsin the renderd html.
[06:27:33] arup_r: i think stylesheet_link_tag "application" is fine, right?
[06:27:35] rafaelfranca: has joined #RubyOnRails
[06:28:09] solars: has joined #RubyOnRails
[06:29:00] arup_r: AdamOnRails: ^, so don't change it. Because Browser knows only .css
[06:29:15] arup_r: u shouldn't change it
[06:30:15] AdamOnRails: Hang on, Ill pastie my setup. Not having a win over here :P
[06:30:23] AdamOnRails: thanks for your help btw
[06:32:26] phrozen77_: has joined #RubyOnRails
[06:32:55] arup_r: if any of your company is hiring full time remote rails dev, let me know. I have nothing now. :( I am haiving 2+ years of experience in this zone.. thanks
[06:33:14] dionysus69: has joined #RubyOnRails
[06:33:57] pawnbox: has joined #RubyOnRails
[06:34:39] duncannz: has joined #RubyOnRails
[06:34:40] arBmind: has joined #RubyOnRails
[06:34:44] DoubleMalt: has joined #RubyOnRails
[06:36:02] AdamOnRails: http://pastie.org/private/bjn0uftlrknzng1h8qfaw
[06:36:04] arup_r: AdamOnRails: Have u installed any JS runtime yet?
[06:36:22] AdamOnRails: On my Windows I have.
[06:36:32] AdamOnRails: Not sure if I am to install it within my app somehow?
[06:36:43] AdamOnRails: node.js is installed on my PC
[06:36:45] arup_r: where is public.html is located? I thought it is application.html.erb
[06:37:08] sevenseacat: seems you dont have a valid runtime
[06:37:20] arup_r: yes, from *Current ExecJS runtime does't support ES5. Please install node.js*
[06:37:39] sevenseacat: what version of nodejs do you have?
[06:37:44] AdamOnRails: views/layouts/public.html.erb is the layout. application.css is the attempted default stylesheet.
[06:37:54] AdamOnRails: The most recent version, I downloaded it today.
[06:38:38] sevenseacat: ok, thats quite old
[06:39:03] AdamOnRails: oops. It is. I chose it as it said "recommended for most users"
[06:39:08] lightt: has joined #RubyOnRails
[06:39:11] AdamOnRails: I'll try v6 now...
[06:40:38] AdamOnRails: Nope, same error.
[06:41:58] herbst: has joined #RubyOnRails
[06:41:58] herbst: has joined #RubyOnRails
[06:43:48] sevenseacat: you may need to reboot after installing/upgrading node apparently
[06:44:09] AdamOnRails: Hmm. It didn't prompt me to reboot. I'll give it a shot. Back soon :)
[06:44:25] apotry: has joined #RubyOnRails
[06:47:32] gingray: has joined #RubyOnRails
[06:50:30] hirvi: has joined #RubyOnRails
[06:50:47] GoranPavlovic: has joined #RubyOnRails
[06:51:46] duncannz: has joined #RubyOnRails
[06:52:27] AimlessRAven: has joined #RubyOnRails
[06:52:45] AimlessRAven: hi all, how to check what sql requst is make when i stop binding.pry in my controller
[06:53:36] AimlessRAven: rvanlieshout: request.to_sql
[06:53:58] sid_fules: has joined #RubyOnRails
[06:54:16] rvanlieshout: a request doesn't have a sql
[06:54:33] AimlessRAven: rvanlieshout: what have? params ?
[06:55:16] AimlessRAven: can u tell me ?>
[06:55:47] sevenseacat: AimlessRaven: you're persistent, I'll give you that much.
[06:56:14] dEPy: has joined #RubyOnRails
[06:57:01] alfiemax: has joined #RubyOnRails
[06:59:42] Radar: AimlessRaven: There is no SQL happening when binding.pry is running.
[06:59:47] Radar: It only happens if you run some code.
[07:00:01] Radar: AimlessRaven: can you show us where you put the binding.pry please?
[07:00:32] AimlessRAven: radar at the end of my controller
[07:00:40] AimlessRAven: and then when i click to some action
[07:00:42] AimlessRAven: controller stops
[07:00:44] Radar: AimlessRaven: bzzzt wrong answer
[07:00:45] Radar: AimlessRaven: !rule0
[07:00:45] helpa: AimlessRaven: 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.
[07:00:49] AimlessRAven: and want to view what request is made
[07:01:50] haaj: has joined #RubyOnRails
[07:03:48] AimlessRAven: Radar: is not need gist for that, ok when controller stop and user @q.result.to_sql
[07:03:57] AimlessRAven: to check my ransack query
[07:04:05] Radar: AimlessRaven: Ok, suit yourself
[07:04:31] AdamOnRails: has joined #RubyOnRails
[07:04:36] rvanlieshout: AimlessRaven: have you even taken some time to follow any tutorials yet?
[07:04:46] comrad: has joined #RubyOnRails
[07:04:51] AdamOnRails: The restart woked for Node.JS
[07:05:07] AimlessRAven: rvanlieshout: yeah sometimes
[07:05:17] dEPy: has joined #RubyOnRails
[07:05:24] sevenseacat: AdamOnRails: glad it worked.
[07:05:46] AdamOnRails: Thanks for your help.
[07:06:06] AdamOnRails: Surprised the MSI didn't prompt me to restart my machine during the install wizard.
[07:07:32] blackmesa: has joined #RubyOnRails
[07:09:50] aganov: has joined #RubyOnRails
[07:12:20] duncannz: has joined #RubyOnRails
[07:12:20] Niham: has joined #RubyOnRails
[07:14:33] Niham: has joined #RubyOnRails
[07:15:23] hanalsx: has joined #RubyOnRails
[07:15:30] hanalsx: https://repl.it/C2Is
[07:15:38] hanalsx: why does the top code not give the right answer?
[07:15:42] hanalsx: shouldn't they both be the same?
[07:17:34] jas02: has joined #RubyOnRails
[07:17:54] rubyonrails706: has joined #RubyOnRails
[07:18:42] rubyonrails706: how can i add a Users controller when using devise without messing up the routing?
[07:19:11] tercenya: has joined #RubyOnRails
[07:19:14] rubyonrails706: how can i, for instance, route all devise specific links to /u instead of /user so that it doesn't mess with the controller?
[07:20:47] lxsameer: has joined #RubyOnRails
[07:20:53] sevenseacat: https://github.com/plataformatec/devise/#configuring-routes change the path
[07:21:22] hahuang62: has joined #RubyOnRails
[07:22:08] jcugno__: has joined #RubyOnRails
[07:23:30] rbr: hanalsx: they shouldn't; 'cubed' stays 1 within the loop
[07:23:39] k3rn31: has joined #RubyOnRails
[07:23:55] hanalsx: how come it returns 8?
[07:24:23] DoubleMalt: has joined #RubyOnRails
[07:24:33] rbr: because 1 + 1 + 1 = 3 :))
[07:24:33] hanalsx: if a isn't updating
[07:24:59] jenrzzz: has joined #RubyOnRails
[07:24:59] jenrzzz: has joined #RubyOnRails
[07:25:01] hanalsx: i need to learn how to read code better
[07:25:03] hanalsx: thanks rbr
[07:25:07] rbr: hehe, np
[07:26:11] hanalsx: say would you happen to know any tips on how to improve my code reading skills?
[07:26:51] Niham: has joined #RubyOnRails
[07:28:22] linoespinoza: has joined #RubyOnRails
[07:28:35] rafaelfranca: has joined #RubyOnRails
[07:28:46] dblessing: has joined #RubyOnRails
[07:29:56] ElFerna: has joined #RubyOnRails
[07:30:29] antgel: has joined #RubyOnRails
[07:33:50] guidocalvano: has joined #RubyOnRails
[07:37:35] rueben: has joined #RubyOnRails
[07:37:51] Ergo^: has joined #RubyOnRails
[07:38:11] eGGshke: has joined #RubyOnRails
[07:40:18] sebstrax: has joined #RubyOnRails
[07:41:10] Dimik: has joined #RubyOnRails
[07:44:00] Kedare: has joined #RubyOnRails
[07:44:59] tjbiddle: has joined #RubyOnRails
[07:46:26] tjbiddle: Is `validates_x_of` still valid in Rails 4/5? Or is the proper way `validates x: abc`
[07:46:29] Radar: hanalsx: practice reading code
[07:46:33] Radar: tjbiddle: yes
[07:46:55] hanalsx: Radar: are there any resources that are specific to reading code?
[07:47:03] hanalsx: like you know how there are code challenges
[07:47:07] hanalsx: but are there code reading challenges?
[07:47:21] Radar: hanalsx: Every single codebase you'll come across?
[07:47:47] hanalsx: is there something like this code is good and this is why this code is bad
[07:47:53] hanalsx: like differences like that?
[07:48:01] hanalsx: i don't know what that's called
[07:48:20] Radar: hanalsx: ruby style guide
[07:48:29] Radar: https://github.com/bbatsov/ruby-style-guide
[07:48:45] hanalsx: no i mean in terms of logic not syntax
[07:48:49] tjbiddle: Radar: Cool - Would you suggest writing this any other way? https://gist.github.com/thomasbiddle/f4950cd83e7a01f4b6fba358ade36a7d
[07:48:53] hanalsx: i mean like you see how i had my code
[07:49:01] hanalsx: the top one worked and the bottom one didn't
[07:49:03] hanalsx: stuff like that
[07:49:03] Radar: [17:47:21] <Radar> hanalsx: Every single codebase you'll come across?
[07:49:06] tjbiddle: Oops - left in some old jazz, one sec.
[07:49:10] Radar: "no that is not the correct answer"
[07:49:26] hanalsx: no because codebases don't come with training wheels
[07:49:30] Radar: hanalsx: Then what is the right answer?
[07:49:32] hanalsx: i'm not ready for a code base
[07:49:47] hanalsx: so i guess if there isn't
[07:49:55] Radar: hanalsx: !r4ia
[07:49:55] helpa: hanalsx: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[07:49:58] hanalsx: it would be a great idea for someone to make a guide
[07:50:11] hanalsx: that compares code
[07:50:24] Radar: hanalsx: https://github.com/rubysherpas/r4ia_examples
[07:50:40] hanalsx: how does that book compare to the rails tutorial?
[07:50:42] Radar: There is both a codebase and a tutorial which covers how the codebase comes together and more importantly WHY things are done the way they are.
[07:50:55] Radar: It is, in my estimations, 1000x better than the Rails Tutorial
[07:51:02] Radar: It's the best Rails book that I've ever written.
[07:51:36] Radar: hanalsx: For more pure ruby stuff, there's this book: http://www.poodr.com/
[07:52:10] sevenseacat: disclaimer: we wrote Rails 4 in Action.
[07:52:27] hanalsx: oh well i guess that explains his opinion
[07:52:36] hanalsx: i'll buy the book and see
[07:52:59] sevenseacat: so if you have questions about it, you can always ask both of us :)
[07:53:23] Radar: hanalsx: Regarding your code in https://repl.it/C2Is... do you understand why the top example didn't work?
[07:53:57] hanalsx: but before i didn't
[07:54:14] hanalsx: it would be nice to have code like mine in a book
[07:54:16] hanalsx: or a guide
[07:54:19] hanalsx: and compare
[07:54:24] hanalsx: and learn from
[07:55:12] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[07:55:27] justrohu: has joined #RubyOnRails
[07:55:29] ghr: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[07:55:36] Radar: Although that book is a bit... dense.
[07:57:03] Radar: by that I meant that the intro covers a lot about Ruby... think of it like trying to introduce someone to cooking and then showing them all the implements in the kitchen
[07:57:04] sevenseacat: ultimately, learning why things don't work as you expect is just breaking the mystery code down into smaller and smaller pieces until you find the bit that doesnt fit with your mental model of how things do work
[07:57:28] dannyguk: has joined #RubyOnRails
[07:57:39] hanalsx: that's my problem although i improved quite a bit
[07:57:44] gingray: has joined #RubyOnRails
[07:57:45] sevenseacat: over time, as you learn more and more smaller pieces, you assemble them into bigger pieces that you can understand just by looking at them for a while
[07:57:50] Radar: I think a better approach for a book like that would be to demonstrate what Ruby can do _first_ (ala https://www.ruby-lang.org/en/documentation/quickstart/) and then flesh out from there.
[07:58:07] hanalsx: like i am good at describing things but i can't code them
[07:58:15] hanalsx: without making tons of logical errors
[07:58:23] hanalsx: but i'm doing a lot better now
[07:58:36] matthewd: I'd focus less on "learn to recognise the first example is wrong", and more on "learn to work out [by exploration / puts etc if needed] *why* the fixed code behaves differently"
[07:58:45] sevenseacat: I think the challenges on exercism.io are quite good for practicing coding - and also seeing how other people approach problems
[07:58:50] sevenseacat: by reading their solutions
[07:59:18] sevenseacat: matthewd: yeah thats what I meant by breaking things down
[08:00:07] hanalsx: i just ordered rails 4 in action from amazon
[08:00:22] matthewd: sevenseacat: Yeah, that had a "^^ +1;" in front of it, but people kept talking, so it lost its context :P
[08:00:24] hanalsx: it should be here tomorrowish i hope
[08:00:39] sevenseacat: hanalsx: awesome :)
[08:01:25] sevenseacat: but yeah ,just exposure to all kinds of code, will let you start to recognize common patterns, idioms, etc.
[08:01:49] ElFerna: has joined #RubyOnRails
[08:01:51] sevenseacat: talking with the authors of the code can help too, they can answer why they wrote something one way instead of another
[08:02:18] hanalsx: yehuda katz is he the same guy who created ember?
[08:02:28] hanalsx: interesting
[08:02:38] sevenseacat: he used to be on the rails core team.
[08:02:39] hanalsx: what did you create sevenseacat besides the book?
[08:02:58] sevenseacat: hanalsx: I've been working as a Rails developer for five years
[08:03:04] sevenseacat: I've worked on dozens of different Rails apps
[08:03:15] hanalsx: writing a book is really really hard
[08:03:26] sevenseacat: not much public contribution, other than helping people out here for those five years :)
[08:03:39] hanalsx: that's a lot of public contribution
[08:03:50] hanalsx: i was just curious
[08:04:08] sevenseacat: I have the smallest profile of the four authors, so is understandable
[08:04:09] hanalsx: and what you're doing is more important than writing a library in my opinion
[08:04:49] hanalsx: you're helping people and making the community larger
[08:04:51] sevenseacat: Yehuda - ember, rails core; Steve - Rust, a billion OSS projects; Ryan - multiple books, many many OSS contributions; me - oh hello
[08:05:27] hanalsx: you wouldn't be part of the team if you had nothing to contribute
[08:05:50] hanalsx: i'm curious about how libraries are made
[08:05:58] pwnd_nsfw: has joined #RubyOnRails
[08:06:17] hanalsx: or is it just a bunch of functions grouped together that are uploaded to the internet for everyone to use?
[08:07:35] defsdoor: has joined #RubyOnRails
[08:07:45] sevenseacat: I haven't written any, but I assume most of them come from extracting sets of related functions from existing code
[08:08:21] sevenseacat: if you find yourself rewriting the same code over and over between projects, it might be time to look at extracting them out into a library, to save yourself (and possibly other people) time
[08:08:38] mozzarella: has joined #RubyOnRails
[08:08:42] blackmesa: has joined #RubyOnRails
[08:09:57] adre: has joined #RubyOnRails
[08:10:43] jsrn: has joined #RubyOnRails
[08:11:53] gamov_: has joined #RubyOnRails
[08:14:51] tvw: has joined #RubyOnRails
[08:16:49] xcesariox: has joined #RubyOnRails
[08:18:34] sid_fules: has joined #RubyOnRails
[08:19:18] bruce_lee: has joined #RubyOnRails
[08:19:18] bruce_lee: has joined #RubyOnRails
[08:21:40] sid_fules: has joined #RubyOnRails
[08:25:26] artto: has joined #RubyOnRails
[08:29:28] snoobydoo: has joined #RubyOnRails
[08:31:00] snoobydoo: Question - Trying to setup many-to-many between Post & Product. A Post can have multiple Products, and a product can belong to multiple posts. If I setup a new model called PostProduct which belongs to both post and product, and have has_many :through on post and product, would this work like I expect it to?
[08:31:14] edwinvdgraaf: has joined #RubyOnRails
[08:31:40] snoobydoo: Or is there a better way to do this? My models are User, Product, Post, Comment, and Like if that helps.
[08:33:19] blackmesa: has joined #RubyOnRails
[08:33:48] arup_r: has joined #RubyOnRails
[08:35:23] arup_r: AdamOnRails: good thing. restart solves many issues.. :)
[08:37:54] sevenseacat: snoobydoo|away: that would work, or you could just use a has_and_belongs_to_many and avoid having a PostProduct model
[08:38:13] arBmind: has joined #RubyOnRails
[08:39:18] pawnbox: has joined #RubyOnRails
[08:39:30] Charles_CV: has joined #RubyOnRails
[08:39:38] rueben: has joined #RubyOnRails
[08:40:41] Charles_CV: has joined #RubyOnRails
[08:40:46] norc: has joined #RubyOnRails
[08:42:19] dblessing: has joined #RubyOnRails
[08:46:44] ElFerna: has joined #RubyOnRails
[08:50:04] ur5us: has joined #RubyOnRails
[08:51:47] sid_fules: has joined #RubyOnRails
[08:52:30] andywww: has joined #RubyOnRails
[08:54:05] lightt: has joined #RubyOnRails
[08:54:39] AdamOnRails: Hmmm.... is it normal for <%= stylesheet_link_tag "application" %> to print out a <link> to every single .css file for every controller?
[08:55:06] andywww: in dev, yeah
[08:55:37] AdamOnRails: ah sweet. So in Prod it will only do the single stylesheet? What is the logc behind printing them all out in dev?
[08:56:08] voidDotClass: has joined #RubyOnRails
[08:56:20] Circuit8: has joined #RubyOnRails
[08:56:26] andywww: in production the asset pipeline concatenates and compresses them all into one file, yeah
[08:56:53] jancel: has joined #RubyOnRails
[08:57:03] andywww: you can’t debug a compressed file
[08:57:17] andywww: it’d make console errors a nightmare to track down
[08:57:23] AdamOnRails: ah gotchya. thanks
[08:57:49] axxyhtrx: has joined #RubyOnRails
[08:57:50] moeabdol: has joined #RubyOnRails
[08:58:03] AdamOnRails: So if thats the case then I imagine I'd need to take care to ensure my css class names are all unique across all controller stylesheets?
[08:58:05] soroot: has joined #RubyOnRails
[08:59:55] yardenbar: has joined #RubyOnRails
[08:59:59] norc: AdamOnRails: That depends on whether they include the same css assets..
[09:00:44] andywww: that would help yes but its all about specificity in the rules. you can duplicate all the class names if they’re part of different wrapper div
[09:00:57] andywww: thats where sass comes into its own
[09:02:10] tjbiddle: has joined #RubyOnRails
[09:02:24] yfeldblum: has joined #RubyOnRails
[09:02:41] AdamOnRails: ah sweet, thanks.
[09:04:04] AdamOnRails: When I View Source (firefox) and then click on one of the links to the stylesheets, the bottom of the stylesheet has the HTML of an Exception regarding GET routes printed into it... is this part of an App issue or is it more because firefox has used a hyperlink from within "view source" to get there?
[09:05:06] andywww: i’m not sure, try visiting that url directly
[09:05:26] andywww: it should show you your error there
[09:05:59] marr: has joined #RubyOnRails
[09:08:15] Talltree: i have a batch create function like this: http://pastie.org/10877645 sadly it doesnt show if / where there is a validation error. it just doesnt accept the complate batch.
[09:08:43] Talltree: is there an easy method for it to show whats wrong/just reject the single record inside the batch that is not valid?
[09:08:59] norc: Talltree: first, you do not need an explicit begin block if its encompasses an entire method body.
[09:09:08] norc: Talltree: you can simply do: def foo; rescue; end
[09:09:28] quazimodo: has joined #RubyOnRails
[09:09:47] norc: Talltree: That is for you to write!
[09:10:24] norc: Talltree: Have some variable where you add errors as you proceed. How it is then displayed is entirely up to you.
[09:11:19] allcentury: has joined #RubyOnRails
[09:11:45] Talltree: inside the resuce? i have to confess that i copy pasted some of it...
[09:11:58] jgt2: has joined #RubyOnRails
[09:12:38] Talltree: the rescue is the return function if it transaction failed for any reason? do you have an example of such a function?
[09:15:09] snoobydoo: sevenseacat: I have a has_and_belongs_to_many relationship setup currently, and I was wondering if has_many :through approach was better that the current approach
[09:15:23] sevenseacat: its used for different things.
[09:15:37] sevenseacat: it adds complexity, so if you don't need that extra model, don't use it.
[09:16:22] AzaToth: has joined #RubyOnRails
[09:18:03] snoobydoo: Makes sense. Also, A Post has many comments, and the comments belong to a User. So the model would be something lke User has_many comments Comment belongs_to user, without having to reference a Post in either of those models, right?
[09:18:51] sevenseacat: well I assume a comment would also belong to a post
[09:19:03] snoobydoo: Yes, it does
[09:19:06] jenrzzz: has joined #RubyOnRails
[09:19:07] Sashimi: has joined #RubyOnRails
[09:20:24] snoobydoo: Comment belongs to both User and a Post
[09:21:54] arup_r: has joined #RubyOnRails
[09:21:55] snoobydoo: sevenseacat: Thanks. Just wanted to validate this approach
[09:22:05] hahuang62: has joined #RubyOnRails
[09:29:42] apeiros: any suggestions for gems which help with seeding data? I used to use yaml_db, looking for a good replacement. preferably compatible with mssql (mssql has notable issues with primary key columns - it requires a special statement before/after inserting them)
[09:31:49] ElFerna: has joined #RubyOnRails
[09:31:58] norc: apeiros: why do you need an entire gem?
[09:32:13] norc: apeiros: What particular functionality are you looking for that a simple rake task does not have?
[09:32:45] apeiros: norc: dump and load a table fast
[09:33:07] apeiros: and a rake task in the end needs packaging too, doesn't it? so unless I write it myself it'd be a gem too.
[09:33:20] norc: apeiros: rails comes with one built in, db:seed
[09:33:50] norc: apeiros: Just provide a db/seeds.rb and it will get called automatically by db:seed (which in turn is called by things like db:reset)
[09:34:02] apeiros: missing the point
[09:34:08] apeiros: i already have a db/seeds.rb
[09:34:27] apeiros: and I need something there which lets me load a dump quickly.
[09:34:42] apeiros: so I can generate the data once (expensive), dump it, and reseed from the dump
[09:35:25] norc: apeiros: well the flow can easily be handled with some simple rake tasks
[09:35:43] norc: apeiros: As for the dump/load, what size are we talking about?
[09:35:45] apeiros: ok. how would that rake task look?
[09:35:55] apeiros: anything from 10 to 10mio records.
[09:36:06] alfiemax: has joined #RubyOnRails
[09:36:20] AdamOnRails: Hmm. So I'm not used to this new Rails... seems like every friggin thing needs to have a named route in the routes.rb..... what is the present-day equivalent of plopping an image file into the public/images directory and navigating to it in the URL bar?
[09:36:37] startupality: has joined #RubyOnRails
[09:37:24] bonswouar: has joined #RubyOnRails
[09:37:28] norc: apeiros: Honestly the only issue will be doing it in a fast manner - and if you are at that point I would forego Rails and ActiveRecord entirely. Use a low level interface that allows you to do something like COPY (or whatever MSSQL provides you with)
[09:37:44] lightt: has joined #RubyOnRails
[09:38:20] apeiros: norc: aaand you reached "give me a library which does that"
[09:38:34] workmad3: has joined #RubyOnRails
[09:38:42] apeiros: because I don't want to write it myself if somebody already did it.
[09:39:13] apeiros: it's not as trivial as it might seem. there's issues with regards to fields having the correct value and being convertible.
[09:39:13] kgrz: has joined #RubyOnRails
[09:39:34] norc: What do you mean by "having the correct value" ?
[09:40:53] xpl0iter: has joined #RubyOnRails
[09:40:58] apeiros: starts with simple things. e.g. in my short test, I had to truncate the timezone from the csv export, otherwise import failed.
[09:41:24] Niham: has joined #RubyOnRails
[09:41:45] xpl0iter: Hi I am trying to do bundle install and it suddenly started showing errors while installing gems. So now it shows "Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling."
[09:41:59] gnagno: has joined #RubyOnRails
[09:42:02] apeiros: and it doesn't seem like mssql supported to stream data like PG does
[09:42:04] gnagno: hello everyone
[09:42:04] sevenseacat: xpl0iter: can you gist the error you're seeing?
[09:42:15] apeiros: all kinds of bulk import/export require access to the filesystem the db resides on
[09:42:25] apeiros: and I think you can imagine why that's a bad idea
[09:42:50] xpl0iter: sevenseacat, one sec
[09:43:07] fox_mulder_cp: has joined #RubyOnRails
[09:43:14] gnagno: I am trying to make a small hook to have statistics on the usage of the different endpoints in my application, how can I get the route of the current request? if the request is for something similar to /users/29 I would like to get /users/:id
[09:43:24] xpl0iter: sevenseacat, http://pastie.org/private/xidxlocdvovxrovlg0jlq
[09:43:33] bonswouar: has joined #RubyOnRails
[09:43:43] sevenseacat: > You have to install development tools first.
[09:43:51] sevenseacat: do you have xcode's build tools installed?
[09:44:03] gnagno: I mean, is there a way to get the current URI pattern?
[09:44:15] sevenseacat: or did you just upgrade xcode? if so, open it and agree to its terms and conditions before trying again
[09:44:30] blackmesa: has joined #RubyOnRails
[09:45:27] xpl0iter: sevenseacat, doing this "sudo apt-get install libgmp-dev" fixed it. I don't know what happened, everything was working until yesterday
[09:45:41] sevenseacat: why would you
[09:46:03] sevenseacat: ah right, I misread the OS
[09:46:05] andywww: hi, what profiling tool can i use to work out why i have such a delay loading (what i think is) the ruby environment
[09:46:09] andywww: https://gist.github.com/anonymous/e987bb02ed44d39eb0be6a58ebcec315
[09:46:29] andywww: the reason i say i think its ruby and not rails is it happens with gem and bundler too
[09:46:52] andywww: 20 second wait for ‘rails s’ to load
[09:47:36] xpl0iter: sevenseacat, I am using ubuntu, I didn't do anything, May be apt-get autoremove removed it
[09:47:41] xpl0iter: Thats the only thing I did yesterday
[09:47:44] rvanlieshout: andywww: got 'strace' installed?
[09:47:54] andywww: it sits with no output from the command for 90% of that time, then maybe a second or so when webrick starts
[09:48:15] andywww: no, but i will now!
[09:51:06] dblessing: has joined #RubyOnRails
[09:51:26] soroot: has joined #RubyOnRails
[09:58:43] norc: apeiros: It makes most sense to do this with the tools mssql ships with I think.
[09:59:31] norc: apeiros: Thinking how postgres ships specialized tools to do the job, rather than being able to do this through the regular pg connection.
[10:01:53] ElFerna: has joined #RubyOnRails
[10:02:37] voidDotClass: has joined #RubyOnRails
[10:02:47] Guest683: has joined #RubyOnRails
[10:09:29] eyck: has joined #RubyOnRails
[10:09:34] rodfersou: has joined #RubyOnRails
[10:10:15] startupality: has joined #RubyOnRails
[10:10:29] gnagno: has joined #RubyOnRails
[10:11:36] c355E3B: has joined #RubyOnRails
[10:11:55] Talltree: norc where do errors get posted, how do save them in a variable?
[10:12:59] pawnbox: has joined #RubyOnRails
[10:13:32] norc: apeiros: See, this is what I meant.
[10:14:09] dblessing: has joined #RubyOnRails
[10:14:34] ebbflowgo: has joined #RubyOnRails
[10:21:52] alfiemax: has joined #RubyOnRails
[10:23:35] mikecmpbll: has joined #RubyOnRails
[10:23:46] matthewd: AdamOnRails: If you like, you should be able to do just that. But generally, you'd pass an image through the asset pipeline.
[10:25:14] matthewd: gnagno: I don't know of any way to get the route pattern, but maybe the controller & action name would be equivalently useful for your purpose?
[10:27:29] ur5us: has joined #RubyOnRails
[10:28:13] M-shine: has joined #RubyOnRails
[10:29:58] pawnbox: has joined #RubyOnRails
[10:32:22] sevenseacat: has joined #RubyOnRails
[10:32:37] Brackson: has joined #RubyOnRails
[10:35:42] axxyhtrx: has joined #RubyOnRails
[10:43:40] snoobydoo: If I needed a service that pulls data from an API and updates the database on intervals - what would be the best way to go about doing this?
[10:43:51] JakFrist: has joined #RubyOnRails
[10:49:17] AdamOnRails: Matthewd - Just worked out that if I save images into the asset folder I need to rake them into public
[10:49:40] matthewd: AdamOnRails: In production, yes; in development it should just work
[10:52:52] dblessing: has joined #RubyOnRails
[10:56:57] axxyhtrx: has joined #RubyOnRails
[10:57:23] moeabdol: has joined #RubyOnRails
[10:58:08] chridal: has joined #RubyOnRails
[11:00:46] DoubleMalt: has joined #RubyOnRails
[11:00:53] apeiros: norc: mssql's tools can't be embedded in an automated workflow. so no, that's not an option.
[11:01:31] apeiros: also using mssql's tool would not be your initial "just a rake task" either ;-)
[11:04:35] srinidhi: has joined #RubyOnRails
[11:08:53] marahin: has joined #RubyOnRails
[11:10:08] marahin: Hello. If I want to declare a user_an_admin? helper method, what would be the better approach: create a module with the definition of this method (place it in app/concerns & include in ApplicationController), or, as it's just one method, declare it directly in ApplicationController?
[11:10:53] marahin: or, even, assuming I'm using user_signed_in? anyways, should it be a Model method, which would return boolean value?
[11:11:39] marahin: now when I think of it I think the last approach is best of three, isn't it?
[11:12:01] marahin: not even a method but just using the attribute itself - current_user.admin ? (..) : (..)
[11:13:29] hardtail: has joined #RubyOnRails
[11:14:39] pwnd_nsfw`: has joined #RubyOnRails
[11:15:00] dblessing: has joined #RubyOnRails
[11:16:40] chridal: has joined #RubyOnRails
[11:17:11] Fernando-Basso: has joined #RubyOnRails
[11:17:38] alfiemax: has joined #RubyOnRails
[11:20:19] jgt2: has joined #RubyOnRails
[11:21:55] jenrzzz: has joined #RubyOnRails
[11:21:55] jenrzzz: has joined #RubyOnRails
[11:22:17] jnoob22: has joined #RubyOnRails
[11:22:51] hahuang62: has joined #RubyOnRails
[11:23:38] quazimodo: has joined #RubyOnRails
[11:25:50] sevenseacat: has joined #RubyOnRails
[11:27:31] k3rn31: has joined #RubyOnRails
[11:27:41] brackson_: has joined #RubyOnRails
[11:27:43] guest56: has joined #RubyOnRails
[11:28:18] rubyonrails358: has joined #RubyOnRails
[11:29:02] arup_r: has joined #RubyOnRails
[11:30:02] moeabdol: has joined #RubyOnRails
[11:30:16] wethu: has joined #RubyOnRails
[11:30:50] blackmesa: has joined #RubyOnRails
[11:30:54] mdw: has joined #RubyOnRails
[11:30:58] brackson_: I have an API controller in my Rails application, which requires a valid access token appended to any URL that performs any actions on that controller. Each access token is a random, private string. The API is only going to be used across websites that I manage myself. Is having *just* an access token alright security-wise?
[11:32:24] brackson_: HTTPS is used across all applications as well.
[11:32:24] rvanlieshout: brackson_: if you include ssl then yes
[11:32:32] rvanlieshout: you might want to include ip restrictions too if possible
[11:32:45] brackson_: rvanlieshout: thanks, I will
[11:33:07] brackson_: I'm pretty sure all rails projects will be run on one server, so I can just use localhost.
[11:33:10] norc: brackson_: What else would you require if not just an access token?
[11:33:37] brackson_: norc: not sure, which is why I asked the question :~)
[11:33:43] Niham: has joined #RubyOnRails
[11:34:41] workmad3: brackson_: make sure you have some mechanism to expire access individual access tokens too
[11:34:42] norc: brackson_: The question is rather what kind of access tokens you use.
[11:34:52] norc: brackson_: short lived one time tokens are preferable.
[11:35:09] norc: If they have to be long term you need a revoking mechanism.
[11:35:27] workmad3: *expire access to individual access tokens too
[11:35:32] brackson_: norc: SecureRandom.hex
[11:35:50] norc: brackson_: Do not use SecureRandom if you need secure random numbers. :p
[11:36:24] norc: brackson_: And how do you verify them?
[11:36:25] rafaelfranca: has joined #RubyOnRails
[11:36:38] norc: brackson_: The easiest way to tackle access tokens is JWT pretty much.
[11:36:55] kknight: has joined #RubyOnRails
[11:37:09] norc: They are simple to use and verify, you can sign them, encrypt if you want, you can have expiration, you can easily implement one-time tokens with them
[11:37:12] brackson_: norc: https://gist.github.com/anonymous/d8c1b3f97eaccddc650fb48c65570380
[11:37:20] k3rn31: has joined #RubyOnRails
[11:37:22] workmad3: norc: what do you base "Do not use SecureRandom if you need secure random numbers." on, out of curiosity? :)
[11:37:57] brackson_: I have a database of websites. Each website needs to use the API. what do you mean by expiring the access tokens?
[11:38:02] norc: workmad3: http://ruby-doc.org/stdlib-2.3.1/libdoc/securerandom/rdoc/SecureRandom.html#method-c-hex
[11:38:35] norc: Err one sec.
[11:39:15] nettoweb: has joined #RubyOnRails
[11:39:35] workmad3: brackson_: having some way to remove access to an individual access token, so you can rotate the credentials for access in the case of an access token being compromised
[11:39:38] norc: workmad3: https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb#L51-L77
[11:39:52] ldnunes: has joined #RubyOnRails
[11:40:44] workmad3: norc: care to point out what the exact problem with that is?
[11:40:48] norc: workmad3: I'm not a cryptoexpert, but I have a feeling that these 12 lines of Ruby code might not have the desired entropy.
[11:41:50] brackson_: workmad3: I have an admin control panel. Do you mean that I should have a setting for resetting a website's API key?
[11:42:03] workmad3: norc: the only criticism I've heard about SecureRandom is that it should arguably check for `/dev/urandom` first and fall back to OpenSSL if that's not available
[11:42:03] brackson_: I planned on doing that, if its the case.
[11:42:07] norc: workmad3: In the end any random number generator is only as good as its entropy source. The current time is a rather shitty entropy source.
[11:42:37] workmad3: norc: it's not the current time as an entropy source though... OpenSSL randomness makes use of multiple entropy pools
[11:42:47] workmad3: norc: it's just not explicit in the code because OpenSSL handles it
[11:42:58] norc: workmad3: The entropy source is still the process clock realtime.
[11:43:09] soroot: has joined #RubyOnRails
[11:43:13] norc: Is it not?
[11:43:19] workmad3: norc: it's also /dev/urandom and hardware entropy (if available) as OpenSSL mixes those into the entropy pool
[11:43:57] workmad3: norc: what you're seeing there is some extra setup around OpenSSL's randomness generation, not the entirety of the entropy pool
[11:47:25] tbuehlmann: brackson_: summary: having an API token per client (here: website) is fine. it's also fine to provide it as a GET param if the connection is handled via HTTPS. consider having the possibility to change API tokens as they can get compromised
[11:47:42] startupality: has joined #RubyOnRails
[11:47:50] norc: brackson_: Just be sure to filter out the token from all logs involved, otherwise you are leaking sensitive information. :)
[11:48:03] tbuehlmann: JWT was thrown into the discussion, that might work but will take additional effort to include into your application
[11:48:58] jct808: has joined #RubyOnRails
[11:52:00] bruce_lee: has joined #RubyOnRails
[11:52:05] brackson_: norc: thanks, will do
[11:52:09] dblessing: has joined #RubyOnRails
[11:52:27] jct808: hey, everyon e..
[11:52:40] brackson_: jbuehlmann: it was the first time I heard about JWT, but it seems interesting. I will definitely look into it, thanks
[11:58:08] alfiemax: i've got a question, which is more of design level question
[11:59:02] alfiemax: I've got a User model
[11:59:28] alfiemax: a user can be either, a chef, or a guest or both
[12:00:12] alfiemax: i was going for implementing a STI before i was told that "both" option should be there
[12:00:57] alfiemax: but now, all i can think of is using a field like `role` which can be `chef`, `guest` or `both`
[12:01:15] alfiemax: is there a better approach to this?
[12:02:06] kedare1: has joined #RubyOnRails
[12:02:54] roamingdog: has joined #RubyOnRails
[12:03:06] nickenchuggets: has joined #RubyOnRails
[12:03:07] nickenchuggets: has joined #RubyOnRails
[12:04:53] lupine: alfiemax: is this an access control thing?
[12:05:11] rvanlieshout: don't use STI
[12:05:18] avaca: has joined #RubyOnRails
[12:05:26] lupine: I'd generally have a UserRole model with user_id and role
[12:05:41] lupine: so user has_many :user_roles (or maybe I'd just call it Role)
[12:05:41] alfiemax: lupine, not exactly, it's like the same user can log in to the system in two different modes
[12:05:53] lupine: yeah, that's role-based auth ^^
[12:06:07] alfiemax: rvanlieshout, not using STI
[12:06:17] lupine: ignore "both". have two roles, store them in a separate table
[12:06:18] ElFerna: has joined #RubyOnRails
[12:06:45] alfiemax: hmm, that actually seems like a better approach
[12:06:57] alfiemax: thanks, lupine for the input
[12:08:14] lupine: it could even be User::Role
[12:08:15] alfiemax: but won't that create like min one row each for every user ?
[12:08:32] lupine: but it's a database, it's designed to store rows
[12:09:02] alfiemax: yeah, i agree. and if it was for me i would have gone with this
[12:09:11] lupine: you need to make sure you avoid N+1 query situations, is all
[12:09:57] alfiemax: a question in general, how many of you optimize your database tables to use less storage memory
[12:10:15] pawnbox: has joined #RubyOnRails
[12:10:25] alfiemax: for eg, to store a status of something, we use enum, ans store integers
[12:10:44] alfiemax: and it's obvious that statuses wont be more than 5 or 10(max)
[12:11:00] jamo: has joined #RubyOnRails
[12:11:17] alfiemax: so does anyone use smallint instead of integer?
[12:11:19] lupine: I generally wouldn't bother with that. it's likely to get 4 or 8 bytes underlying anyway
[12:11:42] lupine: and if not underlying, definitely in RAM
[12:11:46] SteenJobs: has joined #RubyOnRails
[12:12:02] alfiemax: lupine, i didn't get what you meant
[12:12:27] lupine: unaligned reads and writes are quite expensive, so compilers tend to get rid of them
[12:12:38] alfiemax: this is what i have now: `t.integer :status, limit: 2, default: 0`
[12:12:47] norc: lupine: they may even cause CPU exceptions.
[12:12:49] lupine: so if you've got a column in a database and specify that it's 3 bytes long or something, you're likely to be disappointed
[12:12:53] norc: (In case of MMX/SSE)
[12:12:56] norc: Or non-x86)
[12:13:24] voidDotClass_: has joined #RubyOnRails
[12:13:24] lupine: storage and performance-wise, it's just not worth worrying about at the sort of scale I tend to touch
[12:13:33] lupine: (which is TiB-PiB)
[12:13:50] lupine: alignment is far more important than absolute space used
[12:14:28] jhack: has joined #RubyOnRails
[12:14:43] lupine: and storage capacity is getting cheap far more quickly than compute is getting cheap
[12:14:47] norc: lupine: You know that nowadays unaligned memory access is not slower though? (Unless its crossing cache lines or page boundaries)
[12:14:55] Jasaka: has joined #RubyOnRails
[12:15:17] lupine: norc: no, i'm not completely up to date on this sort of thing ^^
[12:15:46] norc: lupine: Well, on x86 as long as you are not crossing cache lines, page boundaries or fiddling with SSE/MMX unaligned memory access is just as fast. ;-)
[12:15:55] alfiemax: i got some idea about this, i'll look up the rest and come back if i have any doubts :)
[12:16:08] lupine: ACTION cuddles his arm boxes
[12:17:15] lupine: quite how a column of 1-byte values is going to be stored under the hood is quite opaque and database-dependent, of course
[12:17:31] lupine: I would genuinely expect it to end up being word-aligned on disc though
[12:17:45] lupine: even if that's not beneficial any more, I doubt anyone would chang eit
[12:18:35] norc: lupine: Generally the thing is that a database needs to store more than just raw data.. ;-)
[12:23:03] JakFrist: has joined #RubyOnRails
[12:26:44] DoubleMalt: has joined #RubyOnRails
[12:27:57] marr: has joined #RubyOnRails
[12:33:05] jancel: has joined #RubyOnRails
[12:36:41] workmad3: lupine: on disk I'd personally expect to see a more packed representation, so that disk access can be optimised more effectively... the cost of unpacking is most likely going to be much lower than the extra time spent reading unused data off the disk (and if that padding causes fragmentation, then you also have extra seeks, etc. to take account of and the time balloons drastically)
[12:36:54] workmad3: *drasticly...
[12:37:08] mikecmpbll: has joined #RubyOnRails
[12:37:14] workmad3: oh wait, had it right the first time :facepalm:
[12:37:45] sergio_101: has joined #RubyOnRails
[12:39:01] hutch: has joined #RubyOnRails
[12:39:37] adre: has joined #RubyOnRails
[12:39:40] jamo: has joined #RubyOnRails
[12:39:54] lupine: http://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html is probably the relevant documentation for this specific case
[12:40:21] lupine: I am so wrong :D
[12:40:36] lupine: learning learning, learning learning learning
[12:40:40] norc: workmad3: I heard that face palm.
[12:40:42] msyvich: has joined #RubyOnRails
[12:40:55] dstarh: has joined #RubyOnRails
[12:42:09] dblessing: has joined #RubyOnRails
[12:42:57] sk0r: has joined #RubyOnRails
[12:44:45] rikkipitt: has joined #RubyOnRails
[12:47:20] augcesar: has joined #RubyOnRails
[12:48:47] Zadrel: has joined #RubyOnRails
[12:49:13] braincras: has joined #RubyOnRails
[12:51:37] flashpoint9: has joined #RubyOnRails
[12:52:22] xcesariox: has joined #RubyOnRails
[12:52:56] tknz: has joined #RubyOnRails
[12:53:05] adre: has joined #RubyOnRails
[12:54:20] mdw: has joined #RubyOnRails
[12:55:07] moeabdol: has joined #RubyOnRails
[12:56:17] kgrz_: has joined #RubyOnRails
[12:56:48] mdw: Hey Rails people :)
[12:57:16] mdw: I have a simple POST api and I'm wondering, is there anything I need to do to make sure no user input could be bad for the web-server?
[12:57:17] mdw: https://gist.github.com/mattsrobot/b54ccd55efde793e533ccef8182c3139
[12:57:24] blackmesa: has joined #RubyOnRails
[12:58:06] mdw: I check if the type is correct
[12:58:13] mdw: and I don't 'mass assign'
[13:00:36] rvanlieshout: that's about all you can do
[13:00:51] rvanlieshout: but this shouldn't be all in one method
[13:00:57] rvanlieshout: maybe even use strong params
[13:01:08] rvanlieshout: and it's ok to mass assign it to the model
[13:01:12] rvanlieshout: if you sanitized the hash
[13:03:02] mdw: rvanlieshout ahh yeah, I'll read about Strong Params, I saw that mentioned
[13:03:07] dblessing: has joined #RubyOnRails
[13:03:10] mdw: looks like a cleaner way to santize params
[13:03:27] mdw: can strong params check for type? Or should that be handled by the Rails model?
[13:03:41] mdw: i'm guessing I should be using validations in the model
[13:05:02] bbrowning: has joined #RubyOnRails
[13:08:03] ramortegui: has joined #RubyOnRails
[13:08:19] rvanlieshout: when would type be wrong?
[13:08:23] rvanlieshout: or what effect would it have?
[13:10:11] mdw: rvanlieshout well, I guess if someone trying to hack the server
[13:10:23] rvanlieshout: but all params are strings
[13:10:41] mdw: yes, they are :)
[13:11:09] Sashimi: quick question : do i need to learn ruby before learning RoR ?
[13:11:18] rvanlieshout: Sashimi: preferrably
[13:11:25] rvanlieshout: at least some
[13:11:25] lupine: it'll make a lot more sense if you do
[13:11:38] lupine: do people still recommend _why's poignant guide?
[13:11:50] rvanlieshout: i don't know about that guide :)
[13:11:55] aegis3121: has joined #RubyOnRails
[13:12:04] mdw: Sashimi not in my experience (I'm learning ruby + rails), you can learn ruby whilst learning rails at the same time.
[13:14:18] k3dare: has joined #RubyOnRails
[13:14:22] Mia: has joined #RubyOnRails
[13:14:22] Mia: has joined #RubyOnRails
[13:14:22] mdw: rvanlieshout probably over thinking this
[13:14:50] mdw: rvanlieshout but the credentials stored on the server are important, so, worth thinking about :)
[13:16:42] Sashimi: just installed ruby on my osx box
[13:16:44] mdw: rvanlieshout http://rails-sqli.org
[13:17:18] mdw: params[:id] = "admin = 't'"
[13:17:18] mdw: User.find_by params[:id]
[13:17:33] Sashimi: i'm having a hard time figuring out how to set the brew installed version (2.3.1) as the default version. ruby -v still gives me the 2.0.0 version (osx preinstalled)
[13:17:36] rvanlieshout: mdw: rails handles that
[13:17:43] Sashimi: any idea guys ?
[13:17:57] rvanlieshout: we use vagrant + puppet here for development
[13:18:08] rvanlieshout: so not using my local ruby
[13:18:43] rvanlieshout: mdw: and calling like that triggers a warning / errors these days iirc
[13:18:47] rvanlieshout: it's find_by foo: params[:id]
[13:19:13] rvanlieshout: User.order("#{params[:sortby]} ASC")
[13:19:18] rvanlieshout: that's just dumb imho
[13:19:23] rvanlieshout: order should accept plain sql
[13:19:47] mdw: rvanlieshout I've not seen any warnings in my project. Is there a way I can double check these warnings are being output?
[13:20:06] JakFrist: has joined #RubyOnRails
[13:20:07] rvanlieshout: i would expect them to be visible in your test suite or plain logs
[13:20:40] mdw: ok, I've not seen them in either
[13:21:41] frem_: has joined #RubyOnRails
[13:22:01] rvanlieshout: apparently it doesn't output anything
[13:22:12] qejk: has joined #RubyOnRails
[13:22:23] tjbiddle: has joined #RubyOnRails
[13:22:59] kitsuneyo: has joined #RubyOnRails
[13:23:34] hahuang62: has joined #RubyOnRails
[13:24:01] moeabdol: has joined #RubyOnRails
[13:24:05] kitsuneyo: if a country has_many :user_profiles and a user_profile belongs_to a user, what's the best way to define the relationship between country and users? can i say a country has_many :users through: :user_profiles
[13:24:20] rvanlieshout: exactly like that
[13:24:38] kitsuneyo: awesome, thanks rvanlieshout
[13:25:48] rvanlieshout: you're welcome
[13:26:24] k3rn31: has joined #RubyOnRails
[13:26:52] Malgorath: has joined #RubyOnRails
[13:27:05] kitsuneyo: another question. is it possible to use ajax methods within a Wicked gem wizard form?
[13:27:23] rvanlieshout: i've never heard of the wicked gem wizard form, but i would expect so
[13:27:41] kitsuneyo: it's a gem called Wicked
[13:28:05] ddv: gem for making multistep wizard forms
[13:28:35] sn1ff3r: has joined #RubyOnRails
[13:28:36] rvanlieshout: but why would you expect it not to be available?
[13:28:46] kitsuneyo: well, you make a controller for the form, and the id param is used to call the form step
[13:28:56] arup_r: has joined #RubyOnRails
[13:29:15] Malgorath: I have a gist of my migration I'm working with, https://gist.github.com/malgorath/1fc85cd3dbcb249c7dacd66fabdcf601 My question is, I have t.belongs_to :user, index: true I was going to replace the t.integer :owner but I also want to have the :completed_by field to reference a user. Is there a way to setup field names on the t.belongs_to ?
[13:29:36] rvanlieshout: you mean an actual foreign key in the db?
[13:29:38] kitsuneyo: rvanlieshout, with the ajax method i'm using, the id is used to call the ajax action. there's a clash
[13:29:44] rvanlieshout: and i would use :completed_by_user_id
[13:29:49] rvanlieshout: just to make it obvious
[13:30:01] rvanlieshout: kitsuneyo: so what fails?
[13:30:04] sameerynho: has joined #RubyOnRails
[13:30:21] kitsuneyo: the wicked gem. it says the form step is nil and there's a 500 error
[13:30:28] syndikate: has joined #RubyOnRails
[13:30:37] rvanlieshout: only by setting remote: true ?
[13:30:48] Malgorath: Or do I need to use a to add_foreign_key :completed_by, :users ?
[13:30:54] quazimodo: has joined #RubyOnRails
[13:31:32] Robtop__: has joined #RubyOnRails
[13:31:43] bbrowning: has joined #RubyOnRails
[13:31:57] kgrz: has joined #RubyOnRails
[13:32:02] rvanlieshout: if you want a foreign key, yes
[13:32:08] Malgorath: >.< nvm FK was the answer
[13:32:26] kitsuneyo: i'm not sure if remote: true is an option since the ajax call is made from a coffeescript with $.ajax
[13:32:48] rvanlieshout: then we need more info on what you've done to help you with your issue
[13:33:09] allcentury: has joined #RubyOnRails
[13:34:25] darutoko: has joined #RubyOnRails
[13:34:53] wilsonc91: has joined #RubyOnRails
[13:35:35] alfiemax: has joined #RubyOnRails
[13:35:40] kitsuneyo: ok. let me try to get a gist together
[13:36:17] marahin: Is it anyhow possible to add a class to simple_form's collection_select w/o modifying any files (so, inline)?
[13:36:36] marahin: I've tried input_html: { class: ... }, wrapper_html: { class: ... }, nothing so far
[13:36:45] rvanlieshout: what's the full line of code?
[13:37:03] yellow5: has joined #RubyOnRails
[13:38:14] marahin: rvanlieshout, = form.collection_select :organization_id, current_user.organizations, :id, :name, input_html: { class: 'form-control' }
[13:38:49] marahin: according to some SO question, they say I need to modify the simple_form library in order to add some default classes, but that's kinda insane imvho
[13:38:58] marahin: by insane I mean that it shouldn't be that way :'(
[13:39:00] mdw: has joined #RubyOnRails
[13:39:53] rvanlieshout: marahin: could you also perform a =form.method(:collection_select).source_location
[13:39:58] rvanlieshout: want to see where that method is defined
[13:40:05] marahin: sure, one moment
[13:40:38] marahin: gems/actionview-4.2.5.1/lib/action_view/helpers/form_options_helper.rb", 788
[13:40:51] marahin: rvanlieshout, ^ (I cut home path and .rbenv directories)
[13:40:59] rvanlieshout: so it's collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
[13:41:14] rvanlieshout: = form.collection_select :organization_id, current_user.organizations, :id, :name, {}, class: '...'
[13:41:18] rvanlieshout: or { class: '...' }
[13:41:56] marahin: rvanlieshout, I'll try both cases then, thank you
[13:42:15] marahin: (also it seems that SO answers are kinda outdated? or I'm not good enough at reading)
[13:42:26] rvanlieshout: i don't use so :)
[13:42:52] xcesariox: has joined #RubyOnRails
[13:43:59] marahin: rvanlieshout, I see :).
[13:44:13] marahin: Yay, that empty hash did the trick - form.collection_select :organization_id, current_user.organizations, :id, :name, {}, class: 'form-control' works like a charm
[13:44:21] marahin: thank you very much!
[13:44:40] rvanlieshout: you're welcome
[13:44:53] aegis3121: has joined #RubyOnRails
[13:44:58] diegoaguilar: has joined #RubyOnRails
[13:45:15] bonswouar: has joined #RubyOnRails
[13:46:13] ddv: hi rvanlieshout. :)
[13:49:06] ekinmur: has joined #RubyOnRails
[13:49:59] conta: has joined #RubyOnRails
[13:51:02] dblessing: has joined #RubyOnRails
[13:51:40] conta: so I have `CartsController` with action `update`. in routes I have `resources :carts, only: [:create, :update]`. in view: <%= form_for(@cart,remote: true) do |f| %>
[13:52:03] conta: but the the form it creates is: "/carts.13"
[13:52:09] conta: what am I doing wrong?
[13:52:55] rvanlieshout: got multiple carts entries in routes?
[13:53:40] conta: yeah, I have: `get '/cart', to: 'carts#show', as: 'cart'`
[13:54:06] DoubleMalt: has joined #RubyOnRails
[13:54:21] Ergo__: has joined #RubyOnRails
[13:54:23] hutch: has joined #RubyOnRails
[13:55:05] rvanlieshout: before or after?
[13:56:06] rvanlieshout: oh. that doesn't matter
[13:56:12] rvanlieshout: it's the as: 'cart'
[13:56:16] rvanlieshout: form_For uses cart_path
[13:57:05] conta: and if I try <%= form_for(@cart,url: {action: "update"}, remote: true) do |f| %> I'm getting No route matches {:action=>"update", :controller=>"carts"}
[13:57:59] blackmesa: has joined #RubyOnRails
[13:58:31] dionysus69: has joined #RubyOnRails
[13:59:21] JakFrist: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[14:00:37] roshanavand: has joined #RubyOnRails
[14:00:39] conta: <rvanlieshout> should I try to get rid of as: cart one? I'm really confused what's going on
[14:01:36] czerasz: has joined #RubyOnRails
[14:01:52] rvanlieshout: might be better, or give it a different name
[14:03:14] Osmosis311: has joined #RubyOnRails
[14:04:12] Osmosis311: has joined #RubyOnRails
[14:04:16] soroot: has joined #RubyOnRails
[14:06:14] conta: <rvanlieshout> I renamed it, but now I gets: No route matches {:action=>"update", :controller=>"carts"} missing required keys: [:id]
[14:06:49] epochwolf: Are tests supposed to run in random order?
[14:07:10] gingray: has joined #RubyOnRails
[14:07:12] epochwolf: In rails 4.
[14:07:13] rvanlieshout: epochwolf: yes
[14:07:23] Oliphaunte: has joined #RubyOnRails
[14:07:54] Osmosis311: has joined #RubyOnRails
[14:08:28] epochwolf: rvanlieshout: is there a way to disable that?
[14:08:53] epochwolf: Random order is causing random breaking tests and I don't have time to fix that.
[14:09:13] epochwolf: I'm in the middle of a Rails 3 -> Rails 4 upgrade.
[14:10:03] Oliphaunte: has joined #RubyOnRails
[14:10:46] mdw: has joined #RubyOnRails
[14:12:16] wmoxam: epochwolf: http://stackoverflow.com/questions/29991869/how-do-you-specify-the-exact-order-of-minitest-tests
[14:16:19] epochwolf: wmoxam: thanks, looks like I stick ActiveSupport::TestCase.test_order = :alpha in my test helper.
[14:17:49] AdamOnRails: Question: every time I add a new public method to my controller (with matching view.html.erb), do I need to add a new line to my routes file?
[14:17:58] arup_r: epochwolf: http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#ordering-of-test-cases
[14:18:03] epochwolf: AdamOnRails: only if you want it to work.
[14:18:11] AdamOnRails: Haha, cheers.
[14:18:21] AdamOnRails: I swear I didn't have to do this 6 years ago.
[14:19:04] AdamOnRails: wasn't there just like a catchall one... eg..... get :controller/:action
[14:19:08] epochwolf: AdamOnRails: you didn't, the default route :controller/:action/:id was a thing.
[14:19:27] epochwolf: Everyone has since realized that was a bad idea.
[14:19:42] AdamOnRails: Ah, thought so. What was bad about it out of curiosity?
[14:19:45] epochwolf: GET admin/delete_user/4 would work.
[14:20:03] AdamOnRails: ah, url trickery
[14:20:30] SteenJobs: has joined #RubyOnRails
[14:20:40] epochwolf: It just wasn't a good idea to expose every controller action to the public.
[14:20:56] epochwolf: Even if you had access controllers on them.
[14:21:14] AdamOnRails: Fair enough, I guess. Surely you could just secure the access?
[14:21:37] AdamOnRails: Ah well, if this is the way its done now, this is the way I'll do it.
[14:22:21] maxx88: has joined #RubyOnRails
[14:23:03] chouhoulis: has joined #RubyOnRails
[14:23:21] cd83x: has joined #RubyOnRails
[14:23:22] blackmes1: has joined #RubyOnRails
[14:23:41] srinidhi: has joined #RubyOnRails
[14:23:54] fox_mulder_cp: 6 minutes to start falcon 9
[14:24:09] jenrzzz: has joined #RubyOnRails
[14:24:09] jenrzzz: has joined #RubyOnRails
[14:24:31] chouhoulis: has joined #RubyOnRails
[14:25:24] fox_mulder_cp: AdamOnRails: use pundit gem for policying access for anonymous/registered/admins ^)
[14:25:40] safetypin: has joined #RubyOnRails
[14:27:55] lurch_: has joined #RubyOnRails
[14:28:36] lurch_: hi, how can one catch a response problem in respond_to when for example the client has aborted the connection while the request is running?
[14:28:44] Guest60: has joined #RubyOnRails
[14:30:43] lurch_: the issue we face is that the client issues a POST to some endpoint (eg: /a/b) which inserts some stuff in the DB and redirects the client to some other url. Now we see that at times the client aborts the connection and automatically tries to reissue the same POST request (browser?) within a few milliseconds, resulting in duplicate data in the db
[14:31:06] lurch_: we would somehow like to rollback when the client aborted
[14:32:22] ddv: lurch_: you can't use validations?
[14:32:56] eljimbo: has joined #RubyOnRails
[14:33:32] epochwolf: lurch_: The problem is your front end (nginx/apache) is handling the aborts. They don't pass the abort to the backend.
[14:34:38] epochwolf: My recommendation is to just deal with double posts. Expect it, code accordingly.
[14:35:11] rafaelfranca: has joined #RubyOnRails
[14:35:11] rafaelfranca: has joined #RubyOnRails
[14:37:01] adavia: has joined #RubyOnRails
[14:38:41] startupality: has joined #RubyOnRails
[14:39:07] Dimik: has joined #RubyOnRails
[14:39:20] fsteim: has joined #RubyOnRails
[14:39:33] tjohnson: has joined #RubyOnRails
[14:40:41] soroot: has joined #RubyOnRails
[14:41:13] polishdub: has joined #RubyOnRails
[14:41:20] alfiemax: has joined #RubyOnRails
[14:41:45] fox_mulder_cp: i recommend search for duplication before inserting new
[14:42:41] fox_mulder_cp: may be scope for a 2 last minutes posts and checking it's content/topic etc
[14:43:25] fox_mulder_cp: why two minutes -> user may be repost some, which was posted some days, weeks or years ago
[14:44:09] fox_mulder_cp: repost by copypaste, not as linking such as facebook 'year ago' events
[14:47:06] Kingdutch: has joined #RubyOnRails
[14:49:42] msyvich: has joined #RubyOnRails
[14:49:49] crameth: has joined #RubyOnRails
[14:49:56] Kingdutch: If I offer a subscription, one time order (trial) and a gift version of a package. The neatest way would be to have /{try,subscribe,gift}/:package. What would be the best way to organize the code? An OrderController with a gift, subscribe and try method or three different controllers with a new method?
[14:50:55] Kingdutch: One of the patterns that Rails seems to enforce is to not create methods other than CRUD which leads me to the latter solution but that feels less DRY.
[14:51:36] ddv: Kingdutch: Just store subscriptions with a status/type whatever field
[14:52:30] sameerynho: has joined #RubyOnRails
[14:52:54] Kingdutch: ddv: Right, but then I still need to handle the routing somehow. Would it be possible to pass an argument depending on the route so the same controller method could even be used?
[14:54:52] Niham: has joined #RubyOnRails
[14:54:55] JesseH2: has joined #RubyOnRails
[14:55:53] startupality: has joined #RubyOnRails
[14:56:19] Moeh: has joined #RubyOnRails
[14:56:32] Niham: has joined #RubyOnRails
[14:56:52] dionysus69: has joined #RubyOnRails
[14:57:09] agent_white: has joined #RubyOnRails
[14:58:04] Niham: has joined #RubyOnRails
[14:59:47] Niham: has joined #RubyOnRails
[15:01:17] Niham: has joined #RubyOnRails
[15:03:27] Niham: has joined #RubyOnRails
[15:06:11] lurch_: has joined #RubyOnRails
[15:06:32] lurch_: ok, thx for the input guys
[15:08:00] ksoze: has joined #RubyOnRails
[15:08:27] alfiemax: i'm using paperclip and trying to upload to S3
[15:08:45] alfiemax: but i'm getting `Permission denied @ dir_s_mkdir - /images`
[15:08:57] pawnbox: has joined #RubyOnRails
[15:10:28] alfiemax: this is my paperclip config, set as an initializer, https://gist.github.com/alfie-max/23b926ebff923e5bd99da3e2640a07c7
[15:11:16] Kingdutch: ddv: Thanks for the push! :D I solved it like this: https://gist.github.com/anonymous/9f9ec9a18ef75c6e5e7ca3426a364878
[15:11:54] alfiemax: seems like it's still trying to store the file in the local system instead of S3
[15:11:56] andywww: has joined #RubyOnRails
[15:12:33] andywww: i’m having problems with a really long load time for an RVM managed ruby installation on a mac
[15:12:38] hirvi: alfiemax: it stores it temporarily in the local system but you're pointing it to a dir at the system root.
[15:12:46] andywww: activitymonitor isn’t proving that useful
[15:12:47] pawnbox: has joined #RubyOnRails
[15:13:04] diegoviola: has joined #RubyOnRails
[15:13:06] andywww: how can i see where it is hanging when the ruby command is run?
[15:13:09] cschneid: has joined #RubyOnRails
[15:13:33] alfiemax: hirvi, how can i change the dir then? maybe to /tmp or /app_dir/tmp ?
[15:13:49] hirvi: "#{Rails.root}/:class/:id_partition/:style/:filename" might work. not 100% sure though.
[15:13:52] andywww: i’m trying to run dtrace and dtruss but apple block monitoring methods
[15:14:38] sameerynho: has joined #RubyOnRails
[15:15:03] andrew-l: has joined #RubyOnRails
[15:16:08] andrew-l: Hi - I'm trying to write a rails runner script, but I'm not sure if it's working. Are there better resources for rails runner than the official documentation? The official docs are quite... dry.
[15:16:21] podman: Hi there! I'm wondering how useful / needed ip spoofing checking really is. We're seeing a few users run into this and the only solution for them would be to disable the check. Is ip spoofing something I should be worried about?
[15:19:43] Guest60: has joined #RubyOnRails
[15:24:20] hahuang62: has joined #RubyOnRails
[15:24:52] nickenchuggets: has joined #RubyOnRails
[15:25:28] jenrzzz: has joined #RubyOnRails
[15:25:34] epochwolf: podman: whats your server setup?
[15:26:07] epochwolf: Do you use nginx with the passenger module or nginx using proxy_pass?
[15:26:15] podman: epochwolf: internet -> AWS ELB -> nginx -> unicorn with proxy_pass
[15:26:50] jgt2: has joined #RubyOnRails
[15:27:58] SteenJobs: where do i put an mp4 asset? it’s not displaying in my view, yet the server isn’t throwing an error so it definitely knows where the asset is
[15:28:07] epochwolf: podman: make sure nginx is configured to set X-Forwarded-For correctly.
[15:28:17] jancel: has joined #RubyOnRails
[15:28:29] podman: epochwolf: i have `poxy_set_header X-Forwarded-For $proxy_add_x_forwaded_for;`
[15:28:53] epochwolf: I'll keep looking
[15:29:08] ferr1: has joined #RubyOnRails
[15:29:16] podman: epochwolf: this is a pretty rare occurrence. but we do have a potentially big client that can't access our site because their proxy must be configured incorrectly
[15:30:16] ferr1: Hey would I put empty strings and nils to the end of order? Nulls last works fine for postgresql, but what about empty strings?
[15:31:10] smathy: has joined #RubyOnRails
[15:31:29] workmad3: podman: if you also configure nginx to drop any existing `X-Forwarded-For` headers for your upstream, you should be safe to turn off the ip-spoof checks in your rails app
[15:32:05] epochwolf: workmad3: remote ip would be the load balancer then.
[15:32:22] workmad3: epochwolf: oh, I missed that ELB was in there :(
[15:32:33] workmad3: yeah, that causes an issue...
[15:33:11] epochwolf: https://github.com/phinze/writeheavy.com/blob/master/_posts/2011-07-31-when-its-ok-to-turn-of-rails-ip-spoof-checking.markdown
[15:33:14] darutoko-: has joined #RubyOnRails
[15:33:32] podman: epochwolf: yeah, i saw that. it didn't seem to give conclusive guidance either way
[15:34:28] podman: unless that's just saying we can trust our proxy (ELB in this case)
[15:34:36] arup_r: ferr1: http://stackoverflow.com/questions/7621205/sort-null-values-to-the-end-of-a-table :)
[15:34:40] epochwolf: podman: have nginx nuke the Client-IP header if the traffic is from your big client?
[15:34:41] workmad3: podman, epochwolf: do you happen to know if ELB forwards requests through private network IPs? So the upstream is reliably on something like the `10.0.0.0/8` network?
[15:34:43] suchness: has joined #RubyOnRails
[15:35:01] arup_r: ok, I see you know null handling..
[15:35:09] podman: workmad3: to the best of my knowledge, no?
[15:35:36] arup_r: ferr1: http://stackoverflow.com/a/6788202/2767755 :)
[15:35:47] epochwolf: Actually, here's an idea.
[15:36:12] epochwolf: Have nginx take the first IP it gets from the X-Forwarded-For header and drop everything else.
[15:36:32] workmad3: podman: ah, shame... we got around some of these sorts of issues at my company by using the real-ip module in nginx to grab the IP address from `X-Forwarded-For` by trawling back through it, ignoring load-balancer IPs (which are all private networks for us)
[15:36:39] epochwolf: That'll be the IP the load balancer is seeing.
[15:36:44] workmad3: epochwolf: that's insanely spoofable
[15:37:15] workmad3: epochwolf: unless the load balancer is reliably dropping existing `X-Forwarded-For` headers
[15:37:16] epochwolf: workmad3: No, just use the IPs that the localbalancer is seeing for it's connection.
[15:37:25] epochwolf: loadbalacner*
[15:37:45] workmad3: epochwolf: right... that'll be the *last* item in `X-Forwarded-For` after ignoring the load balancer IP though... not the first entry
[15:37:48] suchness: laodbalncer*
[15:37:54] epochwolf: workmad3: whoops, that.
[15:38:45] workmad3: epochwolf: that's why I was asking about the IP addresses for the load balancers :) because the real-ip module implements that for you, but you need to tell it which networks it can trust `X-Forwarded-For` to be reliable from
[15:38:59] podman: i guess the real question is, do i need to worry about IP Spoofing?
[15:39:08] epochwolf: podman: yes :(
[15:39:17] workmad3: podman: are you doing anything like IP-address based access, geolocation, etc.?
[15:39:28] epochwolf: Or throttling
[15:39:37] workmad3: oh, yeah... ip-based rate limits
[15:39:40] macsteps: has joined #RubyOnRails
[15:39:43] podman: well the throttling is taking place in nginx
[15:39:50] lurch_: has left #RubyOnRails: ()
[15:39:55] podman: not rails (although that might change)
[15:40:21] workmad3: podman: how are you establishing the ip address in nginx for rate limiting?
[15:40:36] epochwolf: Then I'd configure nginx to drop the Client-ID header and limit X-Forwarded-For to the last entry plus the load balancer's IP.
[15:40:51] podman: workmad3: $binary_remote_addr
[15:41:04] workmad3: podman: err... you know that'll be the load balancer, not the remote client, right?
[15:41:22] workmad3: podman: unless you're already playing with the real-ip module...
[15:41:25] podman: workmad3: no, it's the remote client IP (at least it is in practice)
[15:41:34] podman: not sure what ELB is doing with headers
[15:41:49] podman: http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/x-forwarded-headers.html
[15:42:02] workmad3: podman: $binary_remote_addr pays no attention to headers unless you use the real-ip module to set it from headers
[15:42:25] workmad3: podman: so unless you have extra config, it's always the load balancer
[15:42:32] podman: real_ip_header X-Forwarded-For;
[15:42:43] podman: i have that in my http block
[15:42:44] eserror: has joined #RubyOnRails
[15:42:56] workmad3: podman: ok... and you also have config to tell it to trust the header from ELB?
[15:43:38] podman: yeah, set_real_ip_from is set
[15:44:04] workmad3: podman: ok... in that case, why not just set `X-Forwarded-For` to `$remote_addr` and trash the existing values? :)
[15:44:14] podman: workmad3: dunno
[15:44:32] podman: so, basically ignore the proxy chain?
[15:44:38] workmad3: podman: because you're already grabbing the last value from that header (excluding trusted proxies) :)
[15:45:00] podman: workmad3: in that case, is it any different than turning off ip_spoof_check in rails?
[15:45:49] podman: actually, in this case i think the spoof check would still fail
[15:46:08] workmad3: podman: you should also probably make sure you set the other proxy options to that address
[15:46:20] workmad3: podman: `Client-IP` for example...
[15:46:38] rubyonrails757: has joined #RubyOnRails
[15:47:05] rubyonrails757: Can anyone help me figure out why a variable isn't showing on a view? The following works in rails console, but doesn't show up in the view. https://gist.github.com/rivacom/f626ded43eba007029778a50b4a6d395
[15:47:17] workmad3: podman: basically, once you're in nginx and have determined the IP address that hit ELB (which your `set_real_ip` config is doing), that's the only info you want to trust... anything else could have been set manually by someone spoofing their IP address
[15:47:38] stardiviner: has joined #RubyOnRails
[15:47:54] podman: so client-ip is set to something like 172.x.x.x and x-forwarded-for is set to '172.x.x.x, 217.x.x.x, 217.x.x.x1'.
[15:48:13] podman: but it should be the right most address it's checking against, correct?
[15:48:25] podman: is their proxy just a piece of crap?
[15:48:25] workmad3: podman: e.g. `curl https://your-site.com/foobar -H "X-Forwarded-For: 40.80.160.255" -H "Client-IP: 11.22.33.44"`
[15:48:54] cd83x: has joined #RubyOnRails
[15:49:05] aantix: has joined #RubyOnRails
[15:49:15] workmad3: podman: `Client-IP` is a header that some proxies set (but not all)
[15:49:18] cd83x: has joined #RubyOnRails
[15:49:42] podman: workmad3: right. and that is what rails is checking for a spoofing attack
[15:49:57] workmad3: podman: but it's when both X-Forwarded-For and Client-IP are set that I've noticed issues with rails spoof checks... and it's normally tracable to them using a proxy that uses Client-
[15:50:10] workmad3: Client-IP and everything else semi-standardising on X-Forwarded-For
[15:50:25] podman: yeah, in this case it's a websense proxy
[15:51:05] workmad3: podman: so if you've got something reliably grabbing the IP that hit ELB, I'd say you're safe to trash the existing Client-IP and X-Forwarded-For headers and set your own in nginx based on the IP you've gotten :)
[15:51:28] epochwolf: podman: let me guess, they don't want to whitelist your site. :)
[15:52:07] podman: epochwolf: haven't even gotten to deal with their IT department yet
[15:52:19] podman: just trying to see if we can make this easy for them
[15:52:40] asheinfeld: has joined #RubyOnRails
[15:52:54] podman: workmad3: so, change: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; to proxy_set_header X-Forwarded-For $remote_addr; is what you're saing?
[15:52:59] davidw: has joined #RubyOnRails
[15:53:32] workmad3: podman: that looks about right... you have a staging environment to check this out in before applying to the main site, right?
[15:53:43] podman: workmad3: of course
[15:56:47] podman: ok, i actually see what's happening here
[15:56:56] podman: it's pretty weird
[15:57:23] podman: so, the IP address that's being sent is a "trusted" proxy
[15:58:40] syndikate: has joined #RubyOnRails
[15:58:40] podman: i think the solution here would be to just drop the client-ip header
[15:58:57] dmz: has joined #RubyOnRails
[15:59:38] arup_r: has joined #RubyOnRails
[16:00:23] podman: workmad3: epochwolf: what do you guys think? that shouldn't cause any major issues, right?
[16:01:22] epochwolf: I don't think so.
[16:04:08] whathappens: has joined #RubyOnRails
[16:05:52] roamingdog: has joined #RubyOnRails
[16:06:52] syndikate: Hello, if anybody would like to help me with some regular expression (which am using in my rials app) I can share repl.it link
[16:07:22] podman: great, now i just have to figure out how to do that
[16:07:46] jancel: has joined #RubyOnRails
[16:08:21] epochwolf: podman: proxy_set_header Client-Ip ""; I think.
[16:08:21] blackmes1: has joined #RubyOnRails
[16:08:32] podman: epochwolf: cool, yeah, looking into it
[16:08:56] DoctorMonocular: has joined #RubyOnRails
[16:09:04] soroot: he, I'm working on a authentication with bcrypt and mongoid, i'm thought the user controller is pretty straight forward, but it seems to do nothing, not even an error, ideas? https://ptpb.pw/k8F0
[16:09:08] podman: epochwolf: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header
[16:09:13] podman: epochwolf: looks like that's what i want
[16:09:26] epochwolf: podman: setting the header to an empty string also works.
[16:10:00] prithaj: has joined #RubyOnRails
[16:10:18] epochwolf: podman: hide header hides headers from rails, not to rails.
[16:11:06] podman: epochwolf: oh, interesting
[16:11:50] kitsuneyo: i used git reset to go back to a previous commit, then created a new branch, then merged that branch with master. now i can't push master to the repo because it says i need to fast-forward. what do i do to push my master branch as it is?
[16:12:12] epochwolf: kitsuneyo: --force but that will delete the upstream changes.
[16:12:21] nettoweb: has joined #RubyOnRails
[16:12:28] podman: epochwolf: yep, you're correct :) http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header
[16:12:42] kitsuneyo: what do you mean by upstream changes?
[16:12:54] epochwolf: podman: of course I'm correct. ;)
[16:13:25] epochwolf: kitsuneyo: any changes on the master branch of the remote end will be erased if you force.
[16:13:35] kitsuneyo: you mean the commits that i reset from?
[16:13:48] kitsuneyo: ok, i don't mind about that
[16:13:57] epochwolf: I hope you aren't working with other people.
[16:14:10] epochwolf: Then go for it. :)
[16:14:33] epochwolf: Editing remote history other people may be relying on it generally not a good thing.
[16:15:25] ferr1: https://gist.github.com/Fercell/7001f2a383c0d3d273a913f047bd91cd any ideas why I can't use NULLIF function with selected attribute?
[16:15:45] kitsuneyo: thanks epochwolf
[16:18:52] epochwolf: kitsuneyo: you're welcome. :)
[16:20:11] kitsuneyo: i'm thinking of using an :id and a :slug in the routes for the show action of a model. so it's like: people/234/john-smith. i guess i just need to define the routes and pass both params when linking, eh?
[16:20:27] pawnbox: has joined #RubyOnRails
[16:22:11] t4nkD: has joined #RubyOnRails
[16:22:26] smathy: kitsuneyo, more common to use to_param to make something like /people/234-john-smith
[16:22:44] kitsuneyo: i see smathy, that sounds interesting
[16:23:14] smathy: kitsuneyo, or a gem like friendly_id
[16:23:25] jyraff: has joined #RubyOnRails
[16:23:33] kitsuneyo: i was using def to_param -> slug before, when i just had the slug in the url
[16:23:41] kitsuneyo: i didn't know you could use it that way
[16:23:57] kitsuneyo: i can do without learning another gem right now
[16:24:39] smathy: kitsuneyo, the other advantage to using something like 234-john-smith is that "234-john-smith".to_i => 234
[16:25:13] kitsuneyo: i was thinking more like 234/john-smith, with a /
[16:25:39] B1n4r10: has joined #RubyOnRails
[16:25:47] smathy: I know you were.
[16:25:47] epochwolf: either one works
[16:25:58] epochwolf: The slug url requires more work.
[16:27:59] aantix: has joined #RubyOnRails
[16:28:57] kitsuneyo: i already have a slug column, so does this look ok for to_params: [id, slug].join("/") ... (as per https://gist.github.com/jcasimir/1209730)
[16:29:10] jhack: has joined #RubyOnRails
[16:30:02] podman: epochwolf: workmad3: alright, have that running in production. seems like people's correct IP address is still being set and no more ipspoofing false positives
[16:30:50] epochwolf: podman: huzzah!
[16:31:02] kitsuneyo: i guess not... >.<;;
[16:31:06] podman: epochwolf: sometimes i hate the internet
[16:31:26] epochwolf: podman: I have a love-hate relationship with the internet. And humanity in general.
[16:31:41] podman: sounds about right
[16:35:02] cschneid: Is there a view-helper object like cycle that lets me say: "I want this to be false, then true, then false forever"
[16:35:10] cschneid: I have to highlight the 2nd thing in a loop
[16:37:37] ksoze: has joined #RubyOnRails
[16:37:40] smathy: kitsuneyo, there's a lot more work if you want to use a / - especially if you also have an edit route.
[16:38:14] podman: cschneid: use CSS instead?
[16:38:23] kitsuneyo: my edit routes is handled by a different controller altogether
[16:38:36] cschneid: podman: heh, probably easiest. nth-child(2)
[16:38:44] podman: cschneid: yep
[16:38:56] kitsuneyo: so it's not a problem, i only need show
[16:39:12] moeabdol: has joined #RubyOnRails
[16:39:52] polyidus: has joined #RubyOnRails
[16:41:41] arup_r: has joined #RubyOnRails
[16:42:26] manfrin: has joined #RubyOnRails
[16:43:50] [Butch]: has joined #RubyOnRails
[16:45:00] JakFrist: has joined #RubyOnRails
[16:46:07] kitsuneyo: what does to_param do anyway? does it just set what gets sent as the id param?
[16:47:36] smathy: kitsuneyo, http://devdocs.io/rails~4.2/activerecord/integration#method-i-to_param
[16:48:53] kitsuneyo: ok smathy, so it sends the name of the param as well
[16:49:51] kitsuneyo: do you have any links on how to use the / in the URL? i couldn't find anything so far
[16:51:08] sameerynho: has joined #RubyOnRails
[16:51:27] Coldblackice: has joined #RubyOnRails
[16:51:47] edwinvdgraaf: has joined #RubyOnRails
[16:52:34] pilne: has joined #RubyOnRails
[16:52:49] whathappens: has joined #RubyOnRails
[16:53:10] AdamOnRails: Alright here's a conceptual question regarding model associations
[16:54:12] AdamOnRails: I have a model Site that has_many Products.
[16:54:21] jetpackjoe: has joined #RubyOnRails
[16:54:48] Oliphaunte: has joined #RubyOnRails
[16:54:51] AdamOnRails: Each site can select which products they wish to stock. So the join table would look like... id/site_id/product_id
[16:55:05] smathy: kitsuneyo, there be dragons, just use the style I've recommended.
[16:55:42] kitsuneyo: yeah i guess to smathy
[16:55:47] soroot: has joined #RubyOnRails
[16:55:53] AdamOnRails: However, while the product has a default cost, each site may have a customised cost for that product. I'd like the join table to look like.... id/site_id/product_id/custom_cost
[16:56:06] AdamOnRails: is this possible / viable?
[16:56:41] AdamOnRails: Apologies for multi-line question.^^
[16:56:47] rueben: has joined #RubyOnRails
[16:57:48] jas02: has joined #RubyOnRails
[16:59:03] chopin: has joined #RubyOnRails
[16:59:25] smathy: AdamOnRails, yes, look at has_many :through associations: http://guides.rubyonrails.org/association_basics.html
[17:01:11] mikecmpbll: has joined #RubyOnRails
[17:01:59] jxf: has joined #RubyOnRails
[17:02:15] Meow-J: has joined #RubyOnRails
[17:02:32] whathappens: has joined #RubyOnRails
[17:02:51] Travis-42: has joined #RubyOnRails
[17:04:24] AdamOnRails: Smathy - thanks for that. Bingo.
[17:04:34] hutch: has joined #RubyOnRails
[17:10:19] solars: has joined #RubyOnRails
[17:11:32] mdw: has joined #RubyOnRails
[17:12:29] mdw: has joined #RubyOnRails
[17:14:41] replay: has joined #RubyOnRails
[17:14:42] mdw7: has joined #RubyOnRails
[17:15:01] flashpoint9: has joined #RubyOnRails
[17:15:32] macsteps: has joined #RubyOnRails
[17:15:34] mdw7: has joined #RubyOnRails
[17:15:50] Guest60: has joined #RubyOnRails
[17:16:00] jancel: has joined #RubyOnRails
[17:16:10] aldodelgado: has joined #RubyOnRails
[17:17:28] aldodelgado: Question? I recently changed my database.yml db name and now when I run rake db:drop db:create db:migrate it does not recognize my migration files
[17:17:32] aldodelgado: Any suggestions?
[17:18:39] safetypin: has joined #RubyOnRails
[17:20:55] smathy: aldodelgado, !gist your database.yml AND copy/paste your console session showing you attempting to db:migrate
[17:20:55] helpa: aldodelgado: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:21:30] aldodelgado: https://gist.github.com/aldodelgado/7450034ac3f0881c99bf942af334333b
[17:21:48] rueben: has joined #RubyOnRails
[17:24:14] aegis3121: has joined #RubyOnRails
[17:24:57] diegoviola: let's say I have a model on database foo and another model on database bar, can I still associate them?
[17:25:59] tubbo: diegoviola: give it a shot
[17:26:27] jenrzzz: has joined #RubyOnRails
[17:26:38] tubbo: worst case scenario, you just define the method(s) yourself
[17:30:06] arup_r: has joined #RubyOnRails
[17:33:04] Akuma: has joined #RubyOnRails
[17:33:16] mdw: has joined #RubyOnRails
[17:33:57] aldodelgado: has joined #RubyOnRails
[17:34:18] aldodelgado: smathy: Any suggestions?
[17:34:38] hahuang62: has joined #RubyOnRails
[17:36:08] mikecmpbll: has joined #RubyOnRails
[17:36:34] Oliphaunte: has joined #RubyOnRails
[17:39:15] Guest60: has joined #RubyOnRails
[17:39:19] jancel: has joined #RubyOnRails
[17:39:35] yfeldblum: has joined #RubyOnRails
[17:39:37] cnk: has joined #RubyOnRails
[17:39:50] Dysp: has joined #RubyOnRails
[17:40:06] hirvi: has joined #RubyOnRails
[17:40:27] tubbo: aldodelgado: what are your db/migrate files called?
[17:40:54] Jayson_Virissimo: has joined #RubyOnRails
[17:40:56] tubbo: aldodelgado: check if the timestamp in the filename is less than the current date/time, that's how rails figures out which migrations need to be run
[17:41:19] aldodelgado: tubbo: Normal migrations. I never changed the names of the migrations. And to answer your question it is
[17:41:50] tubbo: so maybe schema_migrations thinks you have already run them? try dropping the schema_migrations db
[17:41:53] tubbo: or table, sorry
[17:42:06] Dysp: I just wanted to hear some opinions about file uploading. At some point I need to implement the ability to upload files to my webapplikation for users. The file is to be read by rails (and my ruby program that will deal with the data), make some calculations and store the data. Not the file. How should I approach this?
[17:42:47] k3rn31: has joined #RubyOnRails
[17:42:48] tubbo: Dysp: which gems are you looking at?
[17:43:03] tubbo: oh wait, you don't want to actually store the file
[17:43:04] tbuehlmann: Dysp: calculations sounds like it could take some time. what about storing the file on the filesystem and let a background job calculate?
[17:43:18] Dysp: I could go with some gems, but I am fond of understanding things.
[17:43:48] tubbo: Dysp: you probably don't need one actually, since you're not worrying about where to store the file. you just want to take in a file uploaded to the server and do something with it in-request, right?
[17:43:48] dannyguk: has joined #RubyOnRails
[17:44:11] Dysp: tbuehlmann: Great point. Even though it is not THAT much data it would probably slow the applikation down, which I guess is not a good idea.
[17:44:34] Dysp: Basicly it's an excel sheet.
[17:44:36] hirvi: has joined #RubyOnRails
[17:44:38] tubbo: Dysp: check out http://guides.rubyonrails.org/form_helpers.html#uploading-files, and 5.1 "What Gets Uploaded". that'll give you some pointers on how to handle it directly.
[17:44:40] tbuehlmann: either do it inside the request-response-cycle, which might take some time and block your application
[17:44:46] tbuehlmann: or follow my first idea
[17:44:57] Dysp: There is no point in storing such a huge file (huge in comparison with the data I need from it)
[17:45:16] Sashimi: has joined #RubyOnRails
[17:45:20] tubbo: Dysp: do you think the file will be analyzed in <15 seconds?
[17:45:37] Dysp: Hm. I am sure about <30 seconds
[17:45:50] tubbo: cutting it a little close to your server timeout there..
[17:45:56] tubbo: or at least the default server timeout in nginx & apache
[17:46:02] wilsonc91: has joined #RubyOnRails
[17:46:19] Dysp: Well, the data will be accessed fairly quickly, the calculations could take some time even though I am trying to improve my script,.
[17:46:35] wilsonc91: If i have an array of objects is there a good way of obtaining the object that has the max of a value? ie, arrayofobjects.max(:field)
[17:46:37] Dysp: I am a complete newbie. Or, lets say newbie in second phase :P
[17:47:20] mdw7: has joined #RubyOnRails
[17:47:28] Dysp: wilsonc91: what are the objects?
[17:47:48] wilsonc91: Rails models
[17:47:56] Dysp: Oh, okay, thats beyond my knowledge.
[17:48:14] tubbo: Dysp: if you think the calculations are gonna take more time than 30 seconds, i'd suggest not doing them within the request-response cycle. best practices would dictate that you _never_ do that, frankly.
[17:48:23] Dysp: Okay, noted!
[17:48:32] Dysp: So how am I to do the calculations?
[17:48:35] tubbo: and the fact that ActiveJob and/or Sidekiq are so easy to set up, it's really easy to just store the file temporarily
[17:48:37] Dysp: "In the background"?
[17:48:52] tubbo: store the file temporarily in your app's 'tmp/' directory or something
[17:49:13] rmerlero: has joined #RubyOnRails
[17:49:30] Dysp: Sure thing.. Can you think of some ressource that might explain how to do this kind of background data processing?
[17:49:41] hahuang62: has joined #RubyOnRails
[17:50:26] hirvi: wilsonc91: Model.order(desired_max_val_column: :DESC).first ?
[17:50:41] diegoviola: how can I get rake db:create to create a new/custom database for me?
[17:50:59] arup_r: wht u mean ? ^
[17:51:26] diegoviola: arup_r: I want to define a new db in config/database.yml, run rake db:create and create the default ones but also a custom one
[17:51:38] soroot: has joined #RubyOnRails
[17:51:45] diegoviola: then I want to tell rails to migrate a specific model to that custom db
[17:54:01] wldcordeiro: has joined #RubyOnRails
[17:54:03] EasyPanicButton: has joined #RubyOnRails
[17:54:41] sameerynho: has joined #RubyOnRails
[17:55:07] flashpoint9: has joined #RubyOnRails
[17:55:22] roamingdog: has joined #RubyOnRails
[17:55:47] mwlang: has joined #RubyOnRails
[17:55:54] dblessing: has joined #RubyOnRails
[17:56:24] EasyPanicButton: /msg NickServ VERIFY REGISTER EasyPanicButton uwevkyftrivf
[17:57:47] mwlang: I’m porting a Rails 1.2 app to Rails 4.x and the customer has started testing the new app. He’s trying to test as two different “sessions” to which I tell him he has to either use private mode or close browser completely and reopen. One thing that’s bothering him is that FF seems to remember session info “too well” and it seems he thought that two tabs meant two sessions.
[17:58:27] mwlang: although I know the correct solution is using private mode, I’m wondering if back in the day circa 2006 / 2007 if two tabs in FF used to be two different sessions. Can anyone remember?
[17:58:37] JakFrist: has joined #RubyOnRails
[17:59:24] wilsonc91: has joined #RubyOnRails
[17:59:40] tubbo: who cares
[17:59:46] tubbo: your client is wrong :P
[17:59:51] suchness: mwlang: considering this https://www.google.ie/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwiupsWMzqrNAhUGKpoKHZRuCtIQFggnMAE&url=https%3A%2F%2Fsupport.mozilla.org%2Fquestions%2F1043093&usg=AFQjCNFp5jDfnaqXM6ENctw5obqqFcdXfg&bvm=bv.124272578,d.bGg I would guess not
[17:59:54] Jayson_Virissimo: mwlang: I used to use FF back then and I don't remember tabs keeping different sessions.
[18:00:02] suchness: Your client is a classic idiot
[18:00:21] dblessing: has joined #RubyOnRails
[18:00:24] tubbo: it's also possible your client was using sites that didn't remember sessions very well
[18:00:31] tubbo: back in the day cookies used to expire easily and such
[18:00:33] suchness: mwlang: You can tell him that from me
[18:01:12] chopin_: has joined #RubyOnRails
[18:01:34] smathy: aldodelgado, no suggestion until you give me what I asked for.
[18:02:15] roamingdog: has joined #RubyOnRails
[18:02:25] mwlang: tubbo: kind of a snobby way to handle a paying client, no? however, this guy is pretty sharp for a non-developer — business analyst type. when I show him with facts instead of just saying “who cares” he’s a lot easier to guide towards the light. ;-)
[18:02:56] chopin_: has joined #RubyOnRails
[18:03:03] tubbo: mwlang: i'm not telling you how to handle your client
[18:03:55] mwlang: just the “who cares” quip. he cares. I care.
[18:04:13] SteenJobs: has joined #RubyOnRails
[18:04:25] mwlang: oh, and suchness’ “classic idiot” quip, too. :-o
[18:05:05] tubbo: well he's a client
[18:05:11] tubbo: he's definitely an idiot ;)
[18:05:28] smathy: mwlang, no, two tabs were never two different sets of cookies.
[18:05:40] roamingdog: has joined #RubyOnRails
[18:05:53] smathy: mwlang, maybe suggest he uses Chrome which has different "users" (with different sets of cookies, history, etc)
[18:06:19] cnk: I don't recall FF behaving that way - though it was pretty easy to have more than one version of FF installed and they behaved as independent browsers.
[18:06:30] mwlang: smathy: I’m mostly steering him towards “here’s how to test with today’s browsers”
[18:06:33] cnk: But the real point is, he can't do that in 2016
[18:06:44] mwlang: and hopefully the “but that’s not how it used to work” argument dies on the vine.
[18:07:22] tubbo: if he's savvy, maybe point him to the same articles you read when you need to know how to test with a browser
[18:07:33] tubbo: i got my client to use keybase :)
[18:09:45] wilsonc91: has joined #RubyOnRails
[18:10:03] smathy: mwlang, right, regardless of whether it was the case in the past (which it wasn't), that's irrelevant.
[18:11:30] mwlang: alright, it was worth asking to hear what others remembered on the topic. keeps me from being “that idiot developer” spewing nonsense/incorrect answers to the client.
[18:12:04] roamingdog: has joined #RubyOnRails
[18:12:51] toydestroyer: has joined #RubyOnRails
[18:12:52] dblessing: has joined #RubyOnRails
[18:12:53] smathy: ACTION imagines the nightmare of doing a tab-open click and having to re-login
[18:13:01] wilsonc91: has joined #RubyOnRails
[18:13:28] whathapp_: has joined #RubyOnRails
[18:14:02] guidocalvano: has joined #RubyOnRails
[18:14:31] dblessing: has joined #RubyOnRails
[18:14:58] maucar: has joined #RubyOnRails
[18:15:17] arup_r: I am still alive! :)
[18:15:30] diegoviola: ok I got my model to work with a separate db connection, but I still need to run a specific migration against that connection... I'm lost
[18:16:45] wilsonc91: has joined #RubyOnRails
[18:17:04] Terens: has joined #RubyOnRails
[18:17:11] mwlang: arup_r: back from vacation?
[18:17:38] hahuang61: has joined #RubyOnRails
[18:17:52] arup_r: mwlang: hi.. how are you? I have no work except watching your interesting chat going on here.. :)
[18:18:26] norc: has joined #RubyOnRails
[18:18:27] arup_r: no one replies to my job applications.. haha .. got bored so came here to see what world is saying.. :)
[18:19:15] Guest60: has joined #RubyOnRails
[18:19:35] mwlang: arup_r: tried upwork.com?
[18:20:00] dblessing: has joined #RubyOnRails
[18:20:25] arup_r: I was trying some remote job portal. Didn't try that. Last time I was offered 10$/hours :( So I was pissed off
[18:20:38] arup_r: but, I will login there now .
[18:23:15] B1n4r10: has joined #RubyOnRails
[18:25:31] chouhoulis: has joined #RubyOnRails
[18:26:08] chouhoulis: has joined #RubyOnRails
[18:27:11] roamingdog: has joined #RubyOnRails
[18:27:13] edwinvdg_: has joined #RubyOnRails
[18:27:53] allcentury: has joined #RubyOnRails
[18:30:03] jas02: has joined #RubyOnRails
[18:31:33] Oliphaunte: has joined #RubyOnRails
[18:31:49] arBmind: has joined #RubyOnRails
[18:32:12] adre: has joined #RubyOnRails
[18:32:54] zave: has joined #RubyOnRails
[18:36:13] wilsonc91: has joined #RubyOnRails
[18:37:21] DoubleMalt: has joined #RubyOnRails
[18:37:42] roamingdog: has joined #RubyOnRails
[18:37:48] yfeldblum: has joined #RubyOnRails
[18:39:00] netzfisch: has joined #RubyOnRails
[18:39:02] choke: has joined #RubyOnRails
[18:43:08] mikecmpbll: has joined #RubyOnRails
[18:43:50] DoctorMonocular: has joined #RubyOnRails
[18:45:50] dannyguk: has joined #RubyOnRails
[18:46:11] wilsonc91: has joined #RubyOnRails
[18:48:52] moeabdol: has joined #RubyOnRails
[18:50:12] roamingdog: has joined #RubyOnRails
[18:50:33] Oliphaunte: has joined #RubyOnRails
[18:51:16] tildes: has joined #RubyOnRails
[18:51:57] macsteps: has joined #RubyOnRails
[18:54:54] roamingdog: has joined #RubyOnRails
[18:55:20] sypheren: has joined #RubyOnRails
[18:56:01] wilsonc91: has joined #RubyOnRails
[18:58:28] LastWhisper____: has joined #RubyOnRails
[19:00:14] eljimbo: has joined #RubyOnRails
[19:00:32] blackmes1: has joined #RubyOnRails
[19:01:01] DoctorMonocular: has joined #RubyOnRails
[19:02:30] ksoze: has joined #RubyOnRails
[19:06:11] yellow5: has joined #RubyOnRails
[19:06:33] roamingdog: has joined #RubyOnRails
[19:07:10] SteenJobs: has joined #RubyOnRails
[19:07:28] kristofferR: has joined #RubyOnRails
[19:07:42] jancel: has joined #RubyOnRails
[19:09:23] alfiemax: has joined #RubyOnRails
[19:09:59] wilsonc91: has joined #RubyOnRails
[19:12:25] ur5us: has joined #RubyOnRails
[19:19:18] rafaelfr_: has joined #RubyOnRails
[19:20:15] wilsonc91: has joined #RubyOnRails
[19:22:25] neha-: has joined #RubyOnRails
[19:23:44] blackmes1: has joined #RubyOnRails
[19:24:59] lightt: has joined #RubyOnRails
[19:28:00] jenrzzz: has joined #RubyOnRails
[19:28:00] jenrzzz: has joined #RubyOnRails
[19:30:55] crova: has joined #RubyOnRails
[19:35:03] crova: Greetings! I have a form for model "A". I want to populate a select list on this form with options from a model "B" created only for that purpose. How can I assign on my select tag, the model which holds the options to select from? A sample of my current .html.erb https://gist.github.com/crova/481e4c662959d31ee34f5b4a79fc9252
[19:39:41] 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.
[19:41:18] alfiemax: crova, what is Model `B`, how is values stored in it?, what attributes does it have?
[19:41:43] sn1ff3r: has joined #RubyOnRails
[19:42:48] fsteim: has joined #RubyOnRails
[19:43:01] crova: alfiemax, 2 columns 'id' and 'deal', with 5 rows containing strings for the same values you can see on the options_for_select on my gist, i'll update witht he schema
[19:43:02] srinidhi: has joined #RubyOnRails
[19:44:52] choke: has joined #RubyOnRails
[19:45:56] emachnic: has joined #RubyOnRails
[19:46:38] dannyguk: has joined #RubyOnRails
[19:47:17] Ergo: has joined #RubyOnRails
[19:49:08] camilasan: has joined #RubyOnRails
[19:49:24] yardenbar: has joined #RubyOnRails
[19:49:26] qejk: has joined #RubyOnRails
[19:49:37] moeabdol: has joined #RubyOnRails
[19:52:59] Malgorath: I'm generating seeds, how do you do a random number with faker? or should I just use rand(1..10).to_i ?
[19:53:00] B1n4r10: has joined #RubyOnRails
[19:53:01] guidocalvano: has joined #RubyOnRails
[19:53:19] dionysus69: has joined #RubyOnRails
[19:53:41] netzfisch: has joined #RubyOnRails
[19:53:41] alfiemax: Malgorath, did you check the docs?
[19:54:21] neha-: hey, how do i serialize an enum to the int value in as_json
[19:54:23] Malgorath: alfiemax, oddly I did look at the docs for faker and found no reference to random numbers
[19:54:40] neha-: right now it prints they key instead of the value / int
[19:54:50] alfiemax: Malgorath, https://github.com/stympy/faker#fakernumber
[19:55:11] alfiemax: look closer
[19:55:24] DoctorMonocular: has joined #RubyOnRails
[19:55:47] Malgorath: alfiemax, perhaps you might look closer, that generates a STRING, I was looking for a generated to_i as stated in my example
[19:56:08] hahuang62: has joined #RubyOnRails
[19:56:09] havenwood: Malgorath: With pry for example `ls Faker` to check out the constants then `ls Faker::Number` to see the methods.
[19:56:36] havenwood: Malgorath: But yeah, give to range what is range's.
[19:56:43] havenwood: Malgorath: rand*
[19:57:03] dannyh: has joined #RubyOnRails
[19:57:05] havenwood: Malgorath: You don't need to #to_i with your rand example.
[19:57:30] havenwood: Malgorath: just plain ole will suffice: rand 1..10
[19:57:42] JakFrist: has joined #RubyOnRails
[19:58:02] edwinvdgraaf: has joined #RubyOnRails
[19:58:03] havenwood: rand(1..10).class #=> rand(1..10).class
[19:58:09] havenwood: rand(1..10).class #=> Fixnum #oops
[19:58:39] havenwood: or in 2.4 #=> Integer # \o/
[19:59:24] Malgorath: ActiveRecord::AssociationTypeMismatch: ProcessListGroup(#124948800) expected, got Fixnum(#17024040) <-- group: rand(1..10),
[20:00:25] Malgorath: Here is the gist of entire seeds file https://gist.github.com/malgorath/607d6ab1a8cc587d924d9f9f9de8279f (This is my first actual seeds file as I usually enter data as I build things)
[20:03:51] spellbook: has joined #RubyOnRails
[20:05:52] jenrzzz: has joined #RubyOnRails
[20:06:26] solars: has joined #RubyOnRails
[20:06:40] djbkd: has joined #RubyOnRails
[20:07:58] dionysus69: has joined #RubyOnRails
[20:09:30] jgt2: has joined #RubyOnRails
[20:11:05] DoctorMonocular: hey, does anyone know if it's trivial to use Prawn to take a given PDF page and cause it to be mirror image or rotated or something?
[20:11:20] DoctorMonocular: as opposed to just rotating a text box?
[20:11:58] neha-: what are the options for as_json ?
[20:12:23] DoctorMonocular: neha: are you talking to me?
[20:12:51] neha-: no just to the room
[20:13:01] PlasmaStar: has joined #RubyOnRails
[20:14:19] DoctorMonocular: neha-: first of all, what class are you talking about? Second of all, why didn't you just look it up in the docs?
[20:18:02] choke: has joined #RubyOnRails
[20:23:37] norc: neha-, my instinct tells me no.
[20:23:50] neha-: yeah i'm looking into jbuilder
[20:23:54] neha-: thanks tho
[20:25:22] spellbook: hi everyone. i was hoping someone could enlighten me on pagination. (i've been looking at the kaminari gem). should pagination be done on the frontend or the backend? i usually build my apps with a js frontend and it feels weird to use both rails and js views.
[20:25:50] epochwolf: spellbook: depending how much data you're paginating.
[20:25:58] epochwolf: depends on*
[20:26:15] epochwolf: If it's 100,000 rows, you aren't doing that on the front end.
[20:27:40] spellbook: epochwolf: my database is currently seeded with 4000. i wanted to paginate an index view of all of them. and eventually render pages of search results.
[20:28:51] epochwolf: spellbook: I'd recommend against paginating on the front end for almost any app.
[20:29:25] edwinvdgraaf: has joined #RubyOnRails
[20:30:38] spellbook: epochwolf: oh. ok. thank you.
[20:32:23] Leepoff: has joined #RubyOnRails
[20:32:50] jenrzzz: has joined #RubyOnRails
[20:33:39] camilasan: has joined #RubyOnRails
[20:34:02] roamingdog: has joined #RubyOnRails
[20:34:04] epochwolf: spellbook: the problem is, you'll probably need to build it and then you can't make it work correctly moving it from the front to the back.
[20:34:20] edwinvdg_: has joined #RubyOnRails
[20:34:37] truenito: has joined #RubyOnRails
[20:37:13] d0nn1e: has joined #RubyOnRails
[20:37:56] DoctorMonocular: has joined #RubyOnRails
[20:39:01] hutch: has joined #RubyOnRails
[20:39:01] choke: has joined #RubyOnRails
[20:43:27] Sashimi: has joined #RubyOnRails
[20:44:08] VeryBewitching: has joined #RubyOnRails
[20:44:32] AmiMoench: has joined #RubyOnRails
[20:45:41] gusrub: has joined #RubyOnRails
[20:46:50] Dreamer3: has joined #RubyOnRails
[20:47:18] dannyguk: has joined #RubyOnRails
[20:48:24] VeryBewitching: Implementing an association between two models, and I expected to have property.basement_finishing_type= defined so I could assign a value to it, but I get a NoMethodError, can someone tell me how I borked this? https://gist.github.com/bewitchingme/841cbed32f3af6a27a99c97a354f4e6e
[20:49:17] alfiemax: has joined #RubyOnRails
[20:49:19] whathappens: has joined #RubyOnRails
[20:49:19] VeryBewitching: I can access property.basement_finishing_type_id just fine (so I can confirm the model has the field to be used for the join)
[20:49:41] dblessing: has joined #RubyOnRails
[20:57:11] jancel: has joined #RubyOnRails
[20:58:09] danostrowski: has joined #RubyOnRails
[20:59:17] dblessing: has joined #RubyOnRails
[20:59:28] macsteps: has joined #RubyOnRails
[20:59:29] danostrowski: hullo. I have an active record snippit that's basically `model.includes({:table_one => :table_two}, :table_three).where.not(something: 'badthing')` ...
[20:59:59] danostrowski: I would expect this to do some joining in the initial query to get all the data out for the included tables, but the .to_sql just shows the initial table being selected out of and no joins.
[21:00:33] roamingdog: VeryBewitching: looks right, you sure property is an instance of Property?
[21:00:56] VeryBewitching: roamingdog: Ya, I can do Property.find(1) and it is indeed a property object
[21:01:02] roamingdog: danostrowski: use '.joins' in there
[21:01:20] jetpackj1: has joined #RubyOnRails
[21:01:51] danostrowski: roamingdog eh... sure, I'll give it a whirl, but isn't .joins supposed to lazy load?
[21:02:28] roamingdog: does Property.find(1).basement_finishing_type work?
[21:03:21] danostrowski: roamingdog: http://guides.rubyonrails.org/active_record_querying.html -> "Solution to N + 1 queries problem"
[21:03:25] roamingdog: VeryBewitching: because it hasn't got a basement_finishing_type?
[21:03:42] VeryBewitching: roamingdog: https://gist.github.com/bewitchingme/059ba07c22e8611a8970be9b958c1bf1
[21:04:05] VeryBewitching: For whatever reason this association is not being created
[21:04:17] SteenJobs: has joined #RubyOnRails
[21:05:14] danostrowski: Interesting. OK, so .joins() produces a query that does the JOINs, but does not select from more than just the original table.
[21:05:23] danostrowski: I'd expect that .includes() to do the joins AND select from the other tables.
[21:05:29] moeabdol: has joined #RubyOnRails
[21:05:30] danostrowski: instead it doesn't even do the JOINs.
[21:05:42] VeryBewitching: danostrowski: A join doesn't select, by default, you have to add fields to your selection from any tables in the associated joins
[21:06:19] VeryBewitching: danostrowski: Sometimes you want to perform a join to determine if a join is possible; you may not need to select data from the table you're joining on
[21:06:20] danostrowski: VeryBewitching, Yeah, that's fine, makes sense with what the docs say... it's the .includes() bit that isn't behaving as I'd expect.
[21:06:31] danostrowski: VeryBewitching yeah, ofc.
[21:07:07] netzfisch: has joined #RubyOnRails
[21:07:42] DoctorMonocular: has joined #RubyOnRails
[21:08:18] roamingdog: VeryBewitching: do you need the class_names there?
[21:08:33] gking: has joined #RubyOnRails
[21:08:47] VeryBewitching: roamingdog: I originally did not have it specified, I was hoping that it would cinch it.
[21:08:53] gking: Does anyone know how to break up a line of code onto multiple lines in the Slim templating language?
[21:08:57] danostrowski: strange. yeah, I tried even a simpler .includes() with just one table and it still doesn't join on anything, let alone select.
[21:09:23] VeryBewitching: danostrowski: Model.joins(:other_model).includes(:other_model)
[21:09:25] diegoaguilar: has joined #RubyOnRails
[21:09:46] roamingdog: VeryBewitching: only necessary if class name is different from what you've already got there i.e. :properties
[21:10:11] whathappens: has joined #RubyOnRails
[21:10:12] jgt2: has joined #RubyOnRails
[21:10:47] VeryBewitching: roamingdog: Ah, that makes sense. Either way the result has been the same, I'm not really sure how to debug this atm. Is it possible to get a list of associations via a method from a model?
[21:10:47] danostrowski: VeryBewitching: hmm, the docs don't indicate you always need both. Odd omission, I guess, and also weird that it needs the .joins specified.
[21:11:40] VeryBewitching: danostrowski: Also note, .includes() uses the association name, not the model name (though in many cases they would be the same)
[21:12:07] roamingdog: VeryBewitching: could it be having '_type' on the end is confusing rails re: polymorphism? do other associations in the app work normally?
[21:12:17] danostrowski: ah, interesting. I wonder if I have to add the join because I'm mis-naming the thing in .includes()
[21:12:39] VeryBewitching: roamingdog: That's a good question, I'm just building out the models and associations today
[21:13:09] VeryBewitching: roamingdog: I'm gonna try this on a field that doesn't include _type
[21:13:14] danostrowski: hm. nope. odd
[21:13:34] danostrowski: guess I have to do both. disappointing, as AR obviously has enough knowledge to do it without specifying both.
[21:13:40] roamingdog: VeryBewitching: actually i should've said 'single table inheritance', not polymorphism
[21:13:52] manfrin: has joined #RubyOnRails
[21:14:36] danostrowski: not sure why I need to duplicate my request. :-/
[21:14:48] chipotle: has joined #RubyOnRails
[21:16:40] VeryBewitching: roamingdog: And nope, tried with another belongs_to association with inverse in Property named :parking_option
[21:17:11] roamingdog: VeryBewitching: try it without the inverse?
[21:17:17] Radar: GOOD MORNING
[21:17:43] VeryBewitching: roamingdog: That's the way I originally had it, no go.
[21:19:18] hahuang62: has joined #RubyOnRails
[21:20:15] teaearlgraycold: has joined #RubyOnRails
[21:21:26] emachnic: has joined #RubyOnRails
[21:21:37] Darmani: has joined #RubyOnRails
[21:22:08] joaumg: has joined #RubyOnRails
[21:22:47] Darmani: Hello everyone ^.^
[21:22:48] VeryBewitching: Does using inverse_of require a physical foreign key by any chance?
[21:23:13] VeryBewitching: I've defined the columns as t.belongs_to :model
[21:30:16] teaearlgraycold: has joined #RubyOnRails
[21:34:05] chouhoul_: has joined #RubyOnRails
[21:35:45] rattatmatt: has joined #RubyOnRails
[21:41:02] flashpoint9: has joined #RubyOnRails
[21:41:31] kies: has joined #RubyOnRails
[21:41:58] Oliphaunte: has joined #RubyOnRails
[21:42:07] sloggerkhan: Is there a way of using IN( ) with find_by_sql?
[21:43:40] AmiMoench: has joined #RubyOnRails
[21:48:06] dannyguk: has joined #RubyOnRails
[21:48:51] danostrowski: has joined #RubyOnRails
[21:51:29] dblessing: has joined #RubyOnRails
[21:52:20] jhack: has joined #RubyOnRails
[21:53:08] jhack: has joined #RubyOnRails
[21:54:06] dblessing: has joined #RubyOnRails
[21:54:58] apotry: has joined #RubyOnRails
[21:57:03] Guest60: has joined #RubyOnRails
[21:58:06] dblessing: has joined #RubyOnRails
[22:01:08] tlaxkit: has joined #RubyOnRails
[22:01:39] dblessing: has joined #RubyOnRails
[22:02:26] lightt: has joined #RubyOnRails
[22:03:23] DoctorMonocular: has joined #RubyOnRails
[22:04:14] jenrzzz_: has joined #RubyOnRails
[22:04:22] voidDotClass: has joined #RubyOnRails
[22:06:06] GodFather: has joined #RubyOnRails
[22:06:23] Darmani: Hey guys, quick question.
[22:06:56] GodFather: has joined #RubyOnRails
[22:07:01] Darmani: I set up a validation to flash an error msg if a person messages a user who doesn't exist. But it's not working.
[22:07:02] Darmani: https://gist.github.com/mfifth/6d4c00de911696afe638f0851ea55ae8
[22:07:14] Darmani: I think I'm doing it wrong but I'm not sure how to get it right.
[22:08:08] Radar: https://gist.github.com/mfifth/6d4c00de911696afe638f0851ea55ae8#file-conversations_controller-rb-L28
[22:08:11] workmad3: Darmani: `find_by` doesn't raise an exception if the user isn't found
[22:08:14] Radar: This is not an exception that ActiveRecord has.
[22:08:29] roamingdog: has joined #RubyOnRails
[22:08:38] Radar: Well, it'd find the ::NoMethodError class, but there isn't an ActiveRecord::NoMethodError.
[22:08:51] Radar: Darmani: You want to use find_by!
[22:09:17] DoctorMonocular: also, your main code should probably use the built in find_or_create_by() metho
[22:09:17] Darmani: What's the difference?
[22:09:38] Darmani: DoctorMonocular: I did not know that was a thing.
[22:09:55] havenwood: Darmani: Or don't use exceptions for flow control. Look at what #find_by does return when nothing is found. What is that?
[22:09:56] DoctorMonocular: well, you have a couple confusingish lines, but the method does exactly the thing you're wanting
[22:10:29] dblessing: has joined #RubyOnRails
[22:10:31] Darmani: havenwood: the nil class error o.o
[22:11:20] Radar: Darmani: Try it in the console.
[22:12:03] Darmani: Radar: Try what? o.o Find_by?
[22:12:16] havenwood: Darmani: line 27
[22:12:28] Radar: [08:09:18] <Darmani> What's the difference?
[22:12:31] Radar: Darmani: Come on
[22:12:34] Radar: attention span of a goldfish!
[22:12:40] Darmani: Radar: I'm sorry D:
[22:12:48] Darmani: I did try it though. It works I know that...
[22:13:00] Radar: Darmani: what is the difference between find_by and find_by!
[22:13:05] Radar: Try that in the console.
[22:13:13] superlou: has joined #RubyOnRails
[22:13:16] havenwood: Darmani: And what did it set `@recipient` to in the console?
[22:13:23] Darmani: Radar: I'm gonna ask a stupid question.
[22:13:35] Darmani: How do you even try that in the console? You just type find_by?
[22:13:47] Darmani: havenwood: I don't know I haven't tried it yet.
[22:14:02] havenwood: Darmani: Copy paste line 27 from your gist to your Rails console and see!
[22:14:02] Darmani: Radar: oh wait.
[22:14:04] Darmani: Never mind.
[22:14:23] Darmani: havenwood: fine fine -.-
[22:14:59] havenwood: Darmani: Or `binding.pry` in your method if you wan't want to replace the params with an arg that will result in nothing found.
[22:16:04] lightt: has joined #RubyOnRails
[22:16:23] Darmani: Radar: So... One method gives you nil and the other raises the notfound exception...
[22:16:29] Darmani: I still don't know what the difference is though.
[22:16:39] baweaver: that sounds like a difference
[22:16:51] Darmani: Am I speaking Chinese? It feels like I am. lol
[22:17:06] baweaver: "One method gives you nil and the other raises the notfound exception..."
[22:17:08] dblessing: has joined #RubyOnRails
[22:17:11] Axilla: has joined #RubyOnRails
[22:17:18] Darmani: baweaver: BUT WHYYYYY
[22:17:41] DoctorMonocular: so, I still don't really have any great ideas about how to flip a PDF page vertically. I can try to create everything on the page from scratch, but prawn makes it nontrivial :/
[22:17:52] audy: is there a thing that generates documentation for an API based on jbuilder?
[22:18:05] baweaver: 我会说中国如果您希望它
[22:18:12] DoctorMonocular: it'd be great to be able to take a group of things and rotate all of them together by a certain amount
[22:18:15] baweaver: audy: not exactly
[22:18:18] Radar: baweaver: Something about not being able to speak Chinese?
[22:18:22] baweaver: audy: but look into API Pie
[22:18:23] Darmani: baweaver: lmaooo
[22:18:24] Radar: ACTION now google translates
[22:18:27] havenwood: Darmani: If you see that `@recipient #=> nil` how can you use that to decide whether to flash and redirect?
[22:18:27] audy: baweaver: ty
[22:18:40] Radar: baweaver: way off the mark
[22:18:41] havenwood: Darmani: Hint, "truthiness."
[22:18:44] baweaver: It's put in the controller
[22:18:47] audy: baweaver: lol i already starred that on GH
[22:18:54] havenwood: Darmani: unless @recipeint; ...
[22:19:13] Darmani: havenwood: ohhhhhhh. Wait...
[22:19:14] Radar: http://guides.rubyonrails.org/active_record_querying.html#find-by
[22:19:15] havenwood: except don't typo
[22:19:23] Darmani: I think I get what you're saying.
[22:19:34] baweaver: 我的中国不好
[22:19:44] Darmani: Radar: That's the only difference? :o
[22:20:00] Radar: Darmani: yes
[22:20:07] Radar: Darmani: follow havenwood's advice. it is good.
[22:20:11] jgt2: has joined #RubyOnRails
[22:20:15] jetpackjoe: has joined #RubyOnRails
[22:20:16] smathy: Not to mention that ActiveRecord::NoMethodError won't be the exception.
[22:20:25] Darmani: Radar: Yes he seems like a fine fellow.
[22:20:48] baweaver: Mi español es al menos decente señor Radar
[22:21:26] whathappens: has joined #RubyOnRails
[22:21:33] Darmani: baweaver: How many languages do you speak dude? Lol
[22:21:44] Radar: Darmani: As many as Google Translate, I guess.
[22:22:27] baweaver: genug ärgerlich zu sein
[22:22:29] Darmani: Radar: lmao
[22:23:07] baweaver: I do actually speak a good amount of Spanish, a handful of German, some Japanese, and a smidge of Chinese Mandarin
[22:23:56] elomatreb: I'm more impressed at the working unicode in IRC :)
[22:24:07] Darmani: baweaver: I think I know about a smidge of Rails so far.
[22:25:36] solars: has joined #RubyOnRails
[22:25:36] baweaver: The german above translates loosely to something like sufficient annoying to be if you went word for word, or enough to be annoying in proper english
[22:26:16] dblessing: has joined #RubyOnRails
[22:28:13] mikecmpbll: has joined #RubyOnRails
[22:30:44] startupality: has joined #RubyOnRails
[22:32:00] dblessing: has joined #RubyOnRails
[22:35:20] yfeldblum: has joined #RubyOnRails
[22:35:46] macsteps: has joined #RubyOnRails
[22:36:49] dblessing: has joined #RubyOnRails
[22:36:56] Psy-Q: has joined #RubyOnRails
[22:37:36] solars: has joined #RubyOnRails
[22:39:06] choke: has joined #RubyOnRails
[22:39:27] Jasaka: has joined #RubyOnRails
[22:40:10] Guest60: has joined #RubyOnRails
[22:42:49] Brackson: has joined #RubyOnRails
[22:47:02] upsell5: has joined #RubyOnRails
[22:55:33] solars: has joined #RubyOnRails
[22:57:00] audy: has left #RubyOnRails: ()
[22:57:03] choke: has joined #RubyOnRails
[22:57:50] wethu: has joined #RubyOnRails
[22:58:48] yfeldblum: has joined #RubyOnRails
[22:59:26] jancel: has joined #RubyOnRails
[22:59:48] danostrowski: has joined #RubyOnRails
[23:00:13] Darmani: I wanted to set up another validation that prevents you from messaging yourself.
[23:00:14] Darmani: https://gist.github.com/mfifth/6d4c00de911696afe638f0851ea55ae8
[23:00:19] Darmani: Obviously I'm not doing it right.
[23:00:28] `0ctayn: has joined #RubyOnRails
[23:01:04] yfeldblum: has joined #RubyOnRails
[23:01:45] havenwood: Darmani: Line 27 might set `@recipient` to `nil`, there's that up front. Line 28 should be removed, it does nothing and is confusing.
[23:01:51] mdw: has joined #RubyOnRails
[23:02:21] Leepoff: has left #RubyOnRails: ()
[23:02:35] teaearlgraycold: has joined #RubyOnRails
[23:02:46] Darmani: havenwood: wat.
[23:03:07] Tempesta_: has joined #RubyOnRails
[23:03:08] Darmani: that's how you define the recipient within the create action.
[23:04:52] baweaver: Also consider the possibility that sending messages to yourself is valid
[23:05:15] Darmani: baweaver: Really? o.o
[23:05:32] joeytwiddle_: has joined #RubyOnRails
[23:05:45] baweaver: I've done it before on gmail
[23:05:52] havenn: has joined #RubyOnRails
[23:05:52] havenn: has joined #RubyOnRails
[23:06:38] Andr3as_: has joined #RubyOnRails
[23:06:39] knight_: has joined #RubyOnRails
[23:06:53] jtd_: has joined #RubyOnRails
[23:06:56] WhereIsMySpoon__: has joined #RubyOnRails
[23:06:57] Rodya_: has joined #RubyOnRails
[23:07:24] Darmani: baweaver: I suppose I'll leave it as is then.
[23:07:25] skyjumpe1: has joined #RubyOnRails
[23:07:33] Kuukunen-: has joined #RubyOnRails
[23:07:36] hxegon_: has joined #RubyOnRails
[23:07:41] bob_f_: has joined #RubyOnRails
[23:07:42] `0ctayn: hi. what are some good editors? i am using rubymine and i couldn't find anything better for development because you can ctrl+click to go to definition even if the definition is in the ruby source code
[23:07:50] Gabriel413: has joined #RubyOnRails
[23:07:52] nwkr: has joined #RubyOnRails
[23:07:53] parus_: has joined #RubyOnRails
[23:07:53] ejnahc_: has joined #RubyOnRails
[23:07:59] chrisarc1nd: has joined #RubyOnRails
[23:08:00] Skelz0r_: has joined #RubyOnRails
[23:08:02] sunya7a_: has joined #RubyOnRails
[23:08:02] Prira_: has joined #RubyOnRails
[23:08:08] crankhar1er: has joined #RubyOnRails
[23:08:09] sneep_: has joined #RubyOnRails
[23:08:13] ltd: has joined #RubyOnRails
[23:08:18] Criten_: has joined #RubyOnRails
[23:08:18] Sebastia1Thorn: has joined #RubyOnRails
[23:08:18] wmoxam_: has joined #RubyOnRails
[23:08:20] badeball_: has joined #RubyOnRails
[23:08:21] devn_: has joined #RubyOnRails
[23:08:23] DefV: has joined #RubyOnRails
[23:08:23] slash_ni1k: has joined #RubyOnRails
[23:08:24] janno_: has joined #RubyOnRails
[23:08:29] rahc_: has joined #RubyOnRails
[23:08:29] jcm_: has joined #RubyOnRails
[23:08:35] sunya7a_1: has joined #RubyOnRails
[23:08:55] baweaver: `0ctayn whatever lets you get work done. Most people here are going to be between Vim or Sublime
[23:09:23] baweaver: neither of which is an IDE out of the box
[23:09:50] havenn: `0ctayn: Or Emacs or Atom
[23:10:09] roamingdog: has joined #RubyOnRails
[23:10:10] soroot: has joined #RubyOnRails
[23:10:13] baweaver: Those too. Just mentioning the most common I hear
[23:10:41] jgt3: has joined #RubyOnRails
[23:10:50] weltzooo5: has joined #RubyOnRails
[23:11:08] havenn: baweaver: Yeah, it seems in Ruby talks I see vim and subl the most.
[23:11:20] whathappens: has joined #RubyOnRails
[23:11:20] IcyDragon: has joined #RubyOnRails
[23:11:22] mayamai: has joined #RubyOnRails
[23:11:24] pragmati-: has joined #RubyOnRails
[23:11:24] havenn: Usually the "you haven't paid" pestering in Sublime during the talk. :P
[23:11:24] loglaunc-: has joined #RubyOnRails
[23:11:25] TessaM-: has joined #RubyOnRails
[23:11:29] maxmanders_: has joined #RubyOnRails
[23:11:29] adam^: has joined #RubyOnRails
[23:11:30] Radar_: has joined #RubyOnRails
[23:11:31] Shidash_: has joined #RubyOnRails
[23:11:31] AntiSpamMeta: has joined #RubyOnRails
[23:11:32] cydrobolt_: has joined #RubyOnRails
[23:11:39] abracadaniel: has joined #RubyOnRails
[23:11:40] tubbo`: has joined #RubyOnRails
[23:11:48] hfp_: has joined #RubyOnRails
[23:11:49] Radar: has joined #RubyOnRails
[23:11:58] baweaver: RubyMine just feels too clunky to me, but that's my own preference to build my environment myself.
[23:11:58] Earl: has joined #RubyOnRails
[23:12:05] samuelkadolph1: has joined #RubyOnRails
[23:12:35] Ankhers_: has joined #RubyOnRails
[23:12:40] `0ctayn: is there a way for emacs or vim to have the same go to definition functionality
[23:12:47] Radar: Old pic of my RubyMine setup: https://goo.gl/jo30wG
[23:13:06] Radar: `0ctayn: CTags in Vim.
[23:13:18] g3funk: has joined #RubyOnRails
[23:13:39] Radar: `0ctayn: Sublime would probably suit you best if you're a new developer. That way then you're not learning Ruby + the editor as well.
[23:13:42] `0ctayn: cool, ill check that out. i know my friend had a pretty good vim setup
[23:13:54] arthurnn: has joined #RubyOnRails
[23:14:03] noodle: has joined #RubyOnRails
[23:15:19] baweaver: remember though that we Vim folks spend years making out setup
[23:15:39] graft: has joined #RubyOnRails
[23:16:59] Darmani: Radar: Alright I think I'm done with that project. What was that other thing you had? Like a t shirt store or something?
[23:17:25] Radar: Darmani: https://gist.github.com/radar/3037d4c5f8d3240afd43
[23:17:27] Radar: That one?
[23:17:47] Darmani: Radar: Yep that's the one. I'm gonna get started today.
[23:19:08] Jasaka: has joined #RubyOnRails
[23:19:13] Silex: has joined #RubyOnRails
[23:19:22] coffeejunk: has joined #RubyOnRails
[23:19:28] Takumo: has joined #RubyOnRails
[23:19:28] Takumo: has joined #RubyOnRails
[23:19:38] todd: has joined #RubyOnRails
[23:19:39] xybre: has joined #RubyOnRails
[23:20:08] marienz: has joined #RubyOnRails
[23:21:19] hahuang62: has joined #RubyOnRails
[23:22:15] dblessing: has joined #RubyOnRails
[23:23:19] _underscore_: has joined #RubyOnRails
[23:23:44] whathappens: has joined #RubyOnRails
[23:24:06] moeabdol: has joined #RubyOnRails
[23:27:50] meinside: has joined #RubyOnRails
[23:29:34] jancel: has joined #RubyOnRails
[23:32:54] Darmani: Radar: Should I just create a new app on Heroku? Or edit the old commit I had up on there?
[23:33:38] dalbusch1t: has joined #RubyOnRails
[23:34:29] moeabdol: has joined #RubyOnRails
[23:36:08] roamingdog: has joined #RubyOnRails
[23:36:39] Jasaka: has joined #RubyOnRails
[23:37:09] DoctorMonocular: has joined #RubyOnRails
[23:39:29] dstarh: has joined #RubyOnRails
[23:43:21] neha-: has joined #RubyOnRails
[23:44:38] neha-: has joined #RubyOnRails
[23:47:12] chouhoulis: has joined #RubyOnRails
[23:49:19] quazimodo: has joined #RubyOnRails
[23:49:52] dannyguk: has joined #RubyOnRails
[23:51:14] Dios: has joined #RubyOnRails
[23:51:20] roamingdog: has joined #RubyOnRails
[23:52:43] Darmani: This app I've been working on has like 8 different branches from all the features I added to it..
[23:52:56] Darmani: Does that look bad? I mean should I just delete them and leave the latest branch up?
[23:55:47] veloutin: has joined #RubyOnRails
[23:55:48] mutantspew: has joined #RubyOnRails
[23:56:48] diegoaguilar: has joined #RubyOnRails
[23:57:01] SteenJobs: has joined #RubyOnRails
[23:57:38] diegoaguilar: has joined #RubyOnRails
[23:58:16] hahuang62: has joined #RubyOnRails
[23:58:26] diegoaguilar: has joined #RubyOnRails