« Back to channel list

#RubyOnRails - 23 October 2015

« Back 1 day Forward 1 day »
[00:02:12] jas02: has joined #RubyOnRails
[00:03:11] chipotle: has joined #RubyOnRails
[00:06:02] sharkman: has joined #RubyOnRails
[00:08:17] dan0034001: has joined #RubyOnRails
[00:10:46] theblang: has joined #RubyOnRails
[00:13:02] safety_cut: has joined #RubyOnRails
[00:16:22] pwnd_nsfw: has joined #RubyOnRails
[00:17:20] beauby: has joined #RubyOnRails
[00:18:18] jgt2: has joined #RubyOnRails
[00:18:34] EminenceHC: has joined #RubyOnRails
[00:21:12] wethu: has joined #RubyOnRails
[00:24:15] ngscheur1: has joined #RubyOnRails
[00:25:24] rubyonrailed: has joined #RubyOnRails
[00:27:41] pontiki: has joined #RubyOnRails
[00:31:20] ngscheurich: has joined #RubyOnRails
[00:31:22] bricker: has joined #RubyOnRails
[00:32:12] chills42: has joined #RubyOnRails
[00:32:58] mrbubbles: has joined #RubyOnRails
[00:34:58] jenrzzz: has joined #RubyOnRails
[00:36:10] c0py: has joined #RubyOnRails
[00:36:36] mary5030: has joined #RubyOnRails
[00:36:39] c0py: has joined #RubyOnRails
[00:38:59] oflannabhra: has joined #RubyOnRails
[00:39:07] annlewis: has joined #RubyOnRails
[00:41:48] duderonomy: has joined #RubyOnRails
[00:49:17] darrencauthon: has joined #RubyOnRails
[00:51:23] _djbkd: has joined #RubyOnRails
[00:53:36] mag42c: has joined #RubyOnRails
[00:56:34] jas02: has joined #RubyOnRails
[00:57:47] tjbiddle: has joined #RubyOnRails
[00:59:14] nya: has joined #RubyOnRails
[00:59:35] shibabu: has joined #RubyOnRails
[01:02:14] htmldrum: has joined #RubyOnRails
[01:04:04] mary5030: has joined #RubyOnRails
[01:06:16] mary5030: has joined #RubyOnRails
[01:07:05] spijet: You guys got me, I'm installing redis. :(
[01:08:10] atomical: has joined #RubyOnRails
[01:08:49] nettoweb: has joined #RubyOnRails
[01:09:47] d34th4ck3r: has joined #RubyOnRails
[01:09:52] TheRokh: has joined #RubyOnRails
[01:11:08] TheRokh: has joined #RubyOnRails
[01:12:26] TheRokh: has joined #RubyOnRails
[01:13:12] montagesoftware: has joined #RubyOnRails
[01:15:13] yfeldblum: has joined #RubyOnRails
[01:15:38] wldcordeiro: has joined #RubyOnRails
[01:19:01] dopie: has joined #RubyOnRails
[01:19:51] ajb: How do you make a nested form in rails? I read over an followed the guide and it isn't outputting anything to my view.
[01:20:16] NBarnes: has joined #RubyOnRails
[01:20:45] unreal: has joined #RubyOnRails
[01:25:32] Ropeney: ajb: did you read over http://guides.rubyonrails.org/form_helpers.html#nested-forms ?
[01:25:51] Ropeney: did you save it this time?
[01:26:38] Radar: ajb: !didntwork
[01:26:38] helpa: ajb: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[01:26:50] Ropeney: well that guide shows how to make it, now you need to add context :)
[01:27:24] ajb: I don't get any thing in the view and I don't get an error
[01:27:27] tw1sted: has joined #RubyOnRails
[01:30:59] lukekhamilton: has joined #RubyOnRails
[01:31:20] smathy: ajb, !gist your view and your controller.
[01:31:20] helpa: ajb: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[01:31:56] quazimodo: has joined #RubyOnRails
[01:32:03] quazimod1: has joined #RubyOnRails
[01:32:26] ajb: https://gist.github.com/ZucchiniZe/f34e19bc610387484cc9
[01:32:29] tjbiddle: has joined #RubyOnRails
[01:33:20] smathy: ajb, leaders vs leader
[01:33:30] Ropeney: ajb: <%= f.fields_for
[01:33:34] Ropeney: note the =
[01:33:46] smathy: Heh, that too.
[01:34:30] ajb: awesome, it works
[01:34:47] stardiviner: has joined #RubyOnRails
[01:36:20] rustymyers: has joined #RubyOnRails
[01:40:14] tjbiddle: has joined #RubyOnRails
[01:42:15] mary5030: has joined #RubyOnRails
[01:48:29] IFrank00: has joined #RubyOnRails
[01:49:27] SamGerber: has joined #RubyOnRails
[01:50:12] jas02: has joined #RubyOnRails
[01:53:34] xcm: has joined #RubyOnRails
[01:58:09] seank_: has joined #RubyOnRails
[02:03:41] chipotle: has joined #RubyOnRails
[02:05:14] A124: has joined #RubyOnRails
[02:05:41] jenrzzz: has joined #RubyOnRails
[02:06:19] quazimodo: has joined #RubyOnRails
[02:06:19] quazimod1: has joined #RubyOnRails
[02:07:35] bungoman_: has joined #RubyOnRails
[02:08:11] darrencauthon: has joined #RubyOnRails
[02:08:52] tjbiddle: Does button_to add a line break or something? Trying to put two buttons next to eachother - works if it's pure html; as soon as I use button_to the next one goes on the next line
[02:09:53] tjbiddle: Nevermine - Solution: Just use a link_to
[02:11:43] ror15: has joined #RubyOnRails
[02:12:10] ror15: Can't get Pinterest to accept my omniauth request
[02:12:11] ror15: "data": "The provided redirect_uri does not match any of the registered redirect URIs."
[02:12:56] ^Denis: has joined #RubyOnRails
[02:13:10] ror15: My registered redirect is not working - using ngrok for https
[02:13:44] pydave6367: has joined #RubyOnRails
[02:13:46] willharrison: has joined #RubyOnRails
[02:15:53] Denis: has joined #RubyOnRails
[02:17:39] ror15: Has anyone run into this?
[02:17:44] sharkman: has joined #RubyOnRails
[02:19:04] taiar: has left #RubyOnRails: ()
[02:19:41] willardg: has joined #RubyOnRails
[02:20:27] Joufflu: has joined #RubyOnRails
[02:20:49] Denis: has left #RubyOnRails: ()
[02:21:50] ^Denis: has joined #RubyOnRails
[02:23:49] mostlybadfly: has joined #RubyOnRails
[02:27:13] baweaver: has joined #RubyOnRails
[02:29:31] safety_cut: has joined #RubyOnRails
[02:30:54] safety_c_: has joined #RubyOnRails
[02:30:58] sankaber: has joined #RubyOnRails
[02:34:36] rubyonrailed: has joined #RubyOnRails
[02:35:41] safety_cut: has joined #RubyOnRails
[02:37:19] Pupeno: has joined #RubyOnRails
[02:38:31] nettoweb: has joined #RubyOnRails
[02:44:10] jas02: has joined #RubyOnRails
[02:45:40] stardiviner: has joined #RubyOnRails
[02:45:43] ss_much: has joined #RubyOnRails
[02:45:55] luckymeerza: has joined #RubyOnRails
[02:49:39] Glyphik: has joined #RubyOnRails
[02:52:39] rromanch_: has joined #RubyOnRails
[02:53:03] mary5030: has joined #RubyOnRails
[02:55:53] Lightsword: has joined #RubyOnRails
[02:56:15] bruno-: has joined #RubyOnRails
[02:56:52] danman: has joined #RubyOnRails
[03:00:08] prestorium: has joined #RubyOnRails
[03:00:26] tjbiddle: has joined #RubyOnRails
[03:02:37] shibabu: has joined #RubyOnRails
[03:08:04] n99999i: has joined #RubyOnRails
[03:08:34] hmsimha: has joined #RubyOnRails
[03:08:34] sevenseacat: has joined #RubyOnRails
[03:09:23] braincrash: has joined #RubyOnRails
[03:10:49] pontiki: has joined #RubyOnRails
[03:10:50] qejk: has joined #RubyOnRails
[03:11:06] spijet: And now I'm getting errors about Passenger not being able to find /usr/bin/env. :o
[03:11:56] chipotle: has joined #RubyOnRails
[03:12:02] Pazician: has joined #RubyOnRails
[03:12:51] sadaf2605: has joined #RubyOnRails
[03:17:06] d34th4ck3r: What???s a good way to generate fixtures when using devise?
[03:17:40] Ryan1013: has joined #RubyOnRails
[03:18:21] secretlives: has joined #RubyOnRails
[03:18:27] danoph: has joined #RubyOnRails
[03:18:43] Axy: has joined #RubyOnRails
[03:18:49] rromanch_: has joined #RubyOnRails
[03:22:01] sadaf2605: has joined #RubyOnRails
[03:27:23] renanoronfle: has joined #RubyOnRails
[03:28:33] Kovensky: has joined #RubyOnRails
[03:29:01] woods: has joined #RubyOnRails
[03:29:12] woods: good morning
[03:29:38] Ryan1013: has left #RubyOnRails: ()
[03:31:32] secretlives: has joined #RubyOnRails
[03:32:01] sdwrage: has joined #RubyOnRails
[03:32:42] yogeshrt: has joined #RubyOnRails
[03:32:59] ja: hi woods
[03:33:16] woods: how's it going?
[03:33:50] ja: I'm good thanks
[03:35:23] xtagon: has joined #RubyOnRails
[03:35:34] woods: pretty good
[03:35:42] woods: working on getting rails installed on my ubuntu vm
[03:36:51] LudicrousMango: has joined #RubyOnRails
[03:38:33] ror15: Has anyone implemented Pinterest omniauth on an app
[03:38:47] smathy: d34th4ck3r, very few people who've been doing rails for any length of time use fixtures.
[03:39:07] jas02: has joined #RubyOnRails
[03:39:20] theblang: has joined #RubyOnRails
[03:39:29] d34th4ck3r: what do you suggest? Factories?
[03:40:16] smathy: People do generally use factories, I tend to just load YAML from a file and use that for my attributes.
[03:41:30] nemo_: has joined #RubyOnRails
[03:42:55] hahuang65: has joined #RubyOnRails
[03:47:17] pawnbox: has joined #RubyOnRails
[03:48:03] d34th4ck3r: Is there a specific reason why people don???t prefer fixtures?
[03:48:08] mitchless: has joined #RubyOnRails
[03:50:52] ror15: "data": "The provided redirect_uri does not match any of the registered redirect URIs."
[03:51:01] ror15: Pinterest is driving me nuts
[03:51:08] sevenseacat: d34th4ck3r: they're a pain in the ass to maintain, and are shared across all tests
[03:51:18] ror15: I can't for the life of me find the correct redirect_url
[03:51:47] wldcordeiro: has joined #RubyOnRails
[03:51:56] ror15: The "correct" redirect_uri works for my facebook auth over https but not my Pinterest
[03:52:25] ror15: Could something else be wrong?
[03:53:49] sadaf2606: has joined #RubyOnRails
[03:56:19] smathy: d34th4ck3r, there's a fairly high maintenance overheard, especially for any associations.
[03:57:02] smathy: ror15, sorry man, I feel your pain, but never done it and it's not something I've ever heard people doing.
[03:57:16] ror15: It's awful
[03:59:31] capin: if anyone gets bored, http://stackoverflow.com/questions/33294481/
[04:01:08] rhizome: jesus you're still on that
[04:01:25] ror15: capin, why not switch to aws/s3 and paperclip
[04:02:14] sevenseacat: what does that have to do with rails?
[04:04:31] smathy: ror15, they're lying, it works perfectly.
[04:05:21] ror15: so it goes
[04:05:23] smathy: Actually, let me retract that - after reading.
[04:05:51] smathy: Earlier they were struggling with understanding how refile stored the filename, and it was hugely frustrating.
[04:06:10] smathy: I misspoke just now, this is a different problem, but as sevenseacat said - TOTALLY UN-FUCKING-RELATED TO RAILS!
[04:06:30] smathy: Also unrelated to curl.
[04:06:33] rhizome: we both got ahead of ourselves
[04:06:36] smathy: Thankfully I can remove those tags in SO.
[04:07:06] smathy: capin, that it works from curl means that Rails is doing precisely the right thing, so this is nothing to do with Rails.
[04:07:08] smathy: ...or curl
[04:07:44] smathy: So I removed those tags, as a favor to you, so you don't get downvoted by all the really, immensely pissed off rails and curl people for whom your problem is totally irrelevant.
[04:08:31] jenrzzz: has joined #RubyOnRails
[04:08:46] smathy: I suspect that I should also remove the Objective-C tag (for you, like, as a favor) but I don't know enough about their proclivities to act.
[04:09:04] sevenseacat: I downvoted it anyway. 'heres a blob of code that doesnt do what I expect' is not a good basis for a SO question.
[04:09:41] rhizome: some mobile safari quirk
[04:09:57] smathy: I did really try earlier to explain to you capin that questions need to be structured as: this is what I'm doing, this is what I expect, this is what's happening.
[04:10:20] smathy: rhizome, really, mobile safari has quirks? Is it solar flares?
[04:11:58] rhizome: they will surprise and delight you
[04:12:02] ror15: Anyone use ngrok for https connections on local server?
[04:12:10] rhizome: never heard of it
[04:12:24] renanoronfle: has joined #RubyOnRails
[04:12:28] ror15: trying to figure out if it's spitting some strange url
[04:13:09] pydave6367: has joined #RubyOnRails
[04:13:20] ror15: Pinterest is not dev friendly
[04:15:25] smathy: ror15, I've never heard of anyone using pinterest for oauth - nor have I heard of ngrok - so you're like doubly cursed here, sorry.
[04:15:44] l_tonz: has joined #RubyOnRails
[04:15:50] ror15: smathy yeah I've been on this for two days
[04:16:59] NBarnes: has joined #RubyOnRails
[04:18:14] smathy: oauth is still such a poorly tooled infrastructure.
[04:18:20] skiz: has joined #RubyOnRails
[04:18:32] rhizome: it's not fun
[04:18:42] rhizome: and programming should be fun
[04:19:19] smathy: I've said this so many times. Passwords continue to proliferate because: "we all fucking understand them!"
[04:19:38] smathy: (I put that in quotes because, y'know, it's so profound)
[04:25:55] braincra-: has joined #RubyOnRails
[04:26:32] Lightsword: has joined #RubyOnRails
[04:31:25] moeabdol: has joined #RubyOnRails
[04:33:12] Or1on: has joined #RubyOnRails
[04:33:39] jas02: has joined #RubyOnRails
[04:33:56] norc: has joined #RubyOnRails
[04:34:56] htmldrum: has joined #RubyOnRails
[04:35:29] norc: If A has_and_belongs_to_many B, I want to be able to add and remove associations (for a given A). What would be the restful way here?
[04:35:52] norc: Part of editing the A resource? Or a seperate association controller?
[04:36:06] sevenseacat: depends on your interface.
[04:36:31] yunior: has joined #RubyOnRails
[04:37:01] yunior: hi everyone
[04:37:08] norc: sevenseacat alright thanks
[04:37:19] yunior: i need some help with a gitlab installation
[04:37:23] Pupeno: has joined #RubyOnRails
[04:37:27] rhizome: wrong channel
[04:37:38] czerasz: has joined #RubyOnRails
[04:37:47] norc: Gitlab is rails tho. :p
[04:38:51] yunior: after completing instalation i get this error
[04:38:56] gingray: has joined #RubyOnRails
[04:39:08] yunior: The requested URL /users/sign_in was not found on this server.
[04:42:32] Maletor: has joined #RubyOnRails
[04:44:54] IFrank00: has joined #RubyOnRails
[04:45:16] yunior: i need some help with a gitlab installation
[04:45:22] yunior: can anyone help me?
[04:45:31] yunior: after completing instalation i get this error
[04:45:34] yunior: The requested URL /users/sign_in was not found on this server.
[04:46:50] sevenseacat: we heard you the first time
[04:47:21] mytrile: has joined #RubyOnRails
[04:47:44] woods: so, i just started a new app to test some things out, i made a button on it, and im trying to use coffeescript to change the value of the button when it is clicked, but it is not working
[04:48:15] woods: <%= button_tag "Button", :id => "testbutton" %>
[04:48:17] krz: has joined #RubyOnRails
[04:48:28] codelahoma: has joined #RubyOnRails
[04:49:59] smathy: yunior, take it to #gitlab
[04:50:23] smathy: (and yes, I already know how few people are there and how quiet they all are)
[04:50:44] smathy: yunior, https://github.com/gitlabhq/gitlab-public-wiki/wiki/IRC-channel-Guidelines-and-F.A.Q.
[04:50:48] yunior: thanks smathy
[04:51:32] smathy: yunior, you're welcome.
[04:52:15] smathy: woods, it's hard to tell, was that a joke?
[04:53:23] woods: no, i realize i should have provided more information
[04:53:33] woods: i think that maybe it was a file extension problem though
[04:53:45] smathy: woods, ok, thanks.
[04:53:52] woods: so i have welcome.js.coffee
[04:54:02] smathy: woods, so you could either ask properly, or be quiet.
[04:54:10] helpa: https://gist.github.com/996779
[04:54:31] htmldrum: has joined #RubyOnRails
[04:57:27] pawnbox: has joined #RubyOnRails
[04:58:02] bruno-: has joined #RubyOnRails
[04:58:12] dopieee: has joined #RubyOnRails
[05:01:34] woods: here is the gist: https://gist.github.com/anonymous/e8e41066eca60a8074db
[05:01:43] woods: the text on the button remains the same after clicking
[05:02:01] iliketurtles: has joined #RubyOnRails
[05:05:29] shibabu: has joined #RubyOnRails
[05:05:29] dideler: has joined #RubyOnRails
[05:08:01] chipotle: has joined #RubyOnRails
[05:09:20] trosborn: has joined #RubyOnRails
[05:10:03] spijet: So, I've deployed my app on a server with Passenger+nginx combo, it works (well, at least it renders the index).
[05:11:09] Kovensky: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[05:13:03] spijet: But when I set ActiveJob backend to sidekiq, nothing happens after hitting the submit button (well, I get the response page, but it seems that the Job is not firing off).
[05:13:11] Pazician: has joined #RubyOnRails
[05:18:10] chrissonar: has joined #RubyOnRails
[05:21:46] simkessy: has joined #RubyOnRails
[05:28:29] smathy: Oh good, so glad woods is gone. I wish gist would just reject .txt
[05:29:02] smathy: spijet, did you install/configure sidekiq on your server?
[05:30:33] jas02: has joined #RubyOnRails
[05:32:02] spijet: smathy: already figured it out :) seems to work now.
[05:32:24] spijet: but somehow I see 4 jobs in sidekiq already (must be 1)
[05:32:35] trautwein: has joined #RubyOnRails
[05:35:36] spijet: The job, however, consists of 2 methods (perform() and prepare_mail(), which gets invoked near the end of perform()). But why 4? :)
[05:38:26] Maletor: has joined #RubyOnRails
[05:38:54] tweeeaks: has joined #RubyOnRails
[05:39:26] aganov: has joined #RubyOnRails
[05:40:13] xcm: has joined #RubyOnRails
[05:40:29] shibabu: has joined #RubyOnRails
[05:44:52] surrealanalysis: has joined #RubyOnRails
[05:45:35] yogeshrt: has joined #RubyOnRails
[05:49:30] njero: has joined #RubyOnRails
[05:50:27] smathy: Failure and retry, dunno. FLUSHALL in redis, and start over.
[05:51:14] spijet: Ah, I think I found why 4.
[05:51:44] tagrudev: has joined #RubyOnRails
[05:51:49] spijet: I might have added 3 jobs accidentially before running sidekiq. :D
[05:52:12] ElSif: has joined #RubyOnRails
[05:52:23] d34th4ck3r: has joined #RubyOnRails
[05:53:25] EminenceHC: has joined #RubyOnRails
[05:54:12] dnewkerk: has joined #RubyOnRails
[05:55:49] shibabu: has joined #RubyOnRails
[05:56:26] jas02: has joined #RubyOnRails
[05:56:28] jenrzzz: has joined #RubyOnRails
[05:58:17] bricker: has joined #RubyOnRails
[05:59:02] bruno-: has joined #RubyOnRails
[06:03:41] jerry_tao: has joined #RubyOnRails
[06:04:58] yfeldblum: has joined #RubyOnRails
[06:10:29] jerry_tao: has joined #RubyOnRails
[06:11:18] jerry_tao: has joined #RubyOnRails
[06:11:34] pawnbox: has joined #RubyOnRails
[06:11:34] sdwrage: has joined #RubyOnRails
[06:12:18] shibabu: has joined #RubyOnRails
[06:13:06] IFrank00: has joined #RubyOnRails
[06:20:40] Kovensky: has joined #RubyOnRails
[06:20:53] krz: has joined #RubyOnRails
[06:21:20] norc_: has joined #RubyOnRails
[06:21:23] nickenchuggets__: has joined #RubyOnRails
[06:21:23] pawnbox: has joined #RubyOnRails
[06:21:47] Linuus: has joined #RubyOnRails
[06:22:34] nebuer: has joined #RubyOnRails
[06:23:19] herbst: has joined #RubyOnRails
[06:23:22] willardg: has joined #RubyOnRails
[06:23:34] Kovensky: has left #RubyOnRails: ()
[06:27:21] arup_r: has joined #RubyOnRails
[06:29:42] willardg: has joined #RubyOnRails
[06:30:32] pawnbox: has joined #RubyOnRails
[06:30:58] htmldrum: has joined #RubyOnRails
[06:31:03] riotjones: has joined #RubyOnRails
[06:33:03] george2: has left #RubyOnRails: ()
[06:33:46] relix: has joined #RubyOnRails
[06:34:04] yardenbar: has joined #RubyOnRails
[06:34:22] nickenchuggets: has joined #RubyOnRails
[06:35:11] CheckYourSix: has joined #RubyOnRails
[06:35:29] AzaToth: has joined #RubyOnRails
[06:36:22] pawnbox: has joined #RubyOnRails
[06:36:35] youngbaks: has joined #RubyOnRails
[06:36:41] cleopatra: has joined #RubyOnRails
[06:37:55] nickenchuggets__: has joined #RubyOnRails
[06:39:00] cleopatra: ACTION Tension!
[06:39:16] OyoKooN: has joined #RubyOnRails
[06:39:31] LudicrousMango: has joined #RubyOnRails
[06:40:13] l_tonz: has joined #RubyOnRails
[06:40:15] krz: has joined #RubyOnRails
[06:42:27] pawnbox: has joined #RubyOnRails
[06:43:24] yogeshrt: has joined #RubyOnRails
[06:44:43] nickenchuggets: has joined #RubyOnRails
[06:44:48] bmalum: has joined #RubyOnRails
[06:45:38] vigasdeep: has joined #RubyOnRails
[06:46:53] m712: has joined #RubyOnRails
[06:51:53] chrissonar: has joined #RubyOnRails
[06:54:54] arup_r: cleopatra: chill Bro. :D
[06:55:25] norc_: So, why does Rails always give me the feeling that a Foos controller needs to have a Foo AR resource, with a route /foo....
[06:55:43] cleopatra: what new :)?
[06:55:50] arup_r: norc: Not always
[06:56:22] arup_r: there are times when you will be having a controller which has no way directly connected a single model
[06:56:49] darutoko: has joined #RubyOnRails
[06:56:51] arup_r: cleopatra: nothing.. same as yesterday.. Same username.. same password
[06:58:12] norc_: arup_r: So a "resource" can be just a concept, that actually maps to information stored in several models?
[07:00:04] bruno-: has joined #RubyOnRails
[07:00:20] arup_r: norc: I might be wrong. But I take this like that: When I will write a controller which will do CRUD with a model, I will use resource/resources. And when I will be writing a controller which will not to be deal with any models like "HomesController" for example, I use `controller` keyword to define routes
[07:00:25] comrad: has joined #RubyOnRails
[07:01:17] MartinEl_: has joined #RubyOnRails
[07:01:57] draken: how could you have a model with no controller though
[07:03:40] norc_: Draken: A different controller or service object might need it as an interface to the database to do magic.
[07:06:39] norc_: Draken: For example we have a rake task that regularly fetches mails and stores it in a table. Another rake task generates reports based on that - no ActionController there.
[07:09:05] ror15: Has anyone online now authenticated using Pinterest? Idk if it's my rails code or Pinterest. My redirect_uri is not being recognized (I use the same URL for facebooks redirect_uri which works)
[07:09:31] norc_: ror15: got a gist?
[07:10:55] arBmind: has joined #RubyOnRails
[07:13:37] ror15: https://gist.github.com/TuckerWatts/b8ca69e1ef5de0f3693d
[07:13:47] ror15: It's not getting past this point
[07:14:07] Pazician: has joined #RubyOnRails
[07:15:30] arup_r: ror15: can you check if the redirect_url and the url you registered with pintrest is same or not
[07:15:37] arup_r: that is what error message is saying
[07:16:43] ror15: I have the same redirect_uri for my facebook auth and it works there - also have 22 other possible URLs
[07:16:57] nfk|laptop: has joined #RubyOnRails
[07:17:16] ror15: That's why I wondered if it's something else - I can't seem to find the currect redirect_uri
[07:17:28] pontiki: has joined #RubyOnRails
[07:19:11] arup_r: I feel the registered URL in the pintrest side is something else.
[07:19:36] arup_r: I am saying this based on the error message I see in your gist
[07:20:32] ror15: the facebook registered URL is https://xxxxx.ngrok.io
[07:20:44] ror15: replace x with actual site
[07:20:47] pawnbox: has joined #RubyOnRails
[07:21:32] ror15: But nothing crazy specifically intended for facebook - just a root
[07:21:50] ror15: maybe they accept less
[07:21:59] krz: has joined #RubyOnRails
[07:22:46] arup_r: may be. need to give a real to figure this out for me.. :) wait for someone if they can help you on this
[07:22:55] arup_r: a real look **
[07:23:25] ror15: going on day 3 :/
[07:23:40] ror15: thanks though for thinking on it
[07:26:16] pawnbox: has joined #RubyOnRails
[07:27:10] thecyclone: has joined #RubyOnRails
[07:28:44] solars: has joined #RubyOnRails
[07:31:30] nfk|laptop: has joined #RubyOnRails
[07:32:07] raunicolae: has joined #RubyOnRails
[07:35:34] nhhagen: has joined #RubyOnRails
[07:36:07] artto: has joined #RubyOnRails
[07:41:03] Pazician: has joined #RubyOnRails
[07:42:50] sdwrage: has joined #RubyOnRails
[07:47:45] srinidhi: has joined #RubyOnRails
[07:50:49] akemrir: has joined #RubyOnRails
[07:51:28] nfk|laptop: has joined #RubyOnRails
[07:54:10] lipoqil: has joined #RubyOnRails
[07:55:08] CheckYourSix: has joined #RubyOnRails
[07:55:43] Ergo: has joined #RubyOnRails
[07:56:24] rrawlins: has joined #RubyOnRails
[08:02:13] sdwrage: has joined #RubyOnRails
[08:03:25] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[08:03:40] sagax: has joined #RubyOnRails
[08:03:53] bennysan: has joined #RubyOnRails
[08:07:25] marr: has joined #RubyOnRails
[08:12:37] d34th4ck3r: I???m getting started with testing in Rails 4.2. This is my first time testing in Ruby or Rails so I???m too confused right now with too many things, factory_girl, Rspec etc Is there a good place you???d like to show me to get started?
[08:15:55] tbuehlmann: d34th4ck3r, for getting started, have a look at the guide: http://guides.rubyonrails.org/testing.html (WIP)
[08:16:22] d34th4ck3r: tbuehlmann: Completed that. But people here justed fixtures are not such a good idea.
[08:16:29] rhizome: factory girl will be easy, rspec is optional
[08:17:12] rhizome: fixtures are fine, rails core uses them
[08:17:46] tbuehlmann: my dev lead just decided against factories in favor of fixtures (reason: speed)
[08:18:07] d34th4ck3r: I???m even confused between the relation of rspec and factory girl. Do I need both gem for testing, what is the relation between two etc.
[08:18:10] tbuehlmann: he also decided agains rspec in favor of minitest, because of "easier", built-in
[08:18:31] rhizome: yeah baby, go pure
[08:18:52] tbuehlmann: I mentioned that minitest also has the spec DSL. oh, we can use that of course
[08:18:56] d34th4ck3r: Is it easy to switch later, when the application goes huge?
[08:18:57] rhizome: i'm gonna start a rails minitest-fixtures club
[08:19:07] tbuehlmann: silly me, thinking we think things through..
[08:19:55] tbuehlmann: d34th4ck3r, from minitest to rspec will be quite a change (if you haven't used minitest's spec DSL)
[08:20:00] rhizome: switching might be tedious, but not a big deal. it's just generating test data
[08:20:09] matthias__: has joined #RubyOnRails
[08:20:19] adre: has joined #RubyOnRails
[08:20:32] teclator: has joined #RubyOnRails
[08:20:57] pawnbox: has joined #RubyOnRails
[08:21:35] rhizome: fixtures: u = users(:unconfirmed); factory: u = create(:user, :unconfirmed)
[08:22:57] ibouvousaime: has joined #RubyOnRails
[08:23:02] vigintas: has joined #RubyOnRails
[08:23:42] Pazician: has joined #RubyOnRails
[08:24:58] mark3: has joined #RubyOnRails
[08:25:45] d34th4ck3r: rhizome: when I use users(:one) in my fixtures, it says undefined method ???users???
[08:27:34] sharkman: has joined #RubyOnRails
[08:28:18] d34th4ck3r: here my code with error for referrence: https://gist.github.com/d34th4ck3r/93c22da400fa79c5e7d2
[08:28:32] mikecmpbll: has joined #RubyOnRails
[08:29:35] yogeshrt: has joined #RubyOnRails
[08:31:38] voker57: has joined #RubyOnRails
[08:32:01] NBarnes: has joined #RubyOnRails
[08:32:30] Pupeno: has joined #RubyOnRails
[08:33:43] jsrn_: has joined #RubyOnRails
[08:33:50] Guest43: has joined #RubyOnRails
[08:35:35] aganov: Hi, anyone experiencing slow loading on safari? (rails 4.2.4 + passenger)
[08:36:28] dionysus69: has joined #RubyOnRails
[08:38:28] simi: has joined #RubyOnRails
[08:42:33] arup_r: JS is very hard!!
[08:43:00] krz: has joined #RubyOnRails
[08:43:38] pawnbox: has joined #RubyOnRails
[08:44:28] circ-user-kkU2e: has joined #RubyOnRails
[08:45:32] vigintas: has joined #RubyOnRails
[08:48:24] nhhagen: has joined #RubyOnRails
[08:49:27] pawnbox: has joined #RubyOnRails
[08:51:07] tvw: has joined #RubyOnRails
[08:52:53] bmalum: has joined #RubyOnRails
[08:54:04] pontiki: has joined #RubyOnRails
[08:56:41] cleopatra: hey d34th4ck3r take look https://leanpub.com/everydayrailsrspec
[08:57:18] aganov: I've found the problem http://apple.stackexchange.com/questions/118150/safari-7-cant-connect-to-intranet-using-http-authentication :|
[08:57:27] nettoweb: has joined #RubyOnRails
[08:58:38] bonemind: has joined #RubyOnRails
[08:58:45] d34th4ck3r: Thanks cleopatra ! But I don???t have money to buy a book as of now haha. Any online link would be great though.
[09:00:58] jgt2: has joined #RubyOnRails
[09:02:37] Peg-leg: has joined #RubyOnRails
[09:04:17] norc_: Given a many-to-many relationship between"fruit_tree" and "user_garden", how would you name a controller that manages the associations between the two? "FruitTreesUserGardensAssociationController" ?
[09:04:37] DoubleMalt: has joined #RubyOnRails
[09:04:59] norc_: FruitTreesUserGardensAssociationsController rather.
[09:05:25] norc_: Or should FruitTree and UserGarden be singular?
[09:06:21] arup_r: has joined #RubyOnRails
[09:09:42] drbayer: has joined #RubyOnRails
[09:12:08] dionysus69: has joined #RubyOnRails
[09:12:28] pawnbox: has joined #RubyOnRails
[09:13:34] dionysus69: has joined #RubyOnRails
[09:15:35] jenrzzz: has joined #RubyOnRails
[09:16:27] pawnbox: has joined #RubyOnRails
[09:16:29] tedstriker: has joined #RubyOnRails
[09:17:52] bonemind: has joined #RubyOnRails
[09:18:07] Axy: has joined #RubyOnRails
[09:18:07] Axy: has joined #RubyOnRails
[09:18:43] dopamean1: has joined #RubyOnRails
[09:19:33] dopie: has joined #RubyOnRails
[09:19:46] Regulati_: has joined #RubyOnRails
[09:19:49] nebuer_: has joined #RubyOnRails
[09:20:03] chipotle_: has joined #RubyOnRails
[09:20:05] Dreamer3: has joined #RubyOnRails
[09:20:35] Veejay: has left #RubyOnRails: ("WeeChat 0.4.2")
[09:20:38] lsone_: has joined #RubyOnRails
[09:20:39] lxsameer: has joined #RubyOnRails
[09:20:39] lxsameer: has joined #RubyOnRails
[09:20:41] armyriad: has joined #RubyOnRails
[09:20:45] Zadrel: has joined #RubyOnRails
[09:20:46] penguinpowernz: has joined #RubyOnRails
[09:20:52] arthurnn_: has joined #RubyOnRails
[09:21:22] hhatch: has joined #RubyOnRails
[09:21:29] pwnd_nsfw: has joined #RubyOnRails
[09:22:15] arBmind: has joined #RubyOnRails
[09:22:38] hive-mind: has joined #RubyOnRails
[09:24:38] l_tonz: has joined #RubyOnRails
[09:26:57] dhjondoh: has joined #RubyOnRails
[09:30:05] diegobiavati: has joined #RubyOnRails
[09:35:05] passbe1: has joined #RubyOnRails
[09:35:41] mark3: has joined #RubyOnRails
[09:35:49] passbe1: has left #RubyOnRails: ()
[09:35:55] arup_r: has joined #RubyOnRails
[09:36:13] passbe: has joined #RubyOnRails
[09:36:14] mark3: has joined #RubyOnRails
[09:36:53] mark3: has joined #RubyOnRails
[09:36:59] passbe: guys trying to mock model.destroy to get a fail condition on my controller specs. Someone have a quick look: https://gist.github.com/passbe/0bb6217c4b1dcff9a57f
[09:37:27] mark3: has joined #RubyOnRails
[09:37:51] mark3: has joined #RubyOnRails
[09:38:52] mikecmpbll: anyone know if there's a way to have application specific log-in views with doorkeeper?
[09:39:06] mark3: has joined #RubyOnRails
[09:39:25] ivanyk: has joined #RubyOnRails
[09:39:38] mikecmpbll: specific to the client application
[09:42:10] mark3: has left #RubyOnRails: ()
[09:43:49] jenrzzz: has joined #RubyOnRails
[09:44:42] thecyclone: has joined #RubyOnRails
[09:47:55] dionysus69: has joined #RubyOnRails
[09:51:31] rodfersou: has joined #RubyOnRails
[09:52:23] diegobiavati_: has joined #RubyOnRails
[09:52:56] quazimodo: has joined #RubyOnRails
[09:52:57] quazimod1: has joined #RubyOnRails
[09:53:49] norc_: passbe: Ok I looked. What is your question/problem?
[09:54:48] ruurd: has joined #RubyOnRails
[09:56:21] workmad3: passbe: allow_any_instance_of(Article).to receive(:destroy).and_return(false)
[09:56:29] passbe: norc_: so i need @article.destroy to return false to be able to test the redirect :back
[09:56:36] passbe: workmad3: trying that
[09:56:44] workmad3: passbe: needs to be before the request
[09:56:50] jgt2: has joined #RubyOnRails
[09:58:26] fcser_: has joined #RubyOnRails
[09:58:31] Peg-leg1: has joined #RubyOnRails
[09:58:53] helpa: has joined #RubyOnRails
[09:59:04] jgt: has joined #RubyOnRails
[09:59:05] Babelfish: has joined #RubyOnRails
[09:59:12] stannard: has joined #RubyOnRails
[09:59:23] passbe: workmad3: ah perfect that worked great thanks. was missing the any_instace and it was after my request
[09:59:28] passbe: cheers workmad3 and norc_
[10:00:05] norc_: Glad I could help. Heh.
[10:00:09] Shidash_: has joined #RubyOnRails
[10:00:14] ebryn_: has joined #RubyOnRails
[10:00:26] dopamean_: has joined #RubyOnRails
[10:00:51] alexcid1: has joined #RubyOnRails
[10:01:46] ruurd: has joined #RubyOnRails
[10:01:48] fumduq-: has joined #RubyOnRails
[10:01:59] jxs_: has joined #RubyOnRails
[10:02:11] crankhar1er: has joined #RubyOnRails
[10:02:18] luckyme__: has joined #RubyOnRails
[10:02:43] totimkop1: has joined #RubyOnRails
[10:02:47] vij-_: has joined #RubyOnRails
[10:02:53] Mch1: has joined #RubyOnRails
[10:02:54] hellschreiber_: has joined #RubyOnRails
[10:03:06] kramsee_: has joined #RubyOnRails
[10:03:14] rlomax_: has joined #RubyOnRails
[10:03:14] speaking1ode: has joined #RubyOnRails
[10:03:18] Wobni: has joined #RubyOnRails
[10:03:22] Pro|_: has joined #RubyOnRails
[10:03:31] marcoceppi_: has joined #RubyOnRails
[10:03:35] hive-mind: has joined #RubyOnRails
[10:03:37] arthurix: has joined #RubyOnRails
[10:03:37] artto: has joined #RubyOnRails
[10:05:02] kumavis_: has joined #RubyOnRails
[10:05:10] pawnbox: has joined #RubyOnRails
[10:05:26] _fortis_: has joined #RubyOnRails
[10:06:47] abracada-: has joined #RubyOnRails
[10:06:52] elaptics`: has joined #RubyOnRails
[10:07:11] passbe: has left #RubyOnRails: ("WeeChat 1.3")
[10:07:18] svkurowsm: has joined #RubyOnRails
[10:07:20] Junaos_: has joined #RubyOnRails
[10:08:43] Papierkorb: has joined #RubyOnRails
[10:08:49] adam|: has joined #RubyOnRails
[10:08:50] dionysus69: has joined #RubyOnRails
[10:09:03] nemo_: has joined #RubyOnRails
[10:09:12] GreySyntax: has joined #RubyOnRails
[10:10:08] GarethAdams: has joined #RubyOnRails
[10:10:39] SmOkE_RU: has joined #RubyOnRails
[10:10:39] SmOkE_RU: has joined #RubyOnRails
[10:10:42] alevy: has joined #RubyOnRails
[10:10:46] speakingcode: has joined #RubyOnRails
[10:11:59] RedDwarf: has joined #RubyOnRails
[10:13:20] jahbrewski: has joined #RubyOnRails
[10:13:43] Tinyyy: has joined #RubyOnRails
[10:14:16] jsrn_: has joined #RubyOnRails
[10:14:21] wldcordeiro: has joined #RubyOnRails
[10:14:25] jahbrewski: hey folks.. I'm running into some weird errors running ngrok + puma. On occassion, when I try to hit my rails API through my ngrok tunnel, all I get are 404 errors.. even though I know the routes exist.
[10:14:50] Majadon: has joined #RubyOnRails
[10:14:52] doge__: has joined #RubyOnRails
[10:15:10] jahbrewski: it's even weirder.. because I don't *always* get 404 errors. Sometimes it works.
[10:15:27] mjc_: has joined #RubyOnRails
[10:15:54] alxndr: has joined #RubyOnRails
[10:15:54] FailBit: https://40.media.tumblr.com/b5a19df271bc2fc3863f5fd6565f8f4a/tumblr_nwn6edh8Aa1rsug4po1_500.jpg
[10:16:05] n1lo: has joined #RubyOnRails
[10:16:10] towler: has joined #RubyOnRails
[10:16:17] marienz: has joined #RubyOnRails
[10:16:53] lacrosse: has joined #RubyOnRails
[10:17:07] sparr: has joined #RubyOnRails
[10:17:17] Aeyrix: has joined #RubyOnRails
[10:18:40] iamdevnul: has joined #RubyOnRails
[10:18:59] jgt: has joined #RubyOnRails
[10:20:26] rickmasta: has joined #RubyOnRails
[10:21:19] quazimodo: has joined #RubyOnRails
[10:23:09] jahbrewski: ah.. I think I got it figured out. some weird shit with a vpn I was using
[10:25:44] l_tonz: has joined #RubyOnRails
[10:26:57] daffy_duck: has joined #RubyOnRails
[10:27:15] jahbrewski: hmm.. looks like that actually wasn't the problem
[10:28:29] quazimod1: has joined #RubyOnRails
[10:29:14] jbrinkmusic: when saving values to a database table, is it possible to check if a combination of two columns are unique instead of each individually?
[10:30:11] tbuehlmann: jbrinkmusic, yes, see the scope stuff: http://guides.rubyonrails.org/active_record_validations.html#uniqueness
[10:30:18] mostlybadfly: has joined #RubyOnRails
[10:32:39] njero: has joined #RubyOnRails
[10:33:18] ldnunes: has joined #RubyOnRails
[10:33:21] nemo__: has joined #RubyOnRails
[10:33:40] d34th4ck3r: I???m trying to run a simple test but I keep getting undefined method users for following test function: https://gist.github.com/d34th4ck3r/93c22da400fa79c5e7d2
[10:33:50] jbrinkmusic: tbuehlmann: thank you
[10:33:52] renegadeandy: has joined #RubyOnRails
[10:34:07] d34th4ck3r: I don???t understand, shouldn???t users function be avaibale in tests already?
[10:34:46] dionysus69: has joined #RubyOnRails
[10:35:35] ivanyk: has joined #RubyOnRails
[10:37:21] symbol: has joined #RubyOnRails
[10:37:36] peterpp: has joined #RubyOnRails
[10:38:45] peterpp: has left #RubyOnRails: ()
[10:39:19] sankaber: has joined #RubyOnRails
[10:39:31] lulzmachine: has joined #RubyOnRails
[10:41:24] peterppp: has joined #RubyOnRails
[10:41:33] peterppp: Say, my app has models for posts and images, and I want to make both commentable. What would be the most elegant way to do that? Creating separate models PostComment and ImageComment seems very repetitive
[10:42:06] Pazician: has joined #RubyOnRails
[10:43:15] FailBit: you could use polymorphism
[10:43:24] FailBit: but polymorphic relations kind of suck
[10:43:55] peterppp: polymorphism on what level?
[10:45:13] peterppp: ah, I didn't know that Rails comes with its own polymorphic associations, I'll look into that
[10:45:18] njero: FailBit: y did u say that ? whats wrong with polymorphic relations?
[10:45:39] jenrzzz: has joined #RubyOnRails
[10:46:08] peterppp: I'd also be interested
[10:46:38] FailBit: it's a bit of a pita to join them
[10:47:12] hfp_work: has joined #RubyOnRails
[10:48:08] dhjondoh: has joined #RubyOnRails
[10:49:30] stien: has joined #RubyOnRails
[10:50:06] stien: has joined #RubyOnRails
[10:50:48] Linuus: has joined #RubyOnRails
[10:51:11] njero: but its quite easy for has_may and belongs_to .. no need for separate joins
[10:53:58] norc_: I have a nested resource with a custom controller name which seems to break simple_form for the back button: http://pastie.org/10501644
[10:54:04] Pazician: has joined #RubyOnRails
[10:54:32] pontiki: has joined #RubyOnRails
[10:54:47] nya: has joined #RubyOnRails
[10:56:21] workmad3: has joined #RubyOnRails
[10:57:05] norc_: (The error comes from the call into simple_form_for)
[10:58:04] darrencauthon: has joined #RubyOnRails
[10:58:06] yardenbar: has joined #RubyOnRails
[10:58:40] mikecmpbll: eugh, oauth is so overkill for what i want. i'm disappointed no one told me this before i spent a week on it :p
[10:59:30] chills42: has joined #RubyOnRails
[11:00:07] moeabdol: has joined #RubyOnRails
[11:00:19] chills42_: has joined #RubyOnRails
[11:00:23] stamina: has joined #RubyOnRails
[11:03:10] mikecmpbll: norc_: just use the route helper?
[11:03:18] bruno-: has joined #RubyOnRails
[11:03:21] dhjondoh: has joined #RubyOnRails
[11:08:16] beast: has joined #RubyOnRails
[11:10:34] MartinEl_: has joined #RubyOnRails
[11:12:11] artto: has joined #RubyOnRails
[11:15:34] RichiH: has joined #RubyOnRails
[11:15:51] juhoh: has joined #RubyOnRails
[11:16:16] jgt: has joined #RubyOnRails
[11:16:21] RichiH: i need a simple web ui for a database. is it possible to spin on a rails project over an existing database?
[11:16:36] RichiH: assuming the db design is properly normalized, etc, yes :)
[11:17:11] RichiH: or is it quicker to just re-implemented the database structure in rails and start from there?
[11:17:22] juhoh: why is AR returning a field value as String when that value is enumerated? If it's not I get the Fixnum as expected for integer type
[11:18:23] pawnbox: has joined #RubyOnRails
[11:18:40] ruurd: has joined #RubyOnRails
[11:19:58] RichiH: marienz: see above :)
[11:21:07] gavit: why do I have to specify a , label_method: :company_name for my simple form f.association for one model, but not for the other? am I missing something?
[11:21:24] wethu: has joined #RubyOnRails
[11:21:45] vigintas: has joined #RubyOnRails
[11:22:43] stien: has joined #RubyOnRails
[11:23:55] pawnbox: has joined #RubyOnRails
[11:24:14] dionysus69: has joined #RubyOnRails
[11:25:34] ibouvousaime: has joined #RubyOnRails
[11:27:23] mikecmpbll: juhoh: pretty sure that's one of the points of the enum type
[11:28:25] chipotle: has joined #RubyOnRails
[11:28:42] cornerma1: has joined #RubyOnRails
[11:30:15] yogeshrt: has joined #RubyOnRails
[11:30:38] curses: has joined #RubyOnRails
[11:31:24] nickenchuggets: has joined #RubyOnRails
[11:31:24] nickenchuggets: has joined #RubyOnRails
[11:31:53] big|bad|wolf: has joined #RubyOnRails
[11:32:58] arup_r: gavit: gist please
[11:39:41] gavit: arup_r: figured it out. if your model has a _name method it works out of the box, incase that method doesnt exist it prbably uses model.toString or something
[11:39:42] juhoh: mikecmpbll: what do you mean? not having enum: I get instance.field.class #=> Fixnum, with enum: instance.field.class #=> String. what's the point here
[11:40:06] mikecmpbll: the point is that you get the value of the enum ..
[11:40:52] arup_r: cool gavit
[11:42:10] juhoh: I've been too long in front of this machine...
[11:42:29] jenrzzz: has joined #RubyOnRails
[11:42:39] gingray: has joined #RubyOnRails
[11:43:50] workmad3: juhoh: if enum fields didn't translate an int in the db into a string for your code, there wouldn't be much point to them :P
[11:44:06] gavit: if you have a model X with a method def set_employee(employee), how does ruby know that the employee will be of 'class' employee?
[11:46:43] mikecmpbll: gavit: it doesn't.
[11:48:09] gavit: mikecmpbll: so can I 'force' it to?
[11:48:24] mikecmpbll: gavit: you can type check yourself if you want, but it's usually an anti-pattern
[11:48:33] mikecmpbll: what are you trying to do?
[11:49:17] gavit: mikecmpbll: I want my ide to do autocompletion, cause I'm lazy :P
[11:49:36] mikecmpbll: autocomplete what, though?
[11:50:06] gavit: mikecmpbll: and for testing purposes I want to do something like in java: Assert.assertTrue(myModel is of type MyModel)
[11:50:23] Uptime: has joined #RubyOnRails
[11:50:47] mikecmpbll: my_model.is_a?(MyClass)
[11:51:23] dionysus69: has joined #RubyOnRails
[11:52:29] mikecmpbll: look up ducktyping though. you seem to be in the wrong mindset for a dynamically typed language like ruby.
[11:54:13] wethu: has joined #RubyOnRails
[11:55:39] allcentury: has joined #RubyOnRails
[11:56:42] eggoez: has joined #RubyOnRails
[11:57:21] agumon: has joined #RubyOnRails
[11:57:32] nfk|laptop: has joined #RubyOnRails
[12:00:00] moeabdol: has joined #RubyOnRails
[12:06:27] yogeshrt: has joined #RubyOnRails
[12:07:32] norc_: mikecmpbll: What do you mean with route helper?
[12:07:57] norc_: mikecmpbll: The thing is Im not supplying any in the first place.
[12:08:00] mikecmpbll: rollout_zone_associations(@association)
[12:08:07] mikecmpbll: woops, rollout_zone_associations_path(@association)
[12:10:53] bennysan: has joined #RubyOnRails
[12:13:21] nfk|laptop: has joined #RubyOnRails
[12:14:21] moeabdol: has joined #RubyOnRails
[12:14:48] rustymyers: has joined #RubyOnRails
[12:15:10] dionysus69: has joined #RubyOnRails
[12:16:50] norc_: mikecmpbll: Oh. So it guesses the route helper based on the Class of whatever I pass it to by default?
[12:17:58] andatche: has joined #RubyOnRails
[12:20:41] atomical: has joined #RubyOnRails
[12:22:16] Linuus: has joined #RubyOnRails
[12:24:09] daviddavis: has joined #RubyOnRails
[12:24:25] pawnbox: has joined #RubyOnRails
[12:24:30] daviddavis: anyone know how I can refactor this test for rails 4/strong_params? https://gist.github.com/daviddavis/6f042b041338520c268d
[12:25:10] daviddavis: do I just set the user attributes individually (eg user.name=, etc) or should I use ActionController::Parameters ?
[12:25:18] teclator: has joined #RubyOnRails
[12:25:51] Pumukel: has joined #RubyOnRails
[12:25:54] ramirio: has joined #RubyOnRails
[12:28:22] adre: has joined #RubyOnRails
[12:29:03] ramirio: How can I make a ModelA has_one to ModelB but has_many to ModelC while ModelB belongs to ModelC?
[12:29:29] JohnBat26: has joined #RubyOnRails
[12:29:51] mrbubbles: ramirio: I think that would be fine if you includ that in the models, no?
[12:30:12] mrbubbles: Obviously if you have a serializer you can???t include the associations both ways or it will panic, but that???s usual anyway
[12:30:44] ramirio: i'll check this
[12:31:00] Icey: has joined #RubyOnRails
[12:34:32] danoph: has joined #RubyOnRails
[12:36:48] dmz: has joined #RubyOnRails
[12:36:48] dmz: has joined #RubyOnRails
[12:37:13] norc_: daviddavis: Just pass the parameters in your integration/request specs.
[12:37:48] sankaber: has joined #RubyOnRails
[12:38:19] sdwrage: has joined #RubyOnRails
[12:38:51] MartinEl_: has joined #RubyOnRails
[12:38:52] daviddavis: norc_: so like create a params thingy and call #permit?
[12:38:55] surrealanalysis: has joined #RubyOnRails
[12:39:00] mrbubbles: Does anyone use Active Model Serializers? I have a has_many relationship which is causing several queries, I???d like to try and reduce this if possible but as I???m using side-loading I???m not sure if it???s possible
[12:39:08] daviddavis: User.new params.permit(:name, :age)
[12:39:25] rickmasta: has joined #RubyOnRails
[12:39:46] nemo_: has joined #RubyOnRails
[12:39:57] norc_: daviddavis: Just stub the params hash.
[12:40:05] daviddavis: norc_: ah ok
[12:40:18] sadaf2605: has joined #RubyOnRails
[12:42:48] sadaf2605: I don't have any Monitor model, yet I am getting following error at rails g model monitor:
[12:42:48] sadaf2605: "The name 'Monitor' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again."
[12:43:15] matthewd: sadaf2605: There's a Monitor in stdlib
[12:43:22] rubyonrailed: has joined #RubyOnRails
[12:43:30] sadaf2605: matthewd: thanks
[12:45:54] mikecmpbll: norc_: yep it does (was having my lunch :p)
[12:45:59] fungoat: has joined #RubyOnRails
[12:47:15] juhoh: mrbubbles: try eager loading the relation using .includes
[12:47:40] mrbubbles: juhoh: would I do this in my serializer or controller?
[12:48:59] naftilos76: has joined #RubyOnRails
[12:49:32] eoy_: has joined #RubyOnRails
[12:50:10] m712: has joined #RubyOnRails
[12:51:46] juhoh: mrbubbles: in the controller
[12:51:48] treehug88: has joined #RubyOnRails
[12:53:20] mag42c: has joined #RubyOnRails
[12:54:01] mikecmpbll: mrbubbles: what queries are you trying to preven
[12:54:07] ramortegui: has joined #RubyOnRails
[12:54:31] platzhirsch: has joined #RubyOnRails
[12:54:32] platzhirsch: I've implemented a set of classes, which inherit from a base class, based on that base class I've implemented certain Active Record methods, so that I was able to use it in AR like fashion, although they were not persisted, but rather a big set of singletons which generated most views in my app ... I am looking for a nice title hear.. any ideas? It's basically meta programming
[12:55:17] mikecmpbll: i lost you on the generating views part.
[12:56:01] gavit: mikecmpbll: will look up ducktyping, thanks
[12:56:20] gavit: mikecmpbll: I keep switching between ruby and android :)
[12:56:44] daviddavis: has left #RubyOnRails: ("WeeChat 1.0.1")
[12:58:21] dmz: has joined #RubyOnRails
[12:58:22] dmz: has joined #RubyOnRails
[12:59:22] platzhirsch: mikecmpbll: Basically, what you could do is create a new class let's say MyFancyMetric, another singleton which inherits from Metric. And then you could go to /metric/my-fancy-metric and woosh you had a nice view which showed everything which metric provided over certain base classes and which you might have extended in your MyFancyMetric
[12:59:53] norc_: By the way, is there an alternative way to path helpers than those magic methods like foo_bar_quux_path?
[13:00:12] johnflux: has joined #RubyOnRails
[13:00:32] matthewd: norc_: What sort of alternative?
[13:00:50] Uptime: has joined #RubyOnRails
[13:00:56] mikecmpbll: platzhirsch: k, you want a suggestion for the name of .. the pattern? or what
[13:01:19] mikecmpbll: norc_: sure, type the path
[13:01:33] gavit: mikecmpbll: I have an 'employee' which has a 'salary' with as attributes hour_rate. Now I want to make a SalarySlipCalculator with a method set_employee, and then calculate the taxes by doing something like @employee.salary.hour_rate*@employee.workschedule.hours_workedin("December 2014")*TAX_RATE
[13:01:39] norc_: matthewd: Are there some instance methods generated by AR so I could maybe say redirect_to @object.destroy_path ?
[13:01:54] norc_: matthewd: (Obviously just for RESTful resource routes)
[13:02:01] mikecmpbll: gavit: okidokes
[13:02:27] gavit: mikecmpbll: with ducktyping I have to check if the methods exist?
[13:02:33] allcentury: has joined #RubyOnRails
[13:02:48] mikecmpbll: no, you don't check if the methods exist, you just assume they do
[13:02:53] norc_: matthewd: I mean all those url methods already accept AR instances, which always ends up generating a path to the show action.
[13:03:07] mikecmpbll: if they don't it will cause an exception, which is correct because .. it's exceptional behaviour :)
[13:03:16] platzhirsch: mikecmpbll: yeah I am trying to grasp the concept I've implemented a while ago.. it basically includes singletons which implement AR interface methods, which are loaded statically and used for meta-programmin to generate parts of the app :)
[13:03:22] matthewd: norc_: http://api.rubyonrails.org/classes/ActionDispatch/Routing/PolymorphicRoutes.html might help?
[13:03:31] norc_: mikecmpbll: So if my code cause exceptions, Im an exceptional person?
[13:03:45] tagrudev: has joined #RubyOnRails
[13:03:47] norc_: mikecmpbll: That line of thinking just might explain some of that proprietary code we paid a lot of money for...
[13:04:38] platzhirsch: in a way it's like generics
[13:04:40] norc_: matthewd: Actually it might. THanks :)
[13:05:42] mikecmpbll: platzhirsch: i don't really entirely understand what it is you've done, might be easier with an example
[13:07:28] peterppp: is there anyone who lives in Berlin and takes part in the regular user group meet-ups?
[13:08:37] norc_: An unrelated question. I sometime have models that have 1 to many relationships like this FooA -> FooB -> FooC -> FooD -> FooE. Most of these foreign keys are nullable.
[13:09:07] norc_: Now given a fooa, I would like to do fooa.foob.fooc.food.fooe.attr in some views, without defensively checking each time whether foob is nil, fooc is nil, etc.
[13:09:14] jkamenik: has joined #RubyOnRails
[13:09:27] norc_: And I dont really want to catch a NoMethod error either.
[13:09:41] drbayer: has joined #RubyOnRails
[13:11:01] tbuehlmann: norc_, sounds like you want monads (or .try().try().try(), or ifs, or wait for a newer ruby version implementing the .? syntax)
[13:12:06] pawnbox: has joined #RubyOnRails
[13:13:09] jgt: has joined #RubyOnRails
[13:13:39] norc_: tbuehlmann: Whats that about the .? syntax? And it seems like .try() is the thing I want. :)
[13:14:10] nemo_: has joined #RubyOnRails
[13:15:02] bonhoeffer: has joined #RubyOnRails
[13:15:43] sharkman: has joined #RubyOnRails
[13:15:55] secretlives: has joined #RubyOnRails
[13:16:21] tbuehlmann: see https://bugs.ruby-lang.org/issues/11537
[13:17:09] norc_: Ah neat. :)
[13:18:54] bonhoeffer: anyone else finding that their schema.rb isn???t updating on migrations?
[13:19:14] norc_: bonhoeffer: It should not by itself.
[13:20:04] norc_: bonhoeffer: rake db:schema:dump executes the task to dump it (for when you want to deploy to production for example)
[13:20:33] bonhoeffer: norc_: what do you mean to dump it?
[13:22:15] elaptics`away: has joined #RubyOnRails
[13:22:48] elaptics`away: has left #RubyOnRails: ()
[13:23:06] norc_: bonhoeffer: misunderstanding. So you executed the migrate rake task, and your schema.rb did not update?
[13:23:10] elaptics: has joined #RubyOnRails
[13:23:30] bonhoeffer: wondering how i can troubleshoot
[13:23:54] norc_: bonhoeffer: Do you have config.active_record.dump_schema_after_migration = false in your config perhaps?
[13:24:06] bonhoeffer: ah ??? i???ll check
[13:24:56] bonhoeffer: no ??? but i added it explicitly and set it to true
[13:25:14] codelahoma: has joined #RubyOnRails
[13:26:03] norc_: bonhoeffer: Test Rails.application.config.active_record.dump_schema_after_migration in your rails console tho, just to make sure it does not get overwritten somewhere
[13:27:18] pawnbox: has joined #RubyOnRails
[13:27:18] Lewix: has joined #RubyOnRails
[13:28:04] njero: guys i'm starting from scratch with rails test. I'm confused whether to go with default minitests and fixtures or rspec and factory girl.. I'm writing an api for mobile app. any suggestions?
[13:28:53] norc_: n_e_o: That question is almost as good as asking which editor people prefer. :p
[13:29:07] jerry_tao: has joined #RubyOnRails
[13:30:08] njero: norc_: Oh.. that's dump
[13:30:25] norc_: n_e_o: My point is, both are fine and a lot of people have made arguments for either side.
[13:30:59] njero: norc_: ya.. i got it.. I meant I'm dump .. :)
[13:32:17] njero: norc_: thanks. so let me roll the dice and decide :)
[13:33:19] mhoungbo: has joined #RubyOnRails
[13:33:36] Lytol: has joined #RubyOnRails
[13:34:00] norc_: n_e_o: In the end minitest is lightweight (it loads very quickly), simple, ships with the standard library, etc. Rspec is way more complex but brings more features - that is a very rudimentary comparison.
[13:34:04] annlewis: has joined #RubyOnRails
[13:35:17] treehug88: has joined #RubyOnRails
[13:35:23] bauruine: has joined #RubyOnRails
[13:35:30] mhoungbo_: has joined #RubyOnRails
[13:37:50] chopin: has joined #RubyOnRails
[13:38:35] lytol_: has joined #RubyOnRails
[13:40:18] yogeshrt: has joined #RubyOnRails
[13:40:38] workmad3: has joined #RubyOnRails
[13:40:51] chipotle: has joined #RubyOnRails
[13:41:33] nemo__: has joined #RubyOnRails
[13:44:57] umgrosscol: has joined #RubyOnRails
[13:45:01] danoph: has joined #RubyOnRails
[13:45:02] The_Phoenix: has joined #RubyOnRails
[13:45:20] njero: norc_: hm.. will start with basic and update to rspec when necessary
[13:45:32] krz: has joined #RubyOnRails
[13:49:25] nemo_: has joined #RubyOnRails
[13:50:19] ych: has joined #RubyOnRails
[13:51:00] pawnbox: has joined #RubyOnRails
[13:51:01] ruurd: has joined #RubyOnRails
[13:51:39] darrencauthon: has joined #RubyOnRails
[13:55:30] cleopatra: has joined #RubyOnRails
[13:57:07] secretlives: has joined #RubyOnRails
[13:57:26] atmosx: has joined #RubyOnRails
[13:58:05] atmosx: hello everyone
[13:59:30] The_Phoenix: has joined #RubyOnRails
[13:59:34] peterppp: has joined #RubyOnRails
[14:03:44] Lightsword: has joined #RubyOnRails
[14:09:35] MartinEl_: has joined #RubyOnRails
[14:12:12] nemo_: has joined #RubyOnRails
[14:13:09] Icey: has joined #RubyOnRails
[14:13:32] chipotle: has joined #RubyOnRails
[14:14:24] doublemalt_: has joined #RubyOnRails
[14:15:13] siddart: has joined #RubyOnRails
[14:15:36] meltdown: has joined #RubyOnRails
[14:16:00] pusewicz: has joined #RubyOnRails
[14:16:20] IFrank00: has joined #RubyOnRails
[14:16:45] tris: has joined #RubyOnRails
[14:17:03] gthank: has joined #RubyOnRails
[14:17:03] gthank: has joined #RubyOnRails
[14:18:09] The_Phoenix: has joined #RubyOnRails
[14:18:57] dionysus69: has joined #RubyOnRails
[14:20:30] surrealanalysis: has joined #RubyOnRails
[14:21:27] meltdown: has left #RubyOnRails: ()
[14:25:06] Uptime: has joined #RubyOnRails
[14:25:45] stannard: has joined #RubyOnRails
[14:26:02] bbrowning: has joined #RubyOnRails
[14:28:37] l_tonz: has joined #RubyOnRails
[14:29:51] relix_: has joined #RubyOnRails
[14:30:15] mikecmpbll: i'm a little confused about the Rails authenticity token, how long is it valid for?
[14:30:40] mikecmpbll: i've read it gets stored in the session, and placed in forms, so when the form is submitted it's checked against the session
[14:31:22] mikecmpbll: if a user visits a page with a form, grabs the token. then does a curl post half an hour later with that token, would that work?
[14:31:31] jgt: has joined #RubyOnRails
[14:33:10] greengriminal: has joined #RubyOnRails
[14:35:03] tubbo: mikecmpbll: i feel like it *eventually* expires because if i try to like re-submit a form post after closing my laptop and re-opening after a couple hours, it will throw a CSRF token failure
[14:35:12] circ-user-kkU2e: has joined #RubyOnRails
[14:35:41] stien: has joined #RubyOnRails
[14:35:50] bricker: has joined #RubyOnRails
[14:37:54] dnewkerk: has joined #RubyOnRails
[14:38:12] l_tonz: has joined #RubyOnRails
[14:39:00] mikecmpbll: hmm. i wonder if i can generate authenticity tokens in the controller before a redirect to another site, then stick that token in the form on the other site and successfully post back to original site.
[14:39:48] kies^: has joined #RubyOnRails
[14:40:57] macowie: has joined #RubyOnRails
[14:41:11] mitchless: has joined #RubyOnRails
[14:43:10] tubbo: mikecmpbll: you'd still be blocked by CORS
[14:43:20] mikecmpbll: tubbo: that only applies to javascript requests
[14:43:23] tubbo: unless both servers allowed it i suppose
[14:43:26] tubbo: mikecmpbll: that is not true
[14:43:33] tubbo: happens to font requests too
[14:43:43] mikecmpbll: ok, well it doesn't apply to cross-site post requests :d
[14:43:46] mikecmpbll: at least that's what I've read.
[14:43:47] i: has joined #RubyOnRails
[14:43:52] nemo_: has joined #RubyOnRails
[14:44:38] tubbo: either way how would you "stick a token" in the form on another site?
[14:44:39] mikecmpbll: font requests are kind of javascript requests anyway, they happen async
[14:44:57] mikecmpbll: tubbo: by including the token in the redirect parameters back to the other site
[14:45:15] tubbo: yeah that would probably do it
[14:45:24] tubbo: mikecmpbll: what are you doing this for btw?
[14:46:01] mikecmpbll: we're implementing an auth server to unify authentication on all of our apps (currently separate logins)
[14:46:22] mikecmpbll: i want to have the least impact i can on the current UX for signing in
[14:46:39] mikecmpbll: i've used Oauth on the authentication server and the current flows require being redirected to the auth server to sign in
[14:46:46] tubbo: yeah, basically
[14:46:50] tubbo: unless you iframe'd it
[14:46:58] mikecmpbll: i'm not particularly happy with it, or the alternatives like iframe/popup
[14:48:10] mikecmpbll: if this works, it'll be virtually the same as now but with a few redirects going on that the user probably won't notice anyway
[14:49:07] erichu: has joined #RubyOnRails
[14:50:27] jkamenik1: has joined #RubyOnRails
[14:52:07] bonhoeffer: is there a shorthand for @user.books << @book; @user.save
[14:52:44] bonhoeffer: is the best @user.update_attribute(book_ids, [@book.id])
[14:53:30] pawnbox: has joined #RubyOnRails
[14:55:58] goldbug: has joined #RubyOnRails
[14:57:09] pusewicz: has joined #RubyOnRails
[14:57:16] maxx88: has left #RubyOnRails: ()
[14:57:17] goldbug: Hi folks, I keep getting a 'Stack level too deep' error message when trying to create or update records via my (rudimentary) webform. The model, controller and view files are here along with the console error message I'm getting: https://gist.github.com/anonymous/e00073961443368e9791
[14:58:10] goldbug: Any idea what's going on? I'm able to manipulate records fine through the console, which suggests it's not a problem with the model.
[14:58:36] someish: has joined #RubyOnRails
[14:59:04] secretlives: has joined #RubyOnRails
[14:59:22] mikecmpbll: goldbug: without having looked at the code, usually it's caused by a callback loop
[15:00:02] vasilakisFiL: has joined #RubyOnRails
[15:01:00] vasilakisFiL: I am getting user agent Ruby in my rails app :O on Heroku
[15:01:17] vasilakisFiL: strange... anyone experienced the same? I guess heroku alters it ?
[15:01:24] goldbug: mikecmpbll: How can I trace the cause of the problem?
[15:03:01] jkamenik: has joined #RubyOnRails
[15:03:20] big|bad|wolf: has joined #RubyOnRails
[15:03:37] tubbo: vasilakisfil: haha i think that's what you get by default when you make reqs with a rails app
[15:03:46] tubbo: i know it's some kind of user-agent string that tells your ruby version
[15:03:49] dionysus69: has joined #RubyOnRails
[15:04:11] vasilakisFiL: tubbo but I don't do any request.. I am trying to figure out the user agent of the incoming request
[15:04:15] vasilakisFiL: or is that what you meant ?
[15:04:17] mikecmpbll: goldbug: not sure :D
[15:04:18] tubbo: you can customize it by simply setting request.env['User-Agent'] = "vasilakisfil's awesome rails apP"
[15:04:33] tubbo: vasilakisfil: oh yeah, i think you want to read request.env in that case
[15:04:36] tubbo: or something
[15:04:50] draken: has joined #RubyOnRails
[15:05:11] vasilakisFiL: yeah that's what I do :P first I was using browser gem but wan't getting what I wanted and then pushed a code that logs the browser string
[15:05:17] vasilakisFiL: well it's Ruby :P
[15:06:45] draken: goldbug is something with the callbacks
[15:09:07] greengriminal: has joined #RubyOnRails
[15:09:44] fpauser: has joined #RubyOnRails
[15:10:21] platzhirsch: has left #RubyOnRails: ()
[15:10:30] goldbug: draken, mikecmpbll: Something to do with the private section of the people_controller.rb perhaps?
[15:10:57] chipotle: has joined #RubyOnRails
[15:11:04] mikecmpbll: goldbug: private section?
[15:12:36] treehug88: has joined #RubyOnRails
[15:12:39] goldbug: At the bottom of the file.
[15:12:48] EminenceHC: has joined #RubyOnRails
[15:12:54] mikecmpbll: i don't see any private methods
[15:13:25] mary5030: has joined #RubyOnRails
[15:13:34] mikecmpbll: nah it's nothing to do with those methods.
[15:14:15] goldbug: They're pretty standard from what I can gather (I've pinched and adapted this file from the Hartl tutorial).
[15:14:15] mary5030: has joined #RubyOnRails
[15:15:37] mary5030: has joined #RubyOnRails
[15:16:10] sharkman: why is my server giving this error
[15:16:11] sharkman: `clean_path_info' for Rack::Utils:Module
[15:16:49] goldbug: All my tests work fine for the model so really can't see that being the problem. Are there callbacks going on behind the scenes that I'm not privy to?
[15:18:39] srinidhi: has joined #RubyOnRails
[15:19:30] Hamled: has joined #RubyOnRails
[15:22:13] goldbug: Bugger, now I have to go.
[15:22:24] goldbug: Monday. This will be fixed on Monday. Grr.
[15:23:37] jkamenik: has joined #RubyOnRails
[15:24:46] lindii_: has joined #RubyOnRails
[15:24:50] Linuus: has joined #RubyOnRails
[15:25:08] disgrntld: has joined #RubyOnRails
[15:26:27] Or1on: has joined #RubyOnRails
[15:28:04] bruno-: has joined #RubyOnRails
[15:31:18] woods: has joined #RubyOnRails
[15:32:57] prestorium_: has joined #RubyOnRails
[15:34:25] woods: good morning
[15:34:48] maxx88: has joined #RubyOnRails
[15:35:04] mary5030: has joined #RubyOnRails
[15:37:15] dionysus69: has joined #RubyOnRails
[15:39:22] bruno-_: has joined #RubyOnRails
[15:39:37] capin: afternoon
[15:44:04] jenrzzz: has joined #RubyOnRails
[15:45:58] [Butch]: has joined #RubyOnRails
[15:46:26] arBmind: has joined #RubyOnRails
[15:47:33] bruno-_: has joined #RubyOnRails
[15:47:39] mikecmpbll: well that's annoying. rails replaces the value of a hidden field called 'authenticity_token' even if i put authencity_token: false in the form_for :[
[15:49:47] bricker: has joined #RubyOnRails
[15:50:11] EminenceHC: has joined #RubyOnRails
[15:51:24] Ergo: has joined #RubyOnRails
[15:52:36] tubbo: mikecmpbll: 99% sure you can't do that if you use form_for
[15:52:38] wldcordeiro: has joined #RubyOnRails
[15:52:49] l_tonz: has joined #RubyOnRails
[15:52:56] mikecmpbll: it's k, i just used javascript instead
[15:53:35] tubbo: mikecmpbll: lol @ auth requiring js
[15:53:38] yogeshrt: has joined #RubyOnRails
[15:53:44] mikecmpbll: if you set authenticity_token: false it won't create the hidden input, but if you create it manually it will set it :/
[15:53:50] mikecmpbll: bit silly really.
[15:53:57] mikecmpbll: our whole app requires JS :)
[15:54:06] EminenceHC: has joined #RubyOnRails
[15:54:28] nettoweb: has joined #RubyOnRails
[15:55:42] mikecmpbll: Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected ????
[15:55:50] mikecmpbll: one for next week, methinks.
[15:57:17] tubbo: if you're using oauth i'm pretty sure you should be skipping csrf validation
[15:57:20] tubbo: but i dunno
[15:58:14] pawnbox: has joined #RubyOnRails
[16:00:25] mikecmpbll: hm, intriguing. brain frazzled, i just hope i remember wtf i was trying to do come monday.
[16:01:27] arup_r: has joined #RubyOnRails
[16:01:54] relix: has joined #RubyOnRails
[16:02:03] circ-user-kkU2e: has joined #RubyOnRails
[16:03:58] herbst: has joined #RubyOnRails
[16:05:54] chipotle: has joined #RubyOnRails
[16:07:31] [Butch]: has joined #RubyOnRails
[16:07:50] Motoservo: has joined #RubyOnRails
[16:08:14] dopamean_: has joined #RubyOnRails
[16:08:20] circ-user-kkU2e: has joined #RubyOnRails
[16:08:33] mrbubbles: Would anyone mind taking a quick look at this query please: https://gist.github.com/joeczucha/e37845f73fc059139af2
[16:08:49] reber: has joined #RubyOnRails
[16:09:00] tubbo: that is certainly a lot of words
[16:09:03] mrbubbles: I???m getting : SELECT "widgets".* FROM "widgets" INNER JOIN "layouts" ON "layouts"."id" = "widgets"."layout_id" WHERE ???widgets???.???account_id" = 3 but I want SELECT "widgets".* FROM "widgets" INNER JOIN "layouts" ON "layouts"."id" = "widgets"."layout_id" WHERE ???layouts???.???account_id" = 3
[16:09:13] mrbubbles: I love words :)
[16:09:55] dici: has joined #RubyOnRails
[16:10:00] arthurix_: has joined #RubyOnRails
[16:10:22] alevy: has joined #RubyOnRails
[16:10:33] bricker: has joined #RubyOnRails
[16:10:43] tubbo: mrbubbles: those two queries are identical
[16:10:50] tubbo: oh wait never mind
[16:11:04] mrbubbles: WHERE ???widgets???.???account_id" = 3 vs WHERE ???layouts???.???account_id" = 3
[16:11:09] mrbubbles: I think I need a nested where alcuase
[16:11:13] pawnbox: has joined #RubyOnRails
[16:11:15] tubbo: mrbubbles: i think you need where(layouts: { account_id: current_user.account_id })
[16:11:50] mrbubbles: I had where(layout: { account_id: current_user.account_id }) rather than ???layouts"
[16:11:53] mrbubbles: thanks tubbo :)
[16:11:56] mrbubbles: Sanity restored
[16:13:02] tubbo: it's a little confusing
[16:13:17] LudicrousMango: has joined #RubyOnRails
[16:13:19] tubbo: sometimes you can get away with not doing joins/includes and just passing hashes, and rails will do the INNER JOINs for you
[16:16:52] EminenceHC: has joined #RubyOnRails
[16:17:00] willardg: has joined #RubyOnRails
[16:19:30] atmosx_laptop: has joined #RubyOnRails
[16:21:22] s2013: has joined #RubyOnRails
[16:21:50] chopin: has joined #RubyOnRails
[16:22:11] s2013: i have a scope called pending.. so Ticket.pending.. ticket belogns to user.. whats the most efficient way of grabbing all the user for the Ticket.pending scope
[16:22:19] s2013: im having a brain fart
[16:22:55] arup_r: s2013: show the code pls
[16:23:23] smathy: User.joins(:tickets).merge(Ticket.pending)
[16:23:30] s2013: smathy oh yea merge
[16:23:46] arup_r: well User.joins(:ticket).where(ticket: {status: "pending"})
[16:24:42] towski_: has joined #RubyOnRails
[16:24:46] yogeshrt: has joined #RubyOnRails
[16:25:00] s2013: i was looking for merge arup_r thanks
[16:25:22] arup_r: didn't know that
[16:25:41] Maletor: has joined #RubyOnRails
[16:25:41] pawnbox: has joined #RubyOnRails
[16:25:54] smathy: FWIW, I'd usually make a scope for that too s2013, scope :with_pending_tickets, -> { joins.... }
[16:26:10] arup_r: has joined #RubyOnRails
[16:26:21] s2013: yeah going to do that
[16:26:30] s2013: i have another minor issue but let me see if i can resolve it
[16:28:13] lxsameer: has joined #RubyOnRails
[16:28:30] _djbkd: has joined #RubyOnRails
[16:29:31] s2013: smathy https://gist.github.com/ss2k/32dbf19fe525155d8ed9 cause we have different ticket models (dont ask)
[16:29:52] s2013: is there a better way to do that you think? so something like SupportTicket is a params[:klass]
[16:30:36] njero: has joined #RubyOnRails
[16:31:26] smathy: Well, you can't call pluralize on a class.
[16:31:43] smathy: Oh sorry, params is the string.
[16:32:03] smathy: ...I dunno, other than maybe klass.table_name.to_sym
[16:32:15] smathy: ...but it's all just relying on whatever convention you're using.
[16:32:33] s2013: yeah thankfully atleast that convention is being followed
[16:32:45] s2013: ah the joys of inheriting really old and crappy codebase
[16:32:53] smathy: ...if you wanted to be explicit then you could make a lookup hash, like User.association_for(params[:klass])
[16:33:29] jgt: has joined #RubyOnRails
[16:33:52] smathy: ...also, the joys of having a single architectural layer for all our persistence and business logic.
[16:35:44] Lightsword: has joined #RubyOnRails
[16:36:42] momomomomo: has joined #RubyOnRails
[16:38:06] totimkop1: has left #RubyOnRails: ()
[16:39:09] xtagon: has joined #RubyOnRails
[16:40:50] bonhoeffer: has joined #RubyOnRails
[16:41:34] bonhoeffer: is there a more compact way to write: @book.authors << @author; @book.save!
[16:41:37] apg: has joined #RubyOnRails
[16:41:37] apg: has joined #RubyOnRails
[16:42:09] bonhoeffer: that is a pattern that recurrs a lot in my code and i would love to simplify it
[16:42:17] simkessy: maybe @book.authors.create!(@authors)
[16:42:22] smathy: @book.authors << @author
[16:42:38] nertzy: has joined #RubyOnRails
[16:43:11] apg: has joined #RubyOnRails
[16:43:13] simkessy: smathy what's the expression (<<) called? I want to look up it
[16:43:53] smathy: simkessy, just look up has_many
[16:44:01] Scient: got to love spring
[16:44:02] smathy: (<< is a method created by has_many)
[16:44:06] Scient: tests pass with bundle exec rspec
[16:44:10] Scient: but not with rspec (via spring)
[16:44:19] Scient: can restart shit that thing to oblivion, nothing changes
[16:44:31] Scient: and I know where the failures come from, and i uninstalled that gem
[16:44:35] smathy: Scient, you sure you're running bin/rspec and that it's springified?
[16:44:51] bonhoeffer: smathy: that doesn???t seem to persist for me
[16:45:02] bonhoeffer: am i missing something
[16:45:02] jenrzzz: has joined #RubyOnRails
[16:45:18] herbst: has joined #RubyOnRails
[16:45:22] Scient: yep im sure of that
[16:45:42] smathy: bonhoeffer, must be, make a gist showing your models and console session demonstrating that it doesn't persist.
[16:45:50] gavit: is there a way to do this: @overtime_pay = @employee.overtime_hours1 * @hour_rate * 1.5 + @employee.overtime_hours2 * @hour_rate * 2 WITH if one of the things is nil, return 0
[16:45:54] bonhoeffer: smathy: will do
[16:46:33] gavit: I think that an unless (@employee.overtime_hours1.nil? || etc is 'too long to write'
[16:46:58] woods: has joined #RubyOnRails
[16:47:16] smathy: gavit, make them not nil.
[16:47:23] Fire-Dragon-DoL: has joined #RubyOnRails
[16:47:37] simkessy: smathy I see, pretty cool, thx
[16:47:42] smathy: simkessy, welcome.
[16:47:54] gavit: smathy: nvm, found it @overtime_pay = (@employee.overtime_hours1 || 0) * (@hour_rate || 0) * 1.5 + (@employee.overtime_hours2 || 0) * @hour_rate * 2
[16:48:37] smathy: Great example of the inherent risk of errors when using code smell like that.
[16:50:05] surrealanalysis: has joined #RubyOnRails
[16:50:18] arthurix: has joined #RubyOnRails
[16:50:58] NBarnes: has joined #RubyOnRails
[16:52:27] thither: has joined #RubyOnRails
[16:52:28] safety_cut: has joined #RubyOnRails
[16:53:13] thither: If I do Model.all, how would I get models between the n'th and m'th models of that relation?
[16:53:37] ayonkhan: has joined #RubyOnRails
[16:53:42] simkessy: Hi, is there anyway to get an input field into the controller, if it is not in the submitted form? I finished building a checkout page and added a textarea to additional notes the user could send to the client. BUT I realized that this textarea field was outside the <form>
[16:53:43] smathy: thither, look up offset and limit.
[16:54:24] ruurd: has joined #RubyOnRails
[16:54:33] smathy: simkessy, why wouldn't you just move the textarea?
[16:56:09] simkessy: Yeaaa, thing is I have 2 forms (dropdown of existing cards / new cards form) they're both coming in from partials, so it'd take significant refactoring to get that textarea in there
[16:58:03] ferr: has joined #RubyOnRails
[17:00:25] simkessy: I kind of followed the design of airbnb and went I looked more into it, I realized that their form is pretty much the whole page. That's kind of when I realized my mistake
[17:01:34] jessemcgilallen: has joined #RubyOnRails
[17:03:30] safety_cut: has joined #RubyOnRails
[17:03:47] mikecmpbll: has joined #RubyOnRails
[17:06:28] based_pdev_: has joined #RubyOnRails
[17:06:29] chills42: has joined #RubyOnRails
[17:07:15] danman: has joined #RubyOnRails
[17:07:20] pawnbox: has joined #RubyOnRails
[17:12:58] arthurix_: has joined #RubyOnRails
[17:14:15] Maletor: has joined #RubyOnRails
[17:14:47] RegulationD: has joined #RubyOnRails
[17:14:58] nogic: has joined #RubyOnRails
[17:16:22] smathy: simkessy, well the alternative is pretty ugly, basically adding JS to form so on submit it programmatically inserts the textarea into the form.
[17:16:38] simkessy: yea I figure that would be the alternative
[17:17:33] simkessy: It's fine, ill just redo the page correctly or turn the textarea and content around it into partials and insert that into the two forms
[17:17:37] smathy: ...or JS to the textarea so on change, or blur maybe, it adds/updates a hidden field in the form.
[17:17:43] bonhoeffer: has joined #RubyOnRails
[17:17:57] simkessy: that doesn't sound so bad actually
[17:18:15] simkessy: I actually really like that idea
[17:18:28] chopin: has joined #RubyOnRails
[17:19:05] Siyo: has joined #RubyOnRails
[17:19:05] Siyo: has joined #RubyOnRails
[17:19:59] smathy: Ok :) Sounds terrible to me, but I'm still not clear on the problem with just moving the textarea into the form :)
[17:21:03] danielbucher: has joined #RubyOnRails
[17:23:48] annlewis: has joined #RubyOnRails
[17:23:54] sebstrax: has joined #RubyOnRails
[17:24:55] bonhoeffer: has anyone set up custom fields without using hstore or similar?
[17:25:36] smathy: bonhoeffer, by custom do you mean dynamic? Like created at runtime?
[17:25:42] pulgolino: has joined #RubyOnRails
[17:26:20] bonhoeffer: yes ??? correct ??? either a boolean, text or double with a name as the only attribute
[17:26:48] stevenw_: has joined #RubyOnRails
[17:26:51] bonhoeffer: i have the models all set up with the right tests??? using polymorphism ??? but curious how to do the controller and view
[17:27:07] simkessy: smathy: it's because I poorly designed my page http://imgur.com/CI4vNUh
[17:27:12] smathy: bonhoeffer, so sure, a table called fields with for_id, for_type, field_name, field_value
[17:27:29] chopin: has joined #RubyOnRails
[17:27:33] smathy: simkessy, so fix that.
[17:27:51] Cervajz_: has joined #RubyOnRails
[17:27:52] simkessy: yea that's what I'm going to try to do
[17:28:01] bonhoeffer: smathy: interesting . . . have that . . . any documented examples of people doing this?
[17:28:12] smathy: bonhoeffer, could be just a single fkey if it will only be associated with a single table/model.
[17:28:20] Cervajz_: has joined #RubyOnRails
[17:29:45] smathy: bonhoeffer, not sure how much documentation you could write for this, maybe a tweet.
[17:30:06] pawnbox_: has joined #RubyOnRails
[17:34:08] EminenceHC: has joined #RubyOnRails
[17:35:28] bonhoeffer: has joined #RubyOnRails
[17:36:00] bonhoeffer: smathy: sorry if i missed anything had to board a plane . . . but working with the table idea
[17:36:17] smathy: Only a smartass comment.
[17:36:21] smathy: bonhoeffer, not sure how much documentation you could write for this, maybe a tweet.
[17:36:34] sharkman: if i have this in routes.rb, root :to => 'control#index'
[17:36:47] bonhoeffer: yeah ??? the view interaction is what i???m thinking through now
[17:37:03] sharkman: and i have an index.html.erb file in public/
[17:37:04] ror15: has joined #RubyOnRails
[17:37:10] sharkman: why am i getting "missing template control/index"???
[17:37:33] smathy: sharkman, index.html.erb in public is irrelevant.
[17:37:53] woods: you should have app/views/control/index.html.erb
[17:37:54] sharkman: what is the public/ folder for
[17:38:05] smathy: sharkman, static files.
[17:38:24] smathy: sharkman, you could have an index.html in there if you wanted.
[17:38:33] s2013: https://gist.github.com/ss2k/32dbf19fe525155d8ed9 im guessing cause it deosnt store pending_users first
[17:38:43] sharkman: that works thanks smathy, woods.
[17:38:46] smathy: ...or anything else that you want served by your httpd (without going through rails)
[17:38:58] woods: no problem
[17:39:26] sharkman: im trying to set up a server with ruby on rails for my first time. im about 15 hours in yet and not done. how am i doing?
[17:39:52] sharkman: do you guys just code the rails or do you also set up the server and configure that stuff
[17:40:16] tvw: has joined #RubyOnRails
[17:40:58] Lewix: has joined #RubyOnRails
[17:41:12] Lewix: very important: what's the best coffee without sugar in your opinion
[17:41:29] Lewix: What happened to sevenseas
[17:41:51] smathy: s2013, what does redeem! do?
[17:42:01] bricker: Lewix: probably sleeping
[17:42:23] smathy: sharkman, use heroku.
[17:42:24] sharkman: french vanilla, black
[17:42:26] s2013: smathy basically changes status to completed
[17:42:36] ror15: Day 3 - Anyone work with an app that has Pinterest Auth?
[17:42:42] ror15: Online now*
[17:42:43] smathy: sharkman, I am also able to set up servers.
[17:43:04] LambdaSource: has joined #RubyOnRails
[17:43:05] Lewix: sharkman: ok thanks I'll give it a try
[17:43:06] smathy: sharkman, but these skills are not easy to learn, nor necessary for a dev.
[17:43:15] Lewix: that was a blocker
[17:43:25] sharkman: yeah i am in a cafe learning on my own. wish i was in an office with you smathy. i could learn it in a day
[17:43:34] smathy: sharkman, no you couldn't.
[17:43:42] arthurix: has joined #RubyOnRails
[17:43:44] sharkman: okay i couldnt. but faster than i am now
[17:44:01] smathy: sharkman, it takes many weeks to learn, and that's assuming you have good foundations.
[17:44:02] Lewix: sharkman: either that or hazelnut
[17:44:06] sharkman: im not a professional developer anyway. im just trying to get my web page up. and i want to power it with rails
[17:44:14] smathy: sharkman, so use heroku.
[17:44:28] smathy: You're the posterchild for their perfect customer.
[17:44:33] sharkman: well i think i have everything working. see, http://ec2-52-30-152-2.eu-west-1.compute.amazonaws.com/
[17:44:43] sharkman: i set up the apache, and the STUFF is even generated using ruby
[17:44:48] bricker: smathy: their perfect customer will pay them lots of money
[17:44:57] smathy: s2013, so you're wondering why, when you change all the statuses to not pending, why you don't have any pending users anymore?
[17:45:23] s2013: no im tryign to figure out how to store the users before the status changes
[17:45:34] smathy: bricker, yeah, sure, their perfect customer starts on the free level, then their site gets successful so they have income to pay for the next levels.
[17:46:01] jenrzzz: has joined #RubyOnRails
[17:46:02] s2013: i know it doesnt actually execute the query at that time. just stores the query.. but i tried runing pending_users.. anyways its all good.. have it working now
[17:46:04] sharkman: im a failure so that wont be me. no one will visit my site
[17:46:05] ror15: Plus they want to show how easy it is to run a heroku server - even new rails devs can do it!
[17:46:14] smathy: s2013, ok cool.
[17:46:15] bricker: sharkman: lol that's the spirit!
[17:46:19] EminenceHC: has joined #RubyOnRails
[17:46:30] smathy: sharkman, ok, so you'll stay on the free level of heroku.
[17:46:55] sharkman: smathy should i stll switch to heroko? i seem to have things functioning now. it seems like it would just take more work now to switch
[17:47:00] sharkman: now that things are basically functioning
[17:47:09] smathy: sharkman, if you're a failure, then maybe setting up your own server won't be a problem, hackers don't tend to target failing websites.
[17:47:32] sharkman: good then i am safe
[17:48:32] smathy: sharkman, you don't know what you don't know - yes, better to switch to heroku right now.
[17:48:50] ror15: Alright new questions - is there a specific place I can find "This is your redirect_uri:" for omniauth
[17:49:54] Criten: has joined #RubyOnRails
[17:53:37] skiz: has joined #RubyOnRails
[17:56:47] bmalum_: has joined #RubyOnRails
[17:57:29] sarink: has joined #RubyOnRails
[17:57:48] ruurd: has joined #RubyOnRails
[17:58:19] baweaver: has joined #RubyOnRails
[17:58:47] rlomax_: has left #RubyOnRails: ()
[18:00:17] baweaver: has joined #RubyOnRails
[18:01:12] simkessy: do controller private functions have access to class variables?
[18:01:41] dopamean_: has joined #RubyOnRails
[18:01:44] FailBit: to controller class variables, yes
[18:02:26] tubbo: be careful with class vars
[18:02:38] smathy: simkessy, learn (more) ruby.
[18:02:41] tubbo: they do not work the same way as class instance vars
[18:03:15] simkessy: smathy: trying :(
[18:03:48] nfk|laptop: has joined #RubyOnRails
[18:05:54] momomomomo: has joined #RubyOnRails
[18:06:09] arBmind: has joined #RubyOnRails
[18:06:45] sharkman: do server adminstrators get paid more than rails developers/
[18:06:49] `based_pdev`: has joined #RubyOnRails
[18:07:13] smathy: simkessy, https://www.ruby-lang.org/en/documentation/
[18:07:26] smathy: sharkman, no.
[18:07:40] sharkman: do rails developers get paid more than server administrators?
[18:07:54] smathy: sharkman, yes.
[18:08:12] smathy: (all else being equal)
[18:08:15] draken: has joined #RubyOnRails
[18:08:57] RegulationD: has joined #RubyOnRails
[18:09:05] tubbo: devops engineers tend to get paid more than rails developers, at least aroun dhere
[18:09:09] naftilos76: has joined #RubyOnRails
[18:09:16] tubbo: due to the extra knowledge needed
[18:09:38] smathy: devops != server admin
[18:10:01] sharkman: what does devlops mean
[18:10:14] safety_cut: has joined #RubyOnRails
[18:10:51] baweaver: has joined #RubyOnRails
[18:10:59] momomomomo: devops is the joining of development teams and operations teams
[18:11:13] momomomomo: usually helped with tools like Puppet, which allow some stability of production dependencies and operations
[18:11:20] sharkman: what does operations team handle
[18:11:36] smathy: sharkman, an ops person who does dev as well.
[18:11:46] momomomomo: usually the deploying and management of an application
[18:12:02] momomomomo: smathy: nah, that's a made-up role, the actual 'devops' term refers to the collaboration of two departments
[18:12:21] momomomomo: 'devops' now means 'make our application deploy with puppet/salt/ansible' etc.
[18:12:43] momomomomo: which is a bastardization of the devops 'movement'
[18:13:06] smathy: momomomomo, not sure what to tell you, my experience tells me otherwise. There are dedicated devops people now.
[18:13:08] tubbo: yeah, like we still call our ops department an ops department
[18:13:20] chipotle: has joined #RubyOnRails
[18:13:29] tubbo: because while they do use chef, their job as of right now is to do all of the environment provisioning for our hosted apps
[18:13:31] momomomomo: smathy: I've been involved in a few devopsdays - only minneapolis, though, but that's the general consensus
[18:13:49] tubbo: but, we've all been trying to change that...getting tech leads in on the idea that they should have a bit more control over their ops environment
[18:13:53] momomomomo: last one I was at there were like 3 talks about how a "devops role" is not "devops", for the exact explanation above
[18:14:20] momomomomo: nowadays, though, a company will say "devops" as in "do our deployment stuff"
[18:14:32] smathy: Lots of tools for deployment etc., but in my experience the dedicated devops guy is doing prod-level architecture things. Eg. auto failover stuff, sharding, archiving, alerting, auto-scaling, etc.
[18:14:34] momomomomo: when that was not the original aim, nor is it still
[18:14:55] momomomomo: smathy: yes, exactly, it's a bastardization on the term. It's really just an ops role
[18:15:10] momomomomo: the one you described
[18:15:41] momomomomo: companies use "devops" because it's a bit more hip nowadays vs. operations
[18:15:48] momomomomo: but completely miss the point of "devops" when they create roles around that term
[18:15:57] smathy: momomomomo, well I don't really care how you play it, either there's a new name for a new skillset, which just didn't exist before. Or you re-use an old name to denote that new skillset, and then I don't know what you want to use for the original skillset (which does still exist).
[18:16:10] jahbrewski: has joined #RubyOnRails
[18:16:28] Palsson: has joined #RubyOnRails
[18:16:43] smathy: ops used to just be a reactive discipline. Shit happened, they fixed it.
[18:16:45] momomomomo: smathy: it's not a new term for that skillset, it's a new term for the joining of two departments, which is facilitated by specific tools, which has been taken over by recruiting departments
[18:17:14] smathy: devops is more about proactively managing the server, developing tools to automate and fix problems before/as they happen.
[18:17:36] momomomomo: that is the outcome of dev/ops working together - hence the name: devops
[18:17:37] siddart: has joined #RubyOnRails
[18:17:42] smathy: I've not been anywhere where the ops and dev teams are being joined.
[18:17:46] smathy: Not in my experience.
[18:17:56] momomomomo: they don't join, they work together
[18:17:57] tubbo: momomomomo: working together != being joined
[18:18:12] smathy: In my experience ops people are taking the initiative to upskill and take on new responsibilities that they never had before. No involvement from dev at all.
[18:18:28] srinidhi: has joined #RubyOnRails
[18:18:34] srinidhi: has joined #RubyOnRails
[18:18:39] momomomomo: smathy: dev doesn't write any puppet, or request that new dependencies are added and justify them because they can be automated in production?
[18:18:54] tubbo: momomomomo: most of the companies i've worked for use the "DevOps" title to scare away potential candidates who don't want to write code.
[18:18:54] crankhar1er: does anyone know if, during a deploy, heroku does rolling restarts when you have multiple dynos?
[18:19:24] smathy: Working together, joined, same situation. I've never seen an organization take dev resources and use them for ops. Devs stay in the app side of things, devops upskill for the platform/prod side of things.
[18:19:50] smathy: momomomomo, no, app devs do not write any puppet.
[18:20:02] momomomomo: http://www.devopsdays.org/events/2014-minneapolis/proposals/Devops%20Is%20Dead/
[18:20:15] smathy: momomomomo, and no, beyond what they need in dev, they don't request new platform-level dependencies in production.
[18:20:37] momomomomo: ha, ok, then we've got a different understanding of the situation or the source of why there is such a term "devops"
[18:20:51] baweaver: "* Is Dead" is always silly to me
[18:20:54] smathy: momomomomo, you know me enough to know that a slideshare carries nearly zero weight.
[18:21:07] momomomomo: smathy: I was there for that talk
[18:21:13] baweaver: things don't die in tech
[18:21:21] momomomomo: baweaver: it's almost always a joke
[18:21:31] momomomomo: see: "long live devops" in the title as well
[18:21:32] baweaver: ....if you say so
[18:21:39] tubbo: momomomomo: application/product developers writing ops code is the dumbest fucking thing you could possibly do.
[18:21:45] baweaver: ACTION glares at HackerNews
[18:21:52] tubbo: if you are an app developer there is a 99% chance you don't know what the fuck you are doing in an ops environment
[18:22:03] smathy: momomomomo, I don't go to conferences, I'm just telling you what my experience in the workforce is telling me.
[18:22:47] momomomomo: tubbo: smathy and what I'm saying is that the current experience is not the source of the term/reason it is a thing now
[18:23:01] momomomomo: many organizations completely miss the entire point
[18:23:06] momomomomo: i.e. by having "devops" teams
[18:23:21] tubbo: yeah i mean, "devops engineer" is not somewhere you want to be imho
[18:23:26] smathy: momomomomo, further to tubbo's comments - most app devs just don't know about production systems, they generally don't understand the parameters, bounds, problems, risks of production systems.
[18:23:41] baweaver: ACTION is a DevOps Engineer
[18:23:47] smathy: ...and for that reason I don't let them near my prod systems.
[18:23:53] tubbo: baweaver: yeah but you actually have like shit to do :)
[18:24:02] fmcgeough: has joined #RubyOnRails
[18:24:02] tubbo: on the order of thousands (more?) of servers
[18:24:02] baweaver: ACTION literally builds production
[18:24:08] momomomomo: smathy: look at the history of why "devops" came to be, and why it's a thing, and you'll have a better understanding of the points I'm trying to make
[18:24:14] baweaver: 10s of thousands I think
[18:24:19] tubbo: ACTION prods baweaver's stage
[18:24:28] baweaver: AWS loves us, I'll just say that
[18:25:04] Ergo: has joined #RubyOnRails
[18:25:08] baweaver: I literally develop ops tools, infrastructure engineering in deployments
[18:25:12] tubbo: baweaver: but "devops" is just the latest in a line of titles for what you do...they used to call you guys "infrastructure engineers"
[18:25:24] baweaver: I don't care too much for titles
[18:25:27] momomomomo: tubbo: exactly my point
[18:25:27] smathy: momomomomo, I don't need to go and look at the history, I was there as the term "devops" came to be - and I still have no idea what point you're trying to make.
[18:25:35] tubbo: baweaver: at the same time, how much collaboration do you do with actual app develoeprs?
[18:25:38] baweaver: I just care that they pay well and they have good food
[18:25:52] baweaver: normally a lot
[18:25:55] momomomomo: smathy: that "devops" is a misused term nowadays - see tubbo's comment: "but "devops" is just the latest in a line of titles for what you do...they used to call you guys "infrastructure engineers""
[18:25:59] baweaver: we're deploying their apps
[18:26:00] annlewis: has joined #RubyOnRails
[18:26:01] smathy: momomomomo, you started by claiming that devops was the same as ops.
[18:26:12] baweaver: so we should know the nuances and features they want for it.
[18:26:23] baweaver: mostly so we can say no and laugh at them
[18:26:24] momomomomo: smathy: i said that the way many companies use the term "devops" is the same as "ops"
[18:26:31] momomomomo: i.e. see tubbo's quote above
[18:26:35] smathy: momomomomo, ok - so you're making a point that some people misuse that term? This is a point you can make about every tech (or any industry actually) jargon in existence.
[18:27:01] momomomomo: yes, but you argued that the misused meaning is the actual meaning
[18:27:12] smathy: You were talking about devops meaning some collaboration between two depts.
[18:27:14] tubbo: baweaver: hahaword
[18:27:16] tubbo: haha word*
[18:27:24] bmalum_: has joined #RubyOnRails
[18:27:25] baweaver: we tend to be nice though
[18:27:32] momomomomo: communication, collaboration
[18:27:32] smathy: If your point was that that was how some organizations *MISUSE* the term then you didn't make that clear at all. It came across as your own position.
[18:27:36] baweaver: we also work with Ops heavily on their concerns
[18:27:50] tubbo: ahh i see, so there are also ops engineers
[18:27:58] tubbo: then there's you guys (devops), also known as "no mans lands"
[18:27:59] smathy: Anyway, your point is that some people misuse a term - granted, next topic (because that's mundane)
[18:27:59] baweaver: So I'd venture to say in our case it's pretty close
[18:28:01] tubbo: and then developers
[18:28:03] ngscheurich: has joined #RubyOnRails
[18:28:30] manfrin: has joined #RubyOnRails
[18:28:48] baweaver: In my org at least we're a literal bridge between Dev and Ops
[18:28:55] baweaver: mostly for the sake of abstracting that gap
[18:29:24] sharkman: i dont fall into any of those categories. im a hack
[18:29:47] sharkman: do you guys look down on html developers. and are like "oh look thats so cute that kid is writing html code"
[18:30:01] smathy: sharkman, "html developers" isn't a thing.
[18:30:05] baweaver: well considering there's no such thing as an html dev
[18:30:09] baweaver: smathy: heh
[18:30:14] momomomomo: probably meaning front-end?
[18:30:28] momomomomo: and no, front-end devs make stuff look goooooood
[18:30:34] smathy: So yeah, if someone called themselves an html developer then I'd think they were peculiar.
[18:30:38] baweaver: I also do FE Dev
[18:30:52] Aherin: has joined #RubyOnRails
[18:31:07] sharkman: html code like dreamweaver
[18:31:07] baweaver: and Rails and Angular and Node and Spark and... Lordy I do a lot here.
[18:31:25] smathy: sharkman, people who use applications don't get titles.
[18:31:31] cs44: has joined #RubyOnRails
[18:31:50] smathy: sharkman, that'd be like calling someone who made documents using Word a wordprocessing developer.
[18:32:24] cs44: has left #RubyOnRails: ()
[18:32:36] ngscheur1: has joined #RubyOnRails
[18:32:38] smathy: sharkman, using apps like that is just incidental to your real role.
[18:33:00] baweaver: ACTION takes wordprocessing developer off resume
[18:33:07] baweaver: ACTION silently weeps
[18:33:12] smathy: ...which could be "accountant", "small business owner", or anything.
[18:33:14] tubbo: lead powerpoint engineer
[18:33:23] momomomomo: tubbo: everyone at my agency
[18:34:31] momomomomo: though, they're getting more interested in Tableau, which is good
[18:36:46] siddart: has joined #RubyOnRails
[18:38:44] smathy: has joined #RubyOnRails
[18:38:50] thither: Where should I put a method to auto-update a model?
[18:39:18] thither: I have a concern that relates to the updating. I'm trying to use the "whenever" gem
[18:39:42] tubbo: thither: little vague, kinda depends on what you're doing
[18:40:15] thither: Well I want to perform checks on all records belonging to a model once per day
[18:40:16] hansss: has joined #RubyOnRails
[18:40:30] thither: And conditionally update those records
[18:40:55] thither: Is that something I should just add in as a method in a concern?
[18:41:04] bmalum_: has joined #RubyOnRails
[18:42:37] momomomomo_: has joined #RubyOnRails
[18:43:11] Pazician: has joined #RubyOnRails
[18:43:12] Pazician: has joined #RubyOnRails
[18:43:47] targaf: If I want stylesheets/js in my asset pipeline available to my 404 page in my public folder this there anything special I need to do?
[18:44:00] tubbo: thither: why should it be in a concenr?
[18:44:27] tubbo: targaf: !try
[18:44:27] helpa: targaf: Why don't you try it and find out for yourself?
[18:44:29] baweaver: has joined #RubyOnRails
[18:44:35] jahbrewski: has joined #RubyOnRails
[18:44:57] tubbo: targaf: assets are typically served from /assets/, so <script src="/assets/application.js"> loads app/assets/javascripts/application.js
[18:45:15] smathy: Sorry tubbo, that's not a great idea for a static file.
[18:45:21] smathy: ...because cache.
[18:45:22] targaf: because I currently have the styles of the 404 page in the public folder called manually in the file and before I didn't want to do a big reorg if the answer was a definite no
[18:45:23] smathy: targaf, you could generate that 404 on deploy so it always has the latest fingerprinted filename in it.
[18:45:29] thither: tubbo: it's just that I want the method to belong to two models that already share a concern. The concern is related to the periodic updates as well.
[18:45:46] tubbo: smathy: i guess i have my assets stored on S3/CDN most of the time so it doesn't matter :D
[18:45:55] tubbo: smathy: when you say "because cache", can you elaborate on that?
[18:46:07] tubbo: thither: sounds like you answered your question
[18:46:09] targaf: alright thanks, smathy/tubbo
[18:46:52] smathy: tubbo, well the idea of fingerprinted assets is to put a very long browser cache expiry on your /assets path.
[18:46:59] smathy: tubbo, so the browser caches forever.
[18:47:21] jenrzzz: has joined #RubyOnRails
[18:47:25] tubbo: yes, but also to control when the files need to be expired and therefore re-fetched
[18:47:37] smathy: tubbo, no, this is a browser cache.
[18:47:48] smathy: tubbo, the browser won't re-request the same filename.
[18:48:02] smathy: ...until 2038 or whenever :)
[18:48:03] thither: Have you used the whenever gem, though? I'm not sure where it wants the method I'm referencing. http://pastie.org/10502515
[18:48:13] smathy: Your generated HTML will always point to the latest unique fingerprinted filename, so if it changed in a deploy then the browser will be requesting a new filename.
[18:48:14] tubbo: i know that. when you re-deploy, the fingerprint changes, so it has to request something else. otherwise you get a 301 not modified response every time you request that file
[18:49:35] tubbo: here's my question...lets say you had an awesome CDN with proper ETagging that was expired every time you deployed. do you still need the fingerprint?
[18:50:32] dopamean_: has joined #RubyOnRails
[18:50:40] gavit: is there an opposite of nil?
[18:50:46] tubbo: gavit: '' :D
[18:50:51] gavit: or do I do !my_model.nil?
[18:51:21] tubbo: gavit: oh you mean the actual method...yeah people use `present?` for that most of the time, but present? actually does `!blank?`.
[18:51:37] tubbo: and blank? will return true if the value is nil, '' or [].
[18:51:50] 77CAA22TO: has joined #RubyOnRails
[18:51:50] 7GHABHI8O: has joined #RubyOnRails
[18:52:29] Cervajz__: has joined #RubyOnRails
[18:53:06] sdwrage: has joined #RubyOnRails
[18:53:08] gavit: present? is fine
[18:53:09] smathy: tubbo, depends what cache control is being sent to the browser with the fingerprinted files. If you're using etags only then the browser is always going to do a server round-trip.
[18:53:55] smathy: tubbo, you might not have enough control over the headers that the CDN sends to do full browser caching.
[18:54:08] tubbo: but if you did, the fingerprints wouldn't be necessary?
[18:54:28] smathy: If you don't do browser caching then no, fingerprints are not necessary.
[18:54:45] smathy: ...because the browser will always do a HEAD to the server.
[18:54:54] n008f4g_: has joined #RubyOnRails
[18:55:31] arthurix_: has joined #RubyOnRails
[18:59:03] rakm: has joined #RubyOnRails
[19:00:21] bmalum: has joined #RubyOnRails
[19:01:25] SteenJobs: has joined #RubyOnRails
[19:09:03] s2013: has joined #RubyOnRails
[19:13:57] jgt: has joined #RubyOnRails
[19:16:23] rakm_: has joined #RubyOnRails
[19:18:11] AndroidLoverInSF: has joined #RubyOnRails
[19:18:17] woods: has joined #RubyOnRails
[19:19:43] momomomomo: has joined #RubyOnRails
[19:21:08] capin: smathy: got my issue resolved :) it was more or less a lack knowledge about AFNetworking
[19:22:33] arthurix: has joined #RubyOnRails
[19:23:36] LambdaSource: has joined #RubyOnRails
[19:27:49] sunya7a: I'm in the situation where migrations where either lost at some point or never created. The first migration file I have is trying to add column to an existing table. Running db:migrate obviously fails. What an appropriate way to resolve this. Is there a way to just purge all migrations and inventory the current state of the db from the schema file and use that to build up a new database at another location?
[19:28:41] ror15: Found the redirect_uri
[19:28:47] sunya7a: s/where/were
[19:29:51] smathy: capin, good to hear, well done.
[19:29:53] rhizome: sunya7a: check rake -T, i think it's rake db:schema:load
[19:29:54] banister: has joined #RubyOnRails
[19:30:13] rhizome: and have a talk with the person who deleted the migrations
[19:31:09] capin: smathy: thanks :) it was a bit of a PITA, but a good learning experience none the less :)
[19:31:42] sunya7a: rhizome: yea...they are no longer on the team...nothing bad...just moved on. hm...okay so that would load the db from the schema instead of the migration files. Now what about fixing the migration files...only way is to write them right? using the schema as a guide i mean.
[19:31:56] yfeldblum: has joined #RubyOnRails
[19:32:00] rhizome: sunya7a: i think so
[19:32:22] sunya7a: rhizome: seems like a daunting task...thank you for your insight
[19:32:31] rhizome: tedious but not difficult
[19:33:40] kitsuneyo: has joined #RubyOnRails
[19:34:04] Scriptonaut: has joined #RubyOnRails
[19:34:06] craysiii: has joined #RubyOnRails
[19:34:26] tubbo: or just delete them
[19:34:34] tubbo: and run rake db:schema:load to get your DB up to speed.
[19:35:00] tubbo: migrations only matter if you haven't run them :P
[19:35:20] nfk|laptop: i'm a bit lost, when i do rails new foo bundler wants to install stuff system-wide, how do i make it install stuff locally?
[19:35:23] sunya7a: tubbo: i suppose that's true...must keep schema.db file o.O
[19:37:28] sunya7a: nfk|laptop: personally i've started to keep them in the project with: bundle config --global path .bundle
[19:37:33] shinnya: has joined #RubyOnRails
[19:38:13] sunya7a: nfk|laptop: then add .bundle to your global gitignore
[19:38:49] safety_cut: has joined #RubyOnRails
[19:39:06] nfk|laptop: when do i run it? it tries to install stuff during rails new
[19:39:31] smathy: nfk|laptop, by using a local location for your gems, which is simplest to do by using a local ruby.
[19:39:46] smathy: nfk|laptop, look into rbenv, rvm or chruby.
[19:39:53] nfk|laptop: where;s the style in that?
[19:40:04] execute_: has left #RubyOnRails: ()
[19:40:16] smathy: nfk|laptop, I don't know what that means if you're addressing me.
[19:40:23] dan0034001: has joined #RubyOnRails
[19:41:07] nfk|laptop: i do not like those fancy envs
[19:41:41] nfk|laptop: they are cool, certainly, but make already messy stuff totally uncontrollable
[19:41:54] smathy: nfk|laptop, ok, so set your own GEM_HOME then.
[19:42:09] tubbo: nfk|laptop: you could always append --skip-bundle to the command
[19:42:14] nfk|laptop: what's a good choice?
[19:42:27] nfk|laptop: tubbo, thanks
[19:42:51] smathy: nfk|laptop, well I have no idea how you could conclude that a version manager like rbenv makes things totally uncontrollable, so no idea how to advise.
[19:43:04] tubbo: ACTION also uses a local location for gems...setting `BUNDLE_PATH: vendor/bundle` so that it always just installs gems to $MY_APP_PATH/vendor/bundle
[19:43:23] sunya7a: ACTION nods
[19:43:25] tubbo: yeah...qute the opposite there :)
[19:43:49] tubbo: rbenv/chruby give control over the ruby version to the application, not the system
[19:43:53] tubbo: that's basically the TLDR of what they do
[19:44:38] nfk|laptop: sounds terrible
[19:44:44] sunya7a: nfk|laptop: I would recommend rbenv...I've used rvm for a while...but I find it to blur the lines between managing the ruby version and gem managment...which bundler is already supposed to do
[19:44:47] WhereIsMySpoon_: has left #RubyOnRails: ()
[19:45:16] youngbaks: has joined #RubyOnRails
[19:45:20] sharkman: has joined #RubyOnRails
[19:45:25] smathy: Yeah, rvm began in the pre-bundler era.
[19:45:32] willardg: has joined #RubyOnRails
[19:45:51] sunya7a: nfk|laptop: if you don't work on many projects simultaneously and do not require different versions then there's no need for a ruby version manager of course
[19:46:01] tubbo: haha yeah nfk|laptop it's pretty terrible in prod, but on dev it doesn't matter very much
[19:46:10] tubbo: so on prod i always recommend 1 version per box
[19:46:11] nfk|laptop: i don't, just a side project, this one
[19:46:13] capin: tubbo: can't you just add a '.ruby-version' file in the app root and specify the ruby version you want to use?
[19:46:22] tubbo: capin: yes
[19:46:36] nfk|laptop: should write it in python to aid day job but i so much more like ruby
[19:46:53] sunya7a: capin: rbenv makes installing different rubies very easy though...which i think is another reason to use it
[19:47:06] arooni: has joined #RubyOnRails
[19:47:11] smathy: Even for a single project having a version manager is a good idea, just to make upgrading ruby simpler, reverting possible, etc..
[19:47:14] capin: sunya7a: i like rvm myself ;)
[19:47:47] Maletor: has joined #RubyOnRails
[19:47:55] nfk|laptop: smathy, i already have that, it's called apt
[19:48:02] smathy: I use it in prod too tubbo, not sure why you think it's terrible there.
[19:48:06] nfk|laptop: and emerge on the workstation/server
[19:48:21] nfk|laptop: err.. portage
[19:48:26] rhizome: the less i have to sudo in development the better
[19:48:46] nfk|laptop: it remembers you for 5 minutes
[19:48:48] tubbo: smathy: i've never really had an issue with it, but it's 1 more level of abstraction
[19:48:54] rhizome: nfk|laptop: configurable
[19:48:54] tubbo: so not really "terrible"
[19:49:00] nfk|laptop: and the server actually does not ask for password
[19:49:01] sunya7a: capin: i hear you...i thought about it longer than i should have =) then decided to just try it....i don't prefer one over the other myself...but for someone that never used any, I would start with rbenv...mainly because it only does one thing
[19:49:09] nfk|laptop: very bad style, i know
[19:49:43] rhizome: visudo and comment out the NOPW line
[19:49:44] tubbo: nfk|laptop: yeah, not sure if people would actually use rbenv et al if we had better packages for every manager out there
[19:50:02] nfk|laptop: rhizome, i put it there intentionally
[19:50:04] tubbo: they'd probably just use it to re-link the binaries from their "normal" location
[19:51:13] alaing: has joined #RubyOnRails
[19:51:19] nfk|laptop: %wheel ALL = (ALL) NOPASSWD: ALL
[19:51:27] smathy: tubbo, not sure how that makes it terrible, I love it - much better way to update ruby without having to worry about the system ruby, and any tools relying on that.
[19:51:33] nfk|laptop: and commenting that out will probably break sudo
[19:51:42] isjaylee: has joined #RubyOnRails
[19:52:05] tubbo: it's not bad style to use NOPASSWD: ALL
[19:52:11] smathy: nfk|laptop, not sure what you're pointing me to.
[19:52:20] nfk|laptop: [22:49] <rhizome> visudo and comment out the NOPW line
[19:52:32] nfk|laptop: doing that may quite likely break sudo
[19:52:41] herbst: has joined #RubyOnRails
[19:52:43] tubbo: you'll just have to type in your password
[19:52:43] rhizome: no it won't
[19:52:53] smathy: I'm always selective about what I NOPASSWD.
[19:52:55] tubbo: it will break any kind of automated tools that use sudo :D
[19:52:56] nfk|laptop: tubbo, i doubt that
[19:53:00] tubbo: nfk|laptop: well you're wrong
[19:53:10] tubbo: nfk|laptop: !try
[19:53:10] helpa: nfk|laptop: Why don't you try it and find out for yourself?
[19:53:17] nfk|laptop: since su works, let's do that
[19:53:33] rhizome: requires root to have a known password
[19:53:36] Silox|: has joined #RubyOnRails
[19:54:12] nfk|laptop: tubbo, rhizome, yep, broken
[19:55:19] isjaylee: has left #RubyOnRails: ()
[19:55:19] nfk|laptop: and now unbroken that you can;t even do on ubuntu by default
[19:55:41] nfk|laptop: never recommend a noob do that, you two quacks
[19:56:21] smathy: nfk|laptop, never take non Rails advice in #RubyonRails.
[19:56:56] smathy: (ideally never ask for it either)
[19:57:00] baweaver: has joined #RubyOnRails
[19:58:18] nfk|laptop: rhizome, that line you wanted commented out was not a new line, it was a modified line which is how you do it
[19:58:49] nfk|laptop: and commenting that out without restoring the original or a similar line will yield just that, a valid sudo config so visudo won't complain but good luck using it
[20:00:32] petricore: has joined #RubyOnRails
[20:01:48] Santhanaraman: has joined #RubyOnRails
[20:03:15] dan0034001: im working with wicked_pdf and i am seeing the pdf on heroku larger font than on local env
[20:03:33] dan0034001: i have the DPI set to 300 and zoom to 1.0
[20:03:50] dan0034001: in both a init file and also in the actual render out method in the controller
[20:04:51] shellghost: has joined #RubyOnRails
[20:05:10] shellghost: has left #RubyOnRails: ()
[20:07:01] relix: has joined #RubyOnRails
[20:07:42] imp4t: has joined #RubyOnRails
[20:08:11] nfk|laptop: dan0034001, try DPI 96
[20:08:52] nfk|laptop: if that's the DPI of the screen then even virtually any tablet and many/most smartphones won't have it that high
[20:09:02] njero: has joined #RubyOnRails
[20:09:34] nfk|laptop: just a guess but fiddle around
[20:09:37] dan0034001: any idea why just being on heroku would make it different on same machine?
[20:09:47] nfk|laptop: never used it so no idea
[20:10:18] nfk|laptop: *virtually no tablet
[20:10:34] smathy: dan0034001, different fonts, different DPI defaults, could be a few things.
[20:10:36] nfk|laptop: or, actually, it was right the first time just weirdly phrased
[20:10:59] VeryBewitching: has joined #RubyOnRails
[20:11:16] nfk|laptop: that too, you can check if the fonts are available
[20:11:45] dan0034001: i have font-faces included via base64 encoding
[20:12:06] dan0034001: and i tried em, pt, px
[20:12:12] stamina: has joined #RubyOnRails
[20:12:22] nfk|laptop: they should have been provided by the PDF file but either that bit is not implemented/enabled or the default fonts which do not need to be included are not present because it's a server or because many are owned by adobe and therefore not free as in beer
[20:12:50] nfk|laptop: and even when older versions are, they might not be free enough for just not interesting for distros to package
[20:13:00] dan0034001: I manually encoded fonts i purchased from a otf file
[20:13:25] nfk|laptop: and you paid in?
[20:14:00] dan0034001: yea i paid for futura pt
[20:14:08] dan0034001: i see the correct font its just too big
[20:14:20] dan0034001: so its not fitting on the page
[20:14:23] nfk|laptop: i think futura was pretty cool
[20:14:49] nfk|laptop: assuming it's the humanist typeface i think it is
[20:15:07] annlewis: has joined #RubyOnRails
[20:15:32] juhoh: has joined #RubyOnRails
[20:15:40] mwlang: has joined #RubyOnRails
[20:15:58] dan0034001: im just so confused why in the same browser local vs heroku it can be different size font
[20:16:00] dan0034001: its blown up
[20:16:12] dan0034001: when i comment out the dpi setting locally it looks like it does in production
[20:16:26] dan0034001: so it makes me think its the dpi setting not getting set in production for some reason
[20:16:48] ror15: has joined #RubyOnRails
[20:17:32] nfk|laptop: your display does 300?
[20:17:38] baweaver: has joined #RubyOnRails
[20:18:00] dan0034001: im on a mac retina
[20:18:11] nfk|laptop: i don't think that was 300 exactly either
[20:18:22] nfk|laptop: also please remember that not everyone has a retina
[20:18:37] dan0034001: but why different on local/ vs heroku
[20:18:42] dan0034001: same browser
[20:18:44] dan0034001: same display
[20:18:47] nfk|laptop: on my screen it would be more than 3 times too small
[20:19:36] adaedra: dan0034001: maybe your reader has some settings saved for the local file that it gets back?
[20:20:06] nfk|laptop: yeah, check it's scaled to 100%?'
[20:20:08] dan0034001: not sure i completely understand?
[20:20:34] nfk|laptop: it could be that your PDF reader treats them as two different files and you have zoomed one of them
[20:20:40] nfk|laptop: just a guess on adaedra's part
[20:20:55] nfk|laptop: depends on what you're using
[20:21:00] dan0034001: its soomed to 100% in both
[20:21:04] dan0034001: the page size is the same in both
[20:21:10] dan0034001: just herou font is way bigger
[20:21:24] tercenya: has joined #RubyOnRails
[20:21:25] nfk|laptop: dan0034001, and the typeface is the right one?
[20:21:40] dan0034001: looks exact smae except font is larger
[20:21:48] nfk|laptop: you could try setting it to Ubuntu and see if U is as weird as it should be
[20:21:50] nfk|laptop: that's how i check
[20:21:51] dan0034001: basically causing it not to fit on the page in heroku
[20:22:02] nfk|laptop: dan0034001, and you do know how to check for that, right?
[20:22:04] adaedra: dan0034001: there are ways of putting your mac in non-retina settings, if you want to test if it's the source of the problem.
[20:22:47] dan0034001: just why would it be fidderent in the a different tab on same browser?
[20:23:02] adaedra: you're sure it's the same document?
[20:23:11] nfk|laptop: dan0034001, basically you need to be aware of typefaces specific features and look for those
[20:23:25] dan0034001: i can get my local to be large like heroku if i comment out the dpi setting
[20:23:30] nfk|laptop: many fonts look similar especially if you compare them at hugely different scales
[20:23:49] dan0034001: so it seems like on heorku it is ignoring the dpi setting of wicked_pdf
[20:24:22] nfk|laptop: dan0034001, then chances are heroku is rendering at a normal DPI or something
[20:24:32] dan0034001: anyway to fix that
[20:24:34] nfk|laptop: i'm just guessing what wicked_pdf does, mind you
[20:24:41] nfk|laptop: by a windows machine
[20:24:44] dan0034001: besides making it look good without a dpi setting on local
[20:25:19] dan0034001: ugh gross lol
[20:25:51] nfk|laptop: you don't have to use it, you can install linux on it (if the bootloader allows for that and the hardware has drivers)
[20:25:55] dikaio: has joined #RubyOnRails
[20:26:03] arthurix_: has joined #RubyOnRails
[20:26:39] PlasmaStar: has left #RubyOnRails: ()
[20:26:59] dan0034001: im just confused why wicked_pdf would ignore a dpi setting on heroku but not local dev
[20:27:13] nfk|laptop: i'm more confused why PDF would even have that
[20:27:19] pontiki: has joined #RubyOnRails
[20:27:23] towski_: has joined #RubyOnRails
[20:27:37] bruno-: has joined #RubyOnRails
[20:28:27] nfk|laptop: PDFs are supposed to look the same on every device, that's their selling point
[20:28:42] nfk|laptop: so making them DPI specific is plain wrong
[20:29:25] pontiki: could someone try hitting up http://www.tamouse.org and see if it's responding?
[20:30:13] LambdaSource: has joined #RubyOnRails
[20:30:37] PlasmaStar: has joined #RubyOnRails
[20:30:59] rhizome: pontiki: looks like a no
[20:32:48] chopin: has joined #RubyOnRails
[20:32:51] kitsuneyo: has joined #RubyOnRails
[20:34:33] momomomomo: has joined #RubyOnRails
[20:35:10] sdwrage: has joined #RubyOnRails
[20:35:12] bruno-_: has joined #RubyOnRails
[20:35:13] rakm: has joined #RubyOnRails
[20:36:34] meoblast001: has joined #RubyOnRails
[20:37:26] ruurd: has joined #RubyOnRails
[20:37:47] siddart: has joined #RubyOnRails
[20:38:05] ruurd: has joined #RubyOnRails
[20:38:45] _djbkd: has joined #RubyOnRails
[20:40:16] safety_cut: has joined #RubyOnRails
[20:40:28] bruno-_: has joined #RubyOnRails
[20:42:57] rakm: has joined #RubyOnRails
[20:43:16] cleopatra: has joined #RubyOnRails
[20:43:36] diggitydane: has joined #RubyOnRails
[20:44:24] diggitydane: any good recommendations for reporting on ActiveModel records? daily totals, grouping, etc.
[20:47:59] ellisTAA: has joined #RubyOnRails
[20:48:07] meoblast: has joined #RubyOnRails
[20:49:47] matthewd: diggitydane: AMo doesn't really provide API for working with aggregate collections
[20:50:34] matthewd: So you either have the AR::Relation API if they're actually AR objects, or whatever the equivalent for your backend is, or Enumerable
[20:52:01] diggitydane: matthewd, are there any recent gems like ruport, acts_as_reportable, etc for Rails 4?
[20:52:24] diggitydane: or do most people just do raw SQL into an array? or a SQL View? I can't find any good examples anywhere
[20:53:08] kitsuneyo: i'm gonna try this select2-rails question again
[20:54:44] kitsuneyo: i'm using select2-rails. i have an edit form with multiple records for the same field. select2-rails uses a css #id in a pre-loaded script to work. how can i use multiple select2 fields in my form?
[20:55:11] atomical: has joined #RubyOnRails
[20:55:14] l_tonz: has joined #RubyOnRails
[20:55:59] matthewd: diggitydane: Personally, I'd generally start with a Relation, and (if necessary) potentially move that towards being more raw-SQLish... but it's not something I've done a lot of, so I won't claim that's good advice
[20:56:07] bratsche: has joined #RubyOnRails
[20:56:25] bricker: kitsuneyo: If you're using the jQuery plugin, you can just do $("#yourFirstElement").select2(), $("#yourSecondElement").select2()
[20:56:54] bricker: kitsuneyo: I'm sure there's a way to do that without the jquery plugin, but I always use the jquery plugin so I don't know how to do it without
[20:57:02] capin: oh the fun with refile never ends *sigh*
[20:57:05] rhizome: maybe $('#ele1, #ele2').select2()
[20:57:20] kitsuneyo: bricker, but i don't know how many i'll need since the user can add or delete rows
[20:57:23] matthewd: bricker: It sounds like you should be able to use a ".class" instead of the "#id" if you wanted to, maybe?
[20:57:33] kitsuneyo: matthewd, i did try that
[20:57:39] kitsuneyo: but it didn't work
[20:57:44] bricker: kitsuneyo: yes, when the user adds a row you need to specifically initialize select2 for the new form field
[20:57:47] safety_cut: has joined #RubyOnRails
[20:58:12] bricker: addAField("newFieldId"); $("#newFieldId").select2()
[20:58:41] kitsuneyo: bricker, that sounds like exactly what i need to do except i only just started learning js
[20:58:47] rhizome: look into delegation
[20:59:05] kitsuneyo: and i don't know how to implement
[20:59:27] bricker: kitsuneyo: wherever the code is to add the form field, put a select2 call right after it
[21:00:19] diggitydane: matthewd, ok thanks. that's kind of what i'm doing, but I figured there's a better way
[21:01:51] dnewkerk: kitsuneyo: before continuing, I suggest learning about jquery event delegation http://learn.jquery.com/events/event-delegation/ ??? this is how you tie behavior to future elements that don???t exist yet
[21:02:43] kitsuneyo: hey thanks dnewkerk, i'll read it. i know nothing about jquery right now, but i guess this will help
[21:02:49] dnewkerk: kitsuneyo: also with select2 I like to add a distinct way to add the behavior consistently rather than tying it to this ID and that ID....
[21:03:01] squirrelz: has joined #RubyOnRails
[21:03:43] kitsuneyo: and i thought rhizome meant i should try getting someone else to do this for me :)
[21:03:57] Ergo: has joined #RubyOnRails
[21:04:46] dnewkerk: what I do is add a data-behavior=???select2??? attribute on the element I plan to use it on, then to activate it, $("[data-behavior~=select2]???).select2();
[21:05:16] hephaestus_rg: has joined #RubyOnRails
[21:06:11] dnewkerk: kitsuneyo: some people do this kind of thing with a special class, such as js-something, but I???ve started trying to use data-behavior for all javascript behavior, and classes only for styling
[21:06:36] dnewkerk: kitsuneyo: this post may help as well http://brandonhilkert.com/blog/organizing-javascript-in-rails-application-with-turbolinks/
[21:06:42] kitsuneyo: i've seen data-behavior in some of the js bootstrap stuff i think
[21:07:07] Xenosis: has joined #RubyOnRails
[21:07:12] arthurix: has joined #RubyOnRails
[21:07:29] kitsuneyo: i'm working through eloquent javascript, i have a lot to learn
[21:07:47] Xenosis: has joined #RubyOnRails
[21:08:00] dnewkerk: also https://gorails.com/episodes/clean-javascript-with-data-behavior
[21:08:18] dnewkerk: no problem :)
[21:08:45] dnewkerk: my Rails app has a ton of javascript, so I???ve had to work hard on finding ways to make it manageable
[21:09:26] kitsuneyo: what's your app?
[21:09:37] kies^: has joined #RubyOnRails
[21:09:44] Xenosis: Can anyone recommend me a good resource for learning Coffeescript for Rails, either a book or tutorial etc
[21:10:22] CBX: has joined #RubyOnRails
[21:10:30] smathy: Xenosis, !ajax
[21:10:30] helpa: Xenosis: See http://guides.rubyonrails.org/working_with_javascript_in_rails.html for everything you ever wanted to know about working with JS in Rails.
[21:10:49] Xenosis: many thanks
[21:11:27] dnewkerk: kitsuneyo: http://kinonation.com ??? beta version that???s live is not Rails (that was our get-it-out-the-door version haha)??? we???re rebuilding from scratch with Rails
[21:12:12] AndroidLoverInSF: has joined #RubyOnRails
[21:12:50] LambdaSource: has joined #RubyOnRails
[21:12:56] PlasmaStar: has left #RubyOnRails: ()
[21:13:19] rhizome: you know about these guys? https://en.wikipedia.org/wiki/Kino_International_%28company%29
[21:13:31] dnewkerk: Xenosis: CoffeeScript in Action is good
[21:13:41] kitsuneyo: looks nice dnewkerk :)
[21:14:26] dnewkerk: rhizome: nope haven???t heard of that. I???m developer not company owner
[21:15:06] dnewkerk: kino is a general film related term though - https://en.wikipedia.org/wiki/Kino
[21:16:02] hephaestus_rg: has joined #RubyOnRails
[21:17:19] PlasmaStar: has joined #RubyOnRails
[21:18:59] SteenJobs: has joined #RubyOnRails
[21:19:48] mloy: has joined #RubyOnRails
[21:19:57] kitsuneyo: kino is german for cinema
[21:20:08] bo_relkniw: has joined #RubyOnRails
[21:20:25] dnewkerk: kitsuneyo: particularly relevant to us since founder is german :D
[21:21:41] Coldblackice: has joined #RubyOnRails
[21:21:45] crdpink: has joined #RubyOnRails
[21:25:39] LambdaSource: has joined #RubyOnRails
[21:26:19] CCBX: has joined #RubyOnRails
[21:27:57] yfeldblum: has joined #RubyOnRails
[21:29:22] CCBX: has joined #RubyOnRails
[21:30:10] bendangelo: has joined #RubyOnRails
[21:30:29] colleenmcguckin: has joined #RubyOnRails
[21:30:47] annlewis: has joined #RubyOnRails
[21:32:15] LambdaSource: has joined #RubyOnRails
[21:35:47] kadoppe: has joined #RubyOnRails
[21:35:51] chopin: has joined #RubyOnRails
[21:38:02] vigasdeep: has joined #RubyOnRails
[21:39:42] surrealanalysis: has joined #RubyOnRails
[21:40:14] LambdaSource: has joined #RubyOnRails
[21:42:12] kies^: has joined #RubyOnRails
[21:44:20] Synthead: can I use common AR callbacks (like after_save) simply by including a model concern? I'm trying to DRY up my code and not include duplicate after_save do ... done blocks in every model
[21:44:39] woods: has joined #RubyOnRails
[21:45:00] siddart: has joined #RubyOnRails
[21:45:28] matthewd: Synthead: Yep; put them in the concern's #included block
[21:46:06] ModusPwnens: has joined #RubyOnRails
[21:46:06] kitsuneyo: off topic, but which versions of photoshop support mac retina screen?
[21:46:20] ModusPwnens: Does someone have a good resource for validation conventions in rails?
[21:46:42] ModusPwnens: I know that if you are doing validations on a model, then that should go in the model. I also know that if you are doing validation on the existence of parameters, you should use strong parameters for that.
[21:48:50] workmad3: has joined #RubyOnRails
[21:49:04] jenrzzz: has joined #RubyOnRails
[21:49:12] ModusPwnens: But for this case, the user is essentially providing a token in the form. If the environment is production, I want to make a call to a service with that token to verify they have permissions for that action. Should that go in a before_action filter?
[21:49:13] woods: has joined #RubyOnRails
[21:49:32] smathy: ModusPwnens, no, strong parameters is not about validating presence.
[21:50:09] ModusPwnens: smathy: I know it's not 'about' validating presence, but you can basically use it for that by doing params.require(:some_param)
[21:50:31] ModusPwnens: Or is that a misuse of strong params?
[21:50:33] smathy: ModusPwnens, no, you can't.
[21:51:01] ModusPwnens: smathy: What do you mean, "you can't". You totally can and it works and it results in a 400 error.
[21:51:07] smathy: ModusPwnens, well, whether misuse or not (which it is), it just won't work. That doesn't *validate* the value of the attribute.
[21:51:29] ModusPwnens: smathy: No, but it validates that the attribute exists in the request.
[21:51:35] smathy: ModusPwnens, it just confirms that the key is present in the params, it's nothing to do with its value.
[21:51:48] ModusPwnens: smathy: Yes, I know. I never claimed otherwise.
[21:52:29] baweaver: has joined #RubyOnRails
[21:52:40] LambdaSource: has joined #RubyOnRails
[21:53:02] woods: has joined #RubyOnRails
[21:53:10] smathy: ModusPwnens, well then I don't understand how you're using the word "validation" when you said what you said initially about strong params.
[21:53:31] ModusPwnens: " I also know that if you are doing validation on the existence of parameters, you should use strong parameters for that." <- my original message. I said I was just validating existence.
[21:53:53] Synthead: matthewd: ooh, ok! I'll try it
[21:53:57] safety_cut: has joined #RubyOnRails
[21:54:05] smathy: ModusPwnens, right, so I don't know what that means if it doesn't mean validating the existence of a value in the params.
[21:54:10] herbst: has joined #RubyOnRails
[21:54:15] smathy: ModusPwnens, the fact that a key exists isn't validating anything.
[21:54:31] ModusPwnens: smathy: Okay, what's the word for checking whether or not a parameter exists? that's the word I meant to use.
[21:55:22] smathy: ModusPwnens, ok, doesn't really have a word/name in Rails. Probably you'd just say "requiring the param in my strong params"
[21:55:38] ModusPwnens: Okay, so it was a semantics thing. my bad.
[21:55:39] smathy: ModusPwnens, it's not of much value in terms of ensuring the validity of your data.
[21:55:53] smathy: ModusPwnens, ....so people don't tend to talk much about it.
[21:55:59] ModusPwnens: ignoring that, what about my other question?
[21:56:20] ModusPwnens: where I want to perform a service call on a token in the request to check for permissions. Is that a good candidate to put in a before_action filter?
[21:58:15] lacuna: has joined #RubyOnRails
[22:00:40] rhizome: checking permissions?
[22:01:21] smathy: I suppose, although authorization is often at a finer grained level than a before_filter (usually applied to multiple actions) would make sense for.
[22:01:25] smathy: ModusPwnens, ^
[22:02:12] colleenmcguckin: has joined #RubyOnRails
[22:03:04] lacuna: has joined #RubyOnRails
[22:03:40] shibabu: has joined #RubyOnRails
[22:04:08] duderonomy: has joined #RubyOnRails
[22:05:16] ruurd: has joined #RubyOnRails
[22:06:47] woods: has joined #RubyOnRails
[22:10:20] bruno-: has joined #RubyOnRails
[22:10:49] AxonetBE: has joined #RubyOnRails
[22:11:49] greengriminal: has joined #RubyOnRails
[22:14:00] EminenceHC: has joined #RubyOnRails
[22:14:20] lsone_: has left #RubyOnRails: ()
[22:15:05] lsone: has joined #RubyOnRails
[22:15:23] arthurix_: has joined #RubyOnRails
[22:16:16] ModusPwnens: smathy: So instead of a before_filter, would you just do the check in the action itself?
[22:16:16] htmldrum: has joined #RubyOnRails
[22:16:50] bmalum: has joined #RubyOnRails
[22:17:12] riotjones: has joined #RubyOnRails
[22:17:27] crdpink: has joined #RubyOnRails
[22:19:38] danman: has joined #RubyOnRails
[22:19:50] smathy: ModusPwnens, I would, yes.
[22:20:18] smathy: ...maybe very universal checks I might do in a filter, like before_filter :logged_in?
[22:22:09] arthurix: has joined #RubyOnRails
[22:23:44] cogsbox: has joined #RubyOnRails
[22:23:48] arthurix_: has joined #RubyOnRails
[22:25:51] stannard: has joined #RubyOnRails
[22:27:10] juhoh: has joined #RubyOnRails
[22:27:29] andhofmt: has joined #RubyOnRails
[22:27:54] cogsbox: has left #RubyOnRails: ()
[22:28:32] MartinElvar: has joined #RubyOnRails
[22:28:36] cogsbox: has joined #RubyOnRails
[22:28:40] atomical: has joined #RubyOnRails
[22:28:46] andhof-mt: has joined #RubyOnRails
[22:28:56] andhof-mt: Hey I have a organization question
[22:29:09] andhof-mt: if I have a website with URL : website.com/courses/1
[22:29:22] andhof-mt: and I want to split courses into multiple parts, should it be: website.com/courses/1/lessons/2
[22:29:32] rhizome: that's fine
[22:29:41] andhof-mt: or website.com/courses/1/2 or something totally different
[22:29:50] smathy: andhof-mt, !routing
[22:29:50] helpa: andhof-mt: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[22:29:54] rhizome: first is better
[22:30:20] smathy: Oh sorry, I missed the "should it be" question.
[22:30:30] smathy: ...although the routing guide is still good.
[22:30:37] rhizome: doesn't have to be, could be a variation on /courses/english/2-cursive or whatever you want, pretty much
[22:31:18] andhof-mt: hmm just trying to figure out what looks most proffesional. relaunching this site that is pretty big
[22:31:54] ror15: Pinterest auth officially complete
[22:32:04] rhizome: now blog your experience
[22:32:51] l_tonz: has joined #RubyOnRails
[22:33:22] smathy: andhof-mt, I'm not a fan of nested routes, for me if lesson 2 can only belong to course 1 then the first part of that route is entirely redundant and therefore silly.
[22:33:39] \13k: has joined #RubyOnRails
[22:33:43] kitallis: has joined #RubyOnRails
[22:33:47] andhof-mt: smathy, so you would go with /courses/1/2
[22:33:50] alexblom: has joined #RubyOnRails
[22:34:24] smathy: If you were going to show a list of lessons then I get /course/1/lessons - but showing an individual lesson I'd just have /lessons/2
[22:34:37] smathy: *list of lessons for a particular course
[22:35:18] quazimodo: has joined #RubyOnRails
[22:35:20] quazimod1: has joined #RubyOnRails
[22:35:21] bmalum: has joined #RubyOnRails
[22:36:15] smathy: I think RESTful routes are very overused in general though, so you might disagree with me completely.
[22:36:52] arthurix: has joined #RubyOnRails
[22:36:53] EminenceHC: has joined #RubyOnRails
[22:36:56] cogsbox: Hi, I just cloned my heroku app which has a lot of data. I just wanted to make a few changes, but in order to see changes on localhost I have to rake db:migrate. Will this wipe my data clean? If so how can I view changes I want to make without reseting my data?
[22:37:28] andhof-mt: i dont care about rest ful just how good looking
[22:37:38] andhof-mt: cogsbox, you are good to go
[22:37:45] andhof-mt: rake db:migrate updates schema, not wipe db
[22:37:50] andhof-mt: unless you drop columns
[22:38:08] cogsbox: andhof-mt, thanks
[22:38:26] andhof-mt: cogsbox, if you did add_column command you are g2g. if you did drop_column you are not g2g.
[22:39:22] cogsbox: andhof-mt, I am just changing some views then I will be pushing back to heroku. Just need it to look nice.
[22:39:51] kitsuneyo: testing is my least favourite thing about rails. it takes all the fun out of it, knowing you have to write stupid tests.
[22:40:20] kitsuneyo: does anyone just not test and get away with it?
[22:41:20] smathy: ...to both parts of your question.
[22:41:24] smathy: No one doesn't test.
[22:41:55] smathy: Everyone writes tests, some people record them in files so they can be re-run later, some discard them after writing them so they have to rewrite them again every time they want to re-test.
[22:42:03] baweaver: Why do you think tests are stupid?
[22:42:07] pwnd_nsfw: _you have to write -stupid- tests_
[22:42:14] pwnd_nsfw: Why would you write tests that are stupid anyways
[22:42:36] pwnd_nsfw: No one is making you write tests to begin with.
[22:42:42] pwnd_nsfw: gl maintaining a large codebase dough
[22:42:55] l_tonz: has joined #RubyOnRails
[22:43:00] smathy: Pfft, you do have to write tests.
[22:43:02] smathy: Everyone does.
[22:43:29] cogsbox: I have another noob question. I have a login when my app is live, but now that I am on localhost how can I view content I would normally have to be logged in to see.
[22:43:31] baweaver: Ignore at your own peril
[22:43:32] smathy: Every line of code you write in a rails console to check something is writing a test. You write code, you view the output, you ensure it's correct.
[22:43:40] pwnd_nsfw: smathy, would you jump off a bridge, etc............
[22:43:55] rromanchuk: has joined #RubyOnRails
[22:43:59] smathy: ...every click through your website, each entry into a form field and each click on a submit button is "writing" a test.
[22:44:11] smathy: Every software developer tests their software all the time.
[22:44:22] sankaber: has joined #RubyOnRails
[22:44:35] smathy: No one just writes an app and ships it without ever testing it.
[22:44:46] smathy: ...just that the smart people record their tests so they can run them later.
[22:44:49] pwnd_nsfw: Every move you make, every vow you break, I'll be testing you
[22:45:20] htmldrum: has joined #RubyOnRails
[22:45:53] smathy: cogsbox, login.
[22:48:54] trosborn: has joined #RubyOnRails
[22:48:59] andhof-mt: how many of you are actually rails developers for work?
[22:49:15] cogsbox: smathy, thats what I thought to. I can login online, but I can't seem to login on localhost/
[22:49:27] smathy: cogsbox, why not?
[22:49:44] andhof-mt: I've been trying to find a rails job in Seattle, but most companies here are java or c#. Any good RoR specific job sites?
[22:50:03] jenrzzz: has joined #RubyOnRails
[22:50:41] mwlang: I???m trying to get the VCR gem to capture a timeout condition.
[22:51:02] smathy: andhof-mt, not really, the best sites aren't rails specific.
[22:51:36] smathy: andhof-mt, http://jobs.rubynow.com/ is ok.
[22:51:38] jessemcgilallen: has joined #RubyOnRails
[22:51:42] mwlang: so I set up a honeypot and hit it with a Faraday connection???.if I set the Faraday connection to a timeout greater than the honeypot???s hold, I get a successful VCR capture. But if Faraday times out, nothing recorded to cassette.
[22:52:07] smathy: andhof-mt, my fave job sites are wwr github and angel list.
[22:52:35] cogsbox: smathy, haha that is what I would like to know. This is my gist https://gist.github.com/cogsbox/b6401de5f6793c480a93
[22:52:59] smathy: Sorry, we work remotely.
[22:53:14] smathy: Basecamp's job site: https://weworkremotely.com/
[22:53:17] mwlang: oh, so not walking war robots.
[22:53:44] Sigma00: has joined #RubyOnRails
[22:54:00] andhof-mt: wwr, github?
[22:54:09] cogsbox: smathy, okay
[22:54:45] smathy: cogsbox, you're getting an error about a missing file.
[22:54:47] baweaver: woods: I was about to fake an ls command for ya too
[22:55:08] woods: i should have waited for it
[22:55:25] cogsbox: smathy, thanks
[22:56:31] pydave6367: has joined #RubyOnRails
[22:57:15] IFrank00: has joined #RubyOnRails
[22:58:59] lacuna: has joined #RubyOnRails
[23:00:44] kitsuneyo: smathy, baweaver, pwnd_nsfw, just felt like complaining
[23:00:48] kitsuneyo: i know i have to test
[23:01:31] annlewis: has joined #RubyOnRails
[23:01:34] smathy: Good, welcome back to the cult.
[23:03:06] woods: the cult of rails?
[23:03:07] pwnd_nsfw: We knew you couldn't leave
[23:03:27] woods: it is like the hotel california
[23:03:28] smathy: woods, well that cult is the cult of testing.
[23:03:45] duncannz: has joined #RubyOnRails
[23:04:00] woods: smathy, got it, thank you for the clarification :)
[23:04:11] smathy: Any time someone even murmurs a suggestion of not writing tests and being ok we all have to jump on them and suck out their brains.
[23:04:26] adaedra: woods: thanks. Now I have the song in my head.
[23:04:30] woods: nailed it
[23:04:59] baweaver: You can check out master any time you like, but you can never leave
[23:05:23] kitsuneyo: haha baweaver
[23:06:07] baweaver: ACTION makes a note to rewrite Hotel California in a programming context later
[23:06:21] woods: welcome to the hotel railsisforyou
[23:06:36] baweaver: Welcome to Startup California
[23:06:57] baweaver: I already know how to play the song, so now to tweak it a bit.
[23:07:00] woods: living it cause rails will test it for you
[23:07:05] woods: living it up*
[23:07:19] RegulationD: has joined #RubyOnRails
[23:07:39] rhizome: baweaver: https://twitter.com/SwiftOnSecurity/status/657684171687485441
[23:09:51] stannard: has joined #RubyOnRails
[23:10:33] kitsuneyo: what gets deleted when i destroy a model? not the controller or views, right?
[23:11:11] smathy: kitsuneyo, what does "destroy a model" mean?
[23:11:25] kitsuneyo: rails destroy model name
[23:11:30] kitsuneyo: that's a thing right?
[23:11:38] rhizome: just the files created by the generator
[23:11:57] woods: violently it sounds like
[23:12:18] rhizome: model will be the model itself, tests, fixtures, maybe locale
[23:12:22] Mattx: has joined #RubyOnRails
[23:12:51] Jasaka: has joined #RubyOnRails
[23:13:20] smathy: kitsuneyo, ok, so just run: rails g model
[23:13:24] smathy: kitsuneyo, it shows you what's created.
[23:13:33] smathy: (and by implication what's destroyed)
[23:13:40] woods: (violently)
[23:13:47] SteenJobs: has joined #RubyOnRails
[23:13:57] smathy: kitsuneyo, also, use git and then you can stop worrying.
[23:14:47] baweaver: has joined #RubyOnRails
[23:14:59] Mattx: hey there! I'm creating an email like this: mail = MyMailer.newsletter(1, "foo"). and then I want to do something with its content, so I use mail.text_part.to_s and mail.html_part.to_s
[23:15:29] kitsuneyo: i didn't know that smathy, about rails g model
[23:15:34] kitsuneyo: i do use git though
[23:15:43] Mattx: but the content of the mail is returned with some headers prepended, like "Content-Type... Content-Transfer-Encoding"...
[23:16:00] Mattx: how do I get the mail's body?
[23:16:44] skiz: has joined #RubyOnRails
[23:18:09] smathy: kitsuneyo, all the generators have help like that.
[23:18:20] sdwrage: has joined #RubyOnRails
[23:18:24] kitsuneyo: thanks smathy
[23:18:35] smathy: Very welcome.
[23:18:44] workmad3: has joined #RubyOnRails
[23:20:53] matthewd: Mattx: Check the class of mail.text_part; I'm sure it'll have a more suitable method to get what you want
[23:24:26] Wixy: has joined #RubyOnRails
[23:24:35] Maletor: is it good practice to do a PUT on /comments that updates all comments?
[23:25:48] kitsuneyo: anyone have a good guide for writing a good readme.md?
[23:26:33] blackmesa: has joined #RubyOnRails
[23:28:15] Technodrome: has joined #RubyOnRails
[23:28:53] Technodrome: anyone here ever transitioned a django app to a rails one?
[23:28:54] rhizome: The Mythical Man Month :P
[23:31:01] bricker: Technodrome: yep
[23:31:23] Technodrome: bricker: I might just convince them to stay on django for this
[23:31:45] andhof-mt: django has worse documentaiton
[23:32:07] smathy: maletor, ALL comments?
[23:32:20] smathy: maletor, usually it'd be the comments for a given user or on a given post or something.
[23:32:21] Technodrome: maybe so, but django people always rant how thei docs are the best andhof-mt
[23:32:34] Maletor: smathy: ok say for a given user.
[23:32:41] jgt: has joined #RubyOnRails
[23:32:55] Maletor: /users/4/comments
[23:32:57] smathy: maletor, then maybe as a PUT for the user.
[23:33:37] Maletor: ya. that would start to get so dirty so fast. everything is related to a user
[23:35:02] smathy: Yeah, is why I don't do that :)
[23:35:16] Maletor: what do you do
[23:35:28] cleopatra: has joined #RubyOnRails
[23:36:28] bricker: Technodrome: Django is a good framework, better than Rails in a lot of ways, and rewriting it in rails is a waste of time and money
[23:36:52] Technodrome: what ways do you think its better bricker ? i need to present it
[23:38:32] bricker: Its usage of the MVC pattern is more traditional and strict, and that alone makes Django apps more pleasant to work with. It's less likely that you'll come across some magic, hard-to-understand, or unclear code (of course it still happens, but it's harder to write a bad Django app imo)
[23:38:46] bricker: Django is more strict I mean
[23:39:04] andhof-mt: Rails has a much bigger community and better gems tho
[23:39:08] bricker: Django's migration system (formerly South, now built-in) is better by a mile
[23:39:34] andhof-mt: Also, rails has #rubyonrails on freenode
[23:39:39] andhof-mt: check out #django and get back to us
[23:39:44] bricker: andhof-mt: pypi is huge, I have never had trouble finding something that I need.
[23:39:51] bricker: #django is great too
[23:40:07] bricker: not as busy as #rubyonrails, but most channels aren't
[23:40:09] ngscheur1: has joined #RubyOnRails
[23:41:08] smathy: ...coz Rails is so good we all have a lot of spare time.
[23:41:35] greengriminal: has joined #RubyOnRails
[23:41:48] bricker: Rails used to iterate lot faster than Django, but that's not true anymore
[23:42:42] Coldblackice: has joined #RubyOnRails
[23:43:58] l_tonz: has joined #RubyOnRails
[23:44:01] Maletor: checked out django
[23:44:15] Maletor: my report back is it has ~25 less people in it than #ror
[23:44:30] Synthead: if I have two AR callbacks that call an identical function (via, i.e., after_create :my_function), and these callbacks are in a concerns file's "included" block, would it be wrong to put that function inside the included block?
[23:45:10] bricker: Synthead: put the function in the module
[23:45:12] ModusPwnens: I stepped away for a bit, but previously I was talking about whether or not something belonged as a before_action filter and the consensus was that it didn't. So, in general, when does something belong in a before_action filter? Is there some sort of guideline?
[23:45:26] Synthead: bricker: in the module? what do you mean?
[23:45:29] bricker: Synthead: then when you include the module, the function will be with it
[23:45:42] Synthead: bricker: in the concern class?
[23:45:49] bricker: Synthead: the module, yes
[23:45:58] bricker: Synthead: you're trying to share the method right?
[23:46:35] bricker: ModusPwnens: prerequisite code that you want to share between actions, generally
[23:46:35] Synthead: bricker: ah, yeah. and yes, this function would be "shared" in the sense that I want it available for all model classes that include it.
[23:46:38] blackmes1: has joined #RubyOnRails
[23:47:11] Synthead: bricker: I'm thinking of making the scope of this "callback function" even narrower, though: right in the "included" block in said module (where the AR callbacks are declared)
[23:47:31] Synthead: bricker: it seems to work, but I don't know if it's bad practice
[23:47:44] matthewd: Synthead: We understand what you mean; don't do that.
[23:47:50] rhizome: has joined #RubyOnRails
[23:48:03] Synthead: matthewd: why not?
[23:48:14] matthewd: It's bad practice ;)
[23:49:16] Synthead: bricker, matthewd: http://pastie.org/10502987
[23:49:19] mary5030: has joined #RubyOnRails
[23:49:36] matthewd: A concern is already a module (i.e., a bag of methods) that you're including into your class. #included is a bonus in which you might put a couple of lines of initialization that must wait until the last minute.
[23:49:38] Synthead: matthewd: but why? I'm not challenging you, I just don't care much for magic bad practices
[23:49:50] bricker: Synthead: The second example is correct\
[23:50:01] Synthead: bricker: why? they both work
[23:50:15] matthewd: They do different things, though
[23:50:46] matthewd: One is defining a method in a concern, and then later including it
[23:50:55] colleenmcguckin: has joined #RubyOnRails
[23:51:05] ModusPwnens: bricker: That sounds like a good heuristic. So if it's an action specific check, it doesn't belong as a before_action filter. Is there some rails conventions doc/guide that talks about this?
[23:51:18] bricker: Synthead: Yes, they both work, but the second one is correct. With the first one you're technically defining the method once for each time you include it
[23:51:24] matthewd: The other is defining a separate method directly into each target class
[23:51:26] mary5030: has joined #RubyOnRails
[23:51:34] bricker: ModusPwnens: not that I can think of
[23:51:48] Synthead: bricker: ohhhh that would make sense
[23:51:54] Synthead: bricker: lemme test that just cause I'm curious
[23:52:10] matthewd: Synthead: `1-1` is a perfectly functional spelling to use every time you want a zero in your code... but it's still not a good idea
[23:52:29] andhof-mt: #define 1 = 0
[23:52:49] rhizome: Synthead: i think the convention is an OOP one to put it as close as possible to the thing that does stuff
[23:52:51] Technodrome: bricker: i will try my best to convince them
[23:52:58] Synthead: matthewd: I understand what bad practices are, but I attempting to learn _why_ this is bad practice :p
[23:52:58] chopin: has joined #RubyOnRails
[23:53:07] bricker: Technodrome: Who are you trying to convince?
[23:53:20] bricker: Technodrome: just show them how long it will take you to rewrite in rails and how much that it will cost them
[23:53:31] bricker: Technodrome: it's an easy choice when you talk about it in terms of money
[23:54:15] bricker: Technodrome: the bottom line is, Rails is NOT better than Django. And Django is NOT better than Rails. Rewriting an app in either direction is a complete waste.
[23:54:39] Synthead: bricker: I threw a binding.pry in the top of the "included" block. It is ran once when a callback is triggered, then never again.
[23:54:43] ruurd: has joined #RubyOnRails
[23:54:46] matthewd: Synthead: Fair enough... I think I was responding to your use of "they both work" as an apparent counter-argument
[23:54:55] matthewd: Synthead: Once per class it's included into
[23:55:14] bricker: Synthead: it gets run when the module is included
[23:55:16] Synthead: matthewd: ah! yes! that's right
[23:55:44] herbst: has joined #RubyOnRails
[23:55:44] herbst: has joined #RubyOnRails
[23:56:10] MartinElvar: has joined #RubyOnRails
[23:56:16] Synthead: matthewd: I noticed that; it does get defined for every model class. if I put it in the concern's class, it gets declared once, and the callbacks use a common pointer to that method
[23:56:17] Technodrome: bricker: management
[23:56:38] Synthead: bricker, matthewd: bam! great :) I really appreciate the help!
[23:56:46] Technodrome: bricker: 2 dev???s are rails heads that gave them this big talk about how superior rails is
[23:57:14] matthewd: Yeah, that. Also, you get the bonus of avoiding ordering concerns... all the methods are included before your block gets invoked.
[23:57:23] shilon: has joined #RubyOnRails
[23:57:41] stardiviner: has joined #RubyOnRails
[23:59:22] bricker: Technodrome: Well, as someone who has used both frameworks extensively, I can tell you with 100% certainty that neither is completely superior.
[23:59:46] bricker: Technodrome: unfortunately, without the experience of both under your belt, it will be hard for you to make a convincing argument