« Back to channel list

#RubyOnRails - 14 October 2015

« Back 1 day Forward 1 day »
[00:01:33] fre: has joined #RubyOnRails
[00:03:36] Spami: Any idea why this doesn't work http://guides.rubyonrails.org/active_record_querying.html#optimistic-locking
[00:03:43] Spami: I have not AR exception
[00:03:52] Radar: !didntwork
[00:03:52] helpa: 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.
[00:04:36] Spami: ah shit lock_version
[00:08:38] ror15: has joined #RubyOnRails
[00:08:41] Spami: C'est bon ca
[00:08:51] Spami: oops, wrong window
[00:08:54] diego1: has joined #RubyOnRails
[00:09:48] siddart: has joined #RubyOnRails
[00:09:50] diego1: has joined #RubyOnRails
[00:10:37] Motoservo: has joined #RubyOnRails
[00:11:29] Spami: well, I've been struggling on this thing for half a day
[00:11:37] Spami: And I feel like I see the end of the road
[00:11:44] Spami: So, makes me happy, even at 2am
[00:12:22] ellisTAA: has joined #RubyOnRails
[00:19:04] serialaxel: has joined #RubyOnRails
[00:19:14] shmilan: has joined #RubyOnRails
[00:19:27] barhum2013: has joined #RubyOnRails
[00:20:31] IFrank00: has joined #RubyOnRails
[00:22:23] anolp: has joined #RubyOnRails
[00:23:21] fre: has left #RubyOnRails: ("pkill -9")
[00:23:45] Fire-Dragon-DoL: mhhhh if I'm not interested in the content of a query but the query MUST be called with LIMIT 1000, is that bad to test against to_sql in my test?
[00:23:51] seank_: has joined #RubyOnRails
[00:23:51] stannard: has joined #RubyOnRails
[00:24:19] Fire-Dragon-DoL: (instead of creating 1002 records and testing that they are only 1000....)
[00:25:48] Radar: You could probably even test just for limit_value
[00:25:53] Radar: If it's set, then the query will be scoped.
[00:25:59] Radar: -scoped +limited
[00:26:36] bmurt: has joined #RubyOnRails
[00:26:56] kayloos: has joined #RubyOnRails
[00:28:15] sankaber: has joined #RubyOnRails
[00:30:44] riotjones: has joined #RubyOnRails
[00:31:39] riotjones: has joined #RubyOnRails
[00:32:22] pydave6367: has joined #RubyOnRails
[00:34:04] Guest123456666: has joined #RubyOnRails
[00:34:36] axl_: has joined #RubyOnRails
[00:34:41] serialaxel: has joined #RubyOnRails
[00:36:35] EminenceHC: has joined #RubyOnRails
[00:37:36] jamto11: has joined #RubyOnRails
[00:38:02] Sceko: has joined #RubyOnRails
[00:38:12] serialaxel: has joined #RubyOnRails
[00:40:13] pixelhan_: has joined #RubyOnRails
[00:40:39] djbkd: has joined #RubyOnRails
[00:40:57] Fire-Dragon-DoL: Radar: yes that was my idea, I'm not sure if limit_value is better than to_sql in that case because limit_value is private api and to_sql is... to_sql, lol. Sure I don't want to create those 1000 records :P
[00:41:32] serialaxel: has joined #RubyOnRails
[00:43:16] Pupeno_: has joined #RubyOnRails
[00:44:00] serialaxel: has joined #RubyOnRails
[00:45:04] matthewd: Fire-Dragon-DoL: As I mentioned before on order_values... add a test that proves it's working, and you'll be fine
[00:45:17] matthewd: Or, at least you'll defer the problem until the private API goes away
[00:45:36] djbkd: has joined #RubyOnRails
[00:46:18] Fire-Dragon-DoL: matthewd: yes, I'm just unsure if to_sql might be better than using a private API (no way to actually choose, lol)
[00:46:41] willardg: has joined #RubyOnRails
[00:47:49] workmad3: has joined #RubyOnRails
[00:49:00] barhum2013: has joined #RubyOnRails
[00:49:21] joshkovach: has joined #RubyOnRails
[00:49:22] Palaver: has joined #RubyOnRails
[00:50:26] northfurr: has joined #RubyOnRails
[00:51:56] johnflux: has joined #RubyOnRails
[00:52:24] ijiijijjjijiij: has joined #RubyOnRails
[00:52:34] willardg: has joined #RubyOnRails
[00:55:44] bruno-: has joined #RubyOnRails
[00:56:07] ijiijijjjijiij: has joined #RubyOnRails
[00:58:58] Palaver: has joined #RubyOnRails
[00:59:25] serialaxel: has joined #RubyOnRails
[01:02:30] sonofdirt: has joined #RubyOnRails
[01:03:25] serialaxel: has joined #RubyOnRails
[01:03:41] mloy: has joined #RubyOnRails
[01:05:37] manfrin: has joined #RubyOnRails
[01:06:09] northfurr: has joined #RubyOnRails
[01:06:31] sarink: has joined #RubyOnRails
[01:07:25] serialaxel: has joined #RubyOnRails
[01:09:02] Spami: has joined #RubyOnRails
[01:10:15] serialaxel: has joined #RubyOnRails
[01:13:05] CheckYourSix: has joined #RubyOnRails
[01:14:21] acti0nman: What's a good way to count the number of departments on this list? http://www.mass.gov/portal/global-agency-list.html
[01:15:03] sevenseacat: one, two, three...?
[01:16:15] serialaxel: has joined #RubyOnRails
[01:17:00] dopamean_: has joined #RubyOnRails
[01:17:03] acti0nman: i was hoping for some help to script this out. I don't know much programming and it would take me longer to learn to script it out vs just manually copy/pasting into a word document, cutting out the unnecessary, and then importing into a spreadsheet and then counting.
[01:17:16] serialaxel: has joined #RubyOnRails
[01:18:35] rushed: acti0nman: this is a Rails channel :)
[01:18:38] unreal_: has joined #RubyOnRails
[01:18:39] railsn00b: has joined #RubyOnRails
[01:19:35] manfrin: has joined #RubyOnRails
[01:19:51] acti0nman: makes us realize that parsing data from the web is still difficult though
[01:20:37] bmurt: has joined #RubyOnRails
[01:20:49] railsn00b: has left #RubyOnRails: ()
[01:21:02] rushed: acti0nman: if you're interested in a Rails related solution you might take a look at the mechanize and nokogiri gems
[01:21:47] stardiviner: has joined #RubyOnRails
[01:21:50] rhizome: acti0nman: $('.bodyfield').find('h2').next('ul').find('li').size()
[01:22:39] acti0nman: I popped that into console and I got 875
[01:23:00] rhizome: sound about right?
[01:23:02] Maletor: has joined #RubyOnRails
[01:23:08] ijiijijjjijiij: Sounds about right
[01:23:09] acti0nman: that's a reasonable estimate!
[01:24:59] sevenseacat: another problem solved by just doing it for them!
[01:25:29] rhizome: you could add the ids of the h2s if you wanted a tighter number
[01:26:29] jessemcgilallen: has joined #RubyOnRails
[01:29:34] bruce_lee2: has joined #RubyOnRails
[01:30:01] darrencauthon: has joined #RubyOnRails
[01:30:27] acti0nman: I don't feel there's anything wrong with someone doing the problem for me, personally. I got a solution to a problem that would have taken me a while to figure out. The solution was quick to solve and I got some exposure to JavaScript that I was able to pop into console right away.
[01:31:49] rhizome: it's cool, man
[01:31:58] sevenseacat: I do, because the next time you have a problem, you'll just come back and do it again
[01:32:16] sevenseacat: (and by 'you' I don't mean you specifically, but the people we just hand answers to)
[01:32:30] riotjones: has joined #RubyOnRails
[01:34:26] doodlehaus: has joined #RubyOnRails
[01:35:39] bonhoeffer: has joined #RubyOnRails
[01:36:30] acti0nman: Contextual repetition
[01:40:03] moeabdol: has joined #RubyOnRails
[01:44:53] doodlehaus: has joined #RubyOnRails
[01:45:42] Joufflu: has joined #RubyOnRails
[01:47:12] jkamenik: has joined #RubyOnRails
[01:48:40] workmad3: has joined #RubyOnRails
[01:48:59] Lightsword: has joined #RubyOnRails
[01:50:05] iamjarvo_: has joined #RubyOnRails
[01:50:13] acti0nman: How would I count the number of companies on this page? http://www.usbanklocations.com/massachusetts-bank-list.htm
[01:50:37] acti0nman: $('.resultsListBig').
[01:50:47] lukekhamilton: has joined #RubyOnRails
[01:51:07] sevenseacat: ACTION coughs
[01:52:53] acti0nman: $('.resultsListBig').size() well that doesn't work
[01:53:04] wcalderipe: has joined #RubyOnRails
[01:53:30] Prkl8r: has left #RubyOnRails: ()
[01:54:17] octophore2: has joined #RubyOnRails
[01:54:40] dmarr: acti0nman: document.querySelectorAll('.resultsListBig a').length
[01:54:46] acti0nman: yeah i don't understand how I would use find and next appropriately in this context
[01:55:14] rhizome: acti0nman: next gets the following element at the same level
[01:55:22] ijiijijjjijiij: It sounds like page scraping is a problem you'll be regularly facing. Might be worthwhile to learn how queries work in depth
[01:55:22] rhizome: find searches children
[01:55:33] rhizome: and yeah, #jquery
[01:55:50] rhizome: they recommend http://learn.jquery.com
[01:56:03] acti0nman: how would you do dmarr's solution in jquery?
[01:56:20] rushed: acti0nman: this is not a good place for that question
[01:56:45] rushed: acti0nman: and that question isn't a good way for you to get better :P
[01:57:04] moeabdol: has joined #RubyOnRails
[01:57:08] dmarr: acti0nman: don't use jQuery
[01:57:27] oliver3: has joined #RubyOnRails
[01:58:13] krz: has joined #RubyOnRails
[01:58:23] acti0nman: i'm really just curious to compare the code for my own exposure purposes
[01:59:03] acti0nman: the solution 173 is what I really wanted for my research project
[02:00:03] acti0nman: but this was interesting, thank you for showing me the flexibility of console as well as specific code to count elements
[02:00:59] bobbobbins: has joined #RubyOnRails
[02:01:19] IFrank00: has joined #RubyOnRails
[02:02:46] bruno-: has joined #RubyOnRails
[02:03:11] dmarr: acti0nman: the $ in the console for that mass site isn't actually jQuery
[02:03:55] acti0nman: $('.resultsListBig').size() <--but that is
[02:04:45] acti0nman: done, thanks!
[02:05:14] kalusn: has joined #RubyOnRails
[02:06:44] arthurnn: sup Rails friends.. long time no see.
[02:07:17] matthewd: arthurnn: Fancy seeing you here! ;)
[02:08:48] bmurt: has joined #RubyOnRails
[02:09:25] erich: has joined #RubyOnRails
[02:09:34] arthurnn: =) will try to spend some time again on IRC, I removed all my channels and will be here and #ruby and #emacs only now =) , lets see if I can handle it
[02:10:09] seank_: has joined #RubyOnRails
[02:11:45] baweaver: has joined #RubyOnRails
[02:12:11] unreal: has joined #RubyOnRails
[02:13:31] EasyCo: has joined #RubyOnRails
[02:18:34] Flyy7: has joined #RubyOnRails
[02:20:12] Gaspar: has joined #RubyOnRails
[02:20:47] acti0nman: Could I have just one more? :D.
[02:23:32] stardiviner: has joined #RubyOnRails
[02:25:03] acti0nman: document.querySelectorAll('.results.container a').length <--this is handy. I was able to count the number of companies on crunchbase.com/search
[02:25:55] rhizome: http://data.crunchbase.com/docs/using-the-api--the-basics
[02:28:36] l_tonz: has joined #RubyOnRails
[02:29:16] bruce_lee2: has left #RubyOnRails: ()
[02:29:25] bruce_lee: has joined #RubyOnRails
[02:31:09] sunya7a: has joined #RubyOnRails
[02:32:51] rushed: has joined #RubyOnRails
[02:33:20] riotjones: has joined #RubyOnRails
[02:33:57] pabvid: has joined #RubyOnRails
[02:34:25] quazimodo: has joined #RubyOnRails
[02:35:33] iamdevnul: so i know this isn't a rails question per se, but I am curious if any of you use virtual machines in your workflows and if so, how you make use of them (code checked out in VM vs shared from host, etc)
[02:36:55] htmldrum: has joined #RubyOnRails
[02:37:37] SteenJobs: has joined #RubyOnRails
[02:38:54] darrencauthon: has joined #RubyOnRails
[02:40:04] arup_r: has joined #RubyOnRails
[02:41:33] herbst: has joined #RubyOnRails
[02:41:33] herbst: has joined #RubyOnRails
[02:45:59] Cervajz: has joined #RubyOnRails
[02:47:52] rushed: has joined #RubyOnRails
[02:48:19] rafaelfranca: arthurnn: #rails-contrib
[02:49:05] arup_r: is that a dev channel ?
[02:49:22] madebymarkca: has joined #RubyOnRails
[02:49:22] workmad3: has joined #RubyOnRails
[02:49:49] rafaelfranca: arup_r: most of the discussion of the Rails core are in the private campfire but I'm always there to help who want to contribute
[02:50:29] arup_r: ok. I know who you are.. :) humm makes sense
[02:50:44] smathy: iamdevnul, not in dev, no.
[02:50:54] rafaelfranca: iamdevnul: I use to code checked in the VM, but I use vim
[02:51:49] sevenseacat: has joined #RubyOnRails
[02:52:00] iamdevnul: thanks for the responses guys
[02:52:04] annlewis: has joined #RubyOnRails
[02:52:13] PhantomS_: has joined #RubyOnRails
[02:52:36] iamdevnul: i'm trying to put together a VM for development use at my company (we all install our stack to our macbooks atm) using vagrant
[02:53:26] iamdevnul: also trying to put together a VM instance our translator can use to see her translations live with so just trying to gather some best practice info
[02:53:52] Radar: TIL rafaelfranca comes here.
[02:54:13] hephaestus_rg: has joined #RubyOnRails
[02:54:25] rafaelfranca: Radar: I'm always at #rails-contrib, this is my first time ever in this channel though
[02:55:04] willardg: has joined #RubyOnRails
[02:55:15] yfeldblum: has joined #RubyOnRails
[02:57:19] arup_r: rafaelfranca: you are -> https://github.com/rafaelfranca ?
[02:57:33] rafaelfranca: arup_r: exactly! :D
[02:57:48] arup_r: hum.. just wanted make sure myself. :d
[03:01:12] safety_cut: has joined #RubyOnRails
[03:03:33] baweaver: rafaelfranca: might take you up on that for some docs later on when I get a few spare moments.
[03:06:18] safety_cut: has joined #RubyOnRails
[03:11:16] braincrash: has joined #RubyOnRails
[03:11:21] zpe: has joined #RubyOnRails
[03:11:30] gambl0re: has joined #RubyOnRails
[03:13:04] l_tonz: has joined #RubyOnRails
[03:13:30] l_tonz: has joined #RubyOnRails
[03:15:06] pydave6367: has joined #RubyOnRails
[03:15:56] smathy: iamdevnul, we've had that as a background task with vagrant or docker or something too. I find it hard to get motivated for just dev though.
[03:18:04] Gaspar: has left #RubyOnRails: ()
[03:18:25] Scient: apparently its very fucking difficult to use omniauth with separate providers and config for your "public" side and admin side of the app
[03:20:33] michaeldeol: has joined #RubyOnRails
[03:24:27] stannard: has joined #RubyOnRails
[03:24:32] Radar: Somewhere between character 1,500 and 1,750 of this Markdown there is an error which means that the Markdown renderer returns not the content, but rather a blank string.
[03:24:57] rhizome: sounds a little sticky
[03:25:33] Gaspar_: has joined #RubyOnRails
[03:26:03] jameswork: has joined #RubyOnRails
[03:27:21] willardg: has joined #RubyOnRails
[03:27:30] sankaber: has joined #RubyOnRails
[03:29:56] ror15: has joined #RubyOnRails
[03:30:36] safety_cut: has joined #RubyOnRails
[03:31:00] zpe: has joined #RubyOnRails
[03:31:03] Thomas-0725: has joined #RubyOnRails
[03:32:27] arup_r: ACTION opens the door for Gaspar_ . "Welcome!"
[03:34:09] riotjones: has joined #RubyOnRails
[03:34:28] Scripore: has joined #RubyOnRails
[03:36:04] rgtk: has joined #RubyOnRails
[03:39:02] zpe: has joined #RubyOnRails
[03:39:30] rushed: has joined #RubyOnRails
[03:41:42] codesoda: has joined #RubyOnRails
[03:44:28] Maletor: has joined #RubyOnRails
[03:48:44] thejamespinto: has joined #RubyOnRails
[03:49:00] thejamespinto: hey guys, how do I get all versions of ruby I can install on rvm?
[03:50:05] workmad3: has joined #RubyOnRails
[03:50:47] nanuko: has joined #RubyOnRails
[03:51:17] rushed: has joined #RubyOnRails
[03:52:47] IFrank00: has joined #RubyOnRails
[03:52:58] l_tonz: has joined #RubyOnRails
[03:53:11] annlewis: has joined #RubyOnRails
[03:53:36] tweeeaks: thejamespinto: rvm list known
[03:53:47] tweeeaks: may be what you want
[03:54:06] thejamespinto: yay! just what I wanted
[03:54:26] RockLee: has joined #RubyOnRails
[03:54:30] hahuang65: has joined #RubyOnRails
[03:54:42] thejamespinto: I'm building a rails gem and I wanted to test it with a bunch of different rubies
[03:54:47] hahuang65: has joined #RubyOnRails
[03:54:55] thejamespinto: because there is some pretty controversial code inside it
[03:55:38] thejamespinto: but I've only used 2.0-2.2 so far, and 2.3 does not work with rails yet
[03:55:42] havenwood: thejamespinto: "Wait, wait. I worry what you just heard was give me a lot of bacon and eggs. What I said was: Give me all the bacon and eggs you have."
[03:56:12] codesoda: Hi all, has one actually gotten "rails panel" in chrome to work?
[03:56:17] rhizome: controversial code?
[03:56:45] thejamespinto: I was thinking of adding rbx and jruby, any other implementations are coming up hot and I haven't heard about?
[03:57:16] thejamespinto: havenwood: yes, I could have summed it up in a single line, sorry
[03:57:50] havenwood: thejamespinto: No worries. I was just boggling at all-the-rubies since there are more than a hundred versions of just CRuby. I should have figured not *all*.
[03:58:01] thejamespinto: oh wait, this is RoR, I thought this was RVM :)
[03:58:53] sarink: has joined #RubyOnRails
[04:00:12] havenwood: codesoda: Chrome has a Rails panel? :O
[04:00:50] arup_r: havenwood: yes, it has.
[04:00:54] codesoda: havenwood: have you not seen https://github.com/dejan/rails_panel?
[04:01:10] havenwood: codesoda: Nope, thanks for the link.
[04:01:51] codesoda: havenwood: I've followed the instructions, but still deosn't seem to work, kinda hard to diagnose as well
[04:02:32] mrbubbles_: has joined #RubyOnRails
[04:03:52] safety_cut: has joined #RubyOnRails
[04:04:25] smathy: Having the output in `rails s` seems much simpler.
[04:04:28] bruno-: has joined #RubyOnRails
[04:05:00] rhizome: i got it to work a year or two ago. i forget what happened. entropy i guess
[04:05:43] antn: has joined #RubyOnRails
[04:05:49] smathy: No one used it - probably.
[04:06:54] nYmo: has joined #RubyOnRails
[04:07:16] havenwood: codesoda: neat (does actually work for me)
[04:09:35] havenwood: noodle: does the tab show with the other tabs in the developer tools pane?
[04:09:44] Maletor: has joined #RubyOnRails
[04:09:51] VeryBewitching: It seems to work fine, though I use RubyMine and it's not really necessary to use rails panel.
[04:09:54] havenwood: noodle: sorry, misstell
[04:14:34] benlieb: has joined #RubyOnRails
[04:14:42] snick007: has joined #RubyOnRails
[04:16:05] mojo-jojo: has joined #RubyOnRails
[04:17:14] jun__: has joined #RubyOnRails
[04:17:25] WizJin: has joined #RubyOnRails
[04:17:44] Peteykun: has joined #RubyOnRails
[04:19:45] safety_cut: has joined #RubyOnRails
[04:20:55] stardiviner: has joined #RubyOnRails
[04:26:37] rromanch_: has joined #RubyOnRails
[04:27:33] WizJin: has joined #RubyOnRails
[04:28:05] simplyianm: has joined #RubyOnRails
[04:31:01] moeabdol: has joined #RubyOnRails
[04:31:26] yfeldblum: has joined #RubyOnRails
[04:36:13] Marquel: has joined #RubyOnRails
[04:38:10] gaboesquivel: has joined #RubyOnRails
[04:39:26] moeabdol: has joined #RubyOnRails
[04:44:16] rushed: has joined #RubyOnRails
[04:44:22] djbkd: has joined #RubyOnRails
[04:46:43] rushed: has joined #RubyOnRails
[04:47:34] simplyianm: has joined #RubyOnRails
[04:48:37] simplyianm: has joined #RubyOnRails
[04:50:52] workmad3: has joined #RubyOnRails
[04:53:07] pydave6367: has joined #RubyOnRails
[04:53:57] annlewis: has joined #RubyOnRails
[04:54:25] rushed: has joined #RubyOnRails
[04:54:57] sevenseacat: has joined #RubyOnRails
[04:57:15] EminenceHC: has joined #RubyOnRails
[04:57:38] rushed: has joined #RubyOnRails
[04:58:06] sivsushruth: has joined #RubyOnRails
[04:58:07] pawnbox: has joined #RubyOnRails
[05:00:10] ror15: has joined #RubyOnRails
[05:03:04] simplyianm: has joined #RubyOnRails
[05:05:17] bruno-: has joined #RubyOnRails
[05:07:38] rromanch_: has joined #RubyOnRails
[05:07:54] andersoldahl: has joined #RubyOnRails
[05:10:09] lukekhamilton: has joined #RubyOnRails
[05:10:20] bePolite: has joined #RubyOnRails
[05:11:03] pawnbox: has joined #RubyOnRails
[05:11:08] chrissonar: has joined #RubyOnRails
[05:12:17] chrissonar: has joined #RubyOnRails
[05:14:05] rushed: has joined #RubyOnRails
[05:14:35] rushed: has joined #RubyOnRails
[05:16:45] gaboesquivel: has joined #RubyOnRails
[05:18:00] dhjondoh: has joined #RubyOnRails
[05:19:20] Oog: has joined #RubyOnRails
[05:19:31] Oog: just want to confirm - rails has no request timeout right?
[05:19:50] Radar: Oog: Heroku has one of 30 seconds.
[05:20:02] sevenseacat: i have no idea how to add a custom endpoint to a controller from https://github.com/cerebris/jsonapi-resources
[05:20:03] Radar: and your webserver which runs Rails MIGHT have one.
[05:20:07] Oog: yeah i know about that one. I"m using AWS Beanstalk with Puma though
[05:20:19] Oog: doesnt look like Puma has one.
[05:20:36] chipotle: has joined #RubyOnRails
[05:21:00] jun__: has joined #RubyOnRails
[05:21:19] sevenseacat: there's literally nothing about customizing controllers :/
[05:22:06] bePolite: has joined #RubyOnRails
[05:22:10] Radar: sevenseacat: this kind of thing is why I rolled my own
[05:22:21] EminenceHC: has joined #RubyOnRails
[05:22:27] techsethi: has joined #RubyOnRails
[05:22:32] sevenseacat: oh ffs never mind my stupid vagrant box was caching shit again
[05:23:02] sevenseacat: ACTION continues swearing colourfully and scaring small children
[05:23:42] htmldrum: has joined #RubyOnRails
[05:23:53] simplyianm: has joined #RubyOnRails
[05:24:02] jun__: has joined #RubyOnRails
[05:24:03] DoubleMalt: has joined #RubyOnRails
[05:24:12] riotjones: has joined #RubyOnRails
[05:24:33] mojo-jojo: has joined #RubyOnRails
[05:24:40] sevenseacat: *insert 'overengineer ALL OF THE THINGS' meme
[05:25:08] riotjones: has joined #RubyOnRails
[05:27:32] zpe_: has joined #RubyOnRails
[05:29:28] iateadonut: has joined #RubyOnRails
[05:29:36] Guest250: has joined #RubyOnRails
[05:33:18] tagrudev: has joined #RubyOnRails
[05:36:20] krz: has joined #RubyOnRails
[05:37:16] user1138: has joined #RubyOnRails
[05:42:50] sanjayu: has joined #RubyOnRails
[05:44:31] User458764: has joined #RubyOnRails
[05:45:18] quazimodo: has joined #RubyOnRails
[05:48:07] MartinElvar: has joined #RubyOnRails
[05:49:13] lxsameer: has joined #RubyOnRails
[05:49:13] lxsameer: has joined #RubyOnRails
[05:51:15] guardianL: has joined #RubyOnRails
[05:51:41] workmad3: has joined #RubyOnRails
[05:51:45] guardianL: has left #RubyOnRails: ()
[05:53:38] helpa: has joined #RubyOnRails
[05:54:41] annlewis: has joined #RubyOnRails
[05:56:04] l_tonz: has joined #RubyOnRails
[05:56:11] bmalum: has joined #RubyOnRails
[05:57:34] stardiviner: has joined #RubyOnRails
[05:59:38] sevenseacat: ACTION tries to figure out how exactly jsonapi-resources creates responses with all of the right pagination links and the like
[06:00:25] sevenseacat: I have a feeling I'm going to regret this.
[06:00:36] inoter: has joined #RubyOnRails
[06:02:31] dionysus69: has joined #RubyOnRails
[06:03:39] riotjones: has joined #RubyOnRails
[06:04:55] pawnbox: has joined #RubyOnRails
[06:06:37] yogeshrt: has joined #RubyOnRails
[06:06:56] Guest250: has left #RubyOnRails: ()
[06:09:33] Denarii: has joined #RubyOnRails
[06:12:07] ruurd: has joined #RubyOnRails
[06:13:19] royte: has joined #RubyOnRails
[06:16:40] duderonomy: has joined #RubyOnRails
[06:17:08] Spami: has joined #RubyOnRails
[06:18:38] jsrn_: has joined #RubyOnRails
[06:20:52] yardenbar: has joined #RubyOnRails
[06:24:29] ruurd: has joined #RubyOnRails
[06:25:37] herbst: has joined #RubyOnRails
[06:25:46] pawnbox: has joined #RubyOnRails
[06:27:38] Shoutsid: has joined #RubyOnRails
[06:28:01] herbst: has joined #RubyOnRails
[06:28:28] zpe: has joined #RubyOnRails
[06:29:26] sininen: has joined #RubyOnRails
[06:33:40] honzahov1: has joined #RubyOnRails
[06:35:04] Radar: has joined #RubyOnRails
[06:35:04] pabvid: has joined #RubyOnRails
[06:35:21] tetraktys: has joined #RubyOnRails
[06:36:00] Endzo: has joined #RubyOnRails
[06:38:25] beardy_frost: has joined #RubyOnRails
[06:39:22] eGGsha: has joined #RubyOnRails
[06:39:25] Thomas-0725: has joined #RubyOnRails
[06:41:49] EminenceHC: has joined #RubyOnRails
[06:42:06] shmoon_: has joined #RubyOnRails
[06:42:22] freezevee: has joined #RubyOnRails
[06:43:22] beardy_frost: Is there any way to merge two completely separate activerecord queries into a single object that can be consumed a view?
[06:44:06] sevenseacat: not easily, if at all.
[06:45:44] benlieb: has joined #RubyOnRails
[06:46:51] beardy_frost: That's what I suspected... Basically, one model has been feeding a list of items, and the built-in pagination methods are being used for lazy loading.. Client wants to add another model to the list of items rendered, in the same creation order and with the pagination
[06:47:21] freezevee: how could you debug/trace the issue where there's a "Method Not Allowed" returned when posting a form ?
[06:47:38] jas02: has joined #RubyOnRails
[06:47:47] beardy_frost: Without doing tons of extra manual stuff, I was hoping there was some way to combine the queries so that it could still use the built in pagination methods
[06:48:03] sevenseacat: there are no built-in pagination methods
[06:48:40] MaDErroR123: has joined #RubyOnRails
[06:48:46] arBmind: has joined #RubyOnRails
[06:50:52] Guest250: has joined #RubyOnRails
[06:51:21] sevenseacat: ACTION tears hair out at jsonapi-resources
[06:51:38] beardy_frost: well shit. guess i need to figure out where the hell that code is
[06:52:00] sevenseacat: fuck it. no pagination for these search results.
[06:52:14] Ropeney: sounds like giving up
[06:52:25] workmad3: has joined #RubyOnRails
[06:52:35] sevenseacat: this gem sucks.
[06:53:42] Ropeney: api-pagination?
[06:54:03] cheeti: has joined #RubyOnRails
[06:54:11] sevenseacat: jsonapi-resources
[06:55:22] cheeti: hi any body can suggest best ROR certification through online, please help me to find it.
[06:55:24] Ropeney: yeah you said that :P my bad
[06:55:27] annlewis: has joined #RubyOnRails
[06:55:33] sevenseacat: cheeti: there isnt one.
[06:55:34] Macaveli: has joined #RubyOnRails
[06:55:38] Ropeney: cheeti: github a project
[06:55:58] rushed: cheeti: best would be to save your money and work on having a good github profile
[06:56:31] solars: has joined #RubyOnRails
[06:57:53] cheeti: sevenseacat you can suggest a best one
[06:58:03] sevenseacat: cheeti: there isnt one.
[06:58:50] cheeti: Ropeney can you suggest any site for a certification
[06:59:12] rushed: cheeti: which are you trying to select between? :P
[06:59:14] cheeti: rushed can you suggest any site for a certification
[06:59:36] rushed: cheeti: can you?
[06:59:40] cheeti: sevenseacat tell me any one
[06:59:45] sevenseacat: cheeti: step 1 - pay attention to what people tell you.
[06:59:46] sevenseacat: cheeti: there isnt one.
[07:00:41] baweaver: ACTION grabs popcorn
[07:00:55] cheeti: any one suggest best certification for ror
[07:01:04] baweaver: cheeti: you have an answer
[07:01:08] baweaver: leave it at that
[07:01:54] cheeti: baweaver i am not find answer suggest any site for ror certification
[07:02:09] rushed: cheeti: why do you think that is?
[07:02:15] baweaver: there are no RoR certifications
[07:02:29] sevenseacat: maybe cheeti will listen to all of you
[07:02:32] baweaver: proceeding to ask every person in the channel who mentions anything will not help you.
[07:02:43] cheeti: baweaver ruby certifications?
[07:02:45] ChanServ: +o baweaver
[07:03:12] baweaver: you don't need certifications
[07:03:14] rushed: cheeti: what goal are you trying to achieve by getting a certification?
[07:03:40] ruurd: has joined #RubyOnRails
[07:04:01] cheeti: rushed why you want all those things if you no tell me other wise calm
[07:04:02] Ropeney: baweaver: Have you had sweet and salty popcorn?
[07:04:21] artto: has joined #RubyOnRails
[07:04:27] baweaver: Ropeney: hm?
[07:04:29] atmosx: has joined #RubyOnRails
[07:04:35] beardy_frost: Ropeney: I prefer "Chicago style" aka caramel corn & butter
[07:04:36] Ropeney: best popcorn imo
[07:04:53] Linuus: has joined #RubyOnRails
[07:05:06] rushed: cheeti: I think you question was lost in translation
[07:05:39] cheeti: hi, any one can suggest best online ruby certification link
[07:06:13] MartinElvar: has joined #RubyOnRails
[07:06:18] ChanServ: +o sevenseacat
[07:06:20] cheeti: rushed i want certification for better resume
[07:06:28] yogeshrt: has joined #RubyOnRails
[07:06:33] baweaver: certifications will do you no good in Ruby or Rails
[07:06:38] beardy_frost: cheeti: Here ya go, only $474 -- a steal! https://www.coursera.org/specializations/ruby-on-rails
[07:06:42] baweaver: source: I hire Ruby and Rails developers
[07:07:18] bruno-: has joined #RubyOnRails
[07:07:36] roshanavand: has joined #RubyOnRails
[07:08:03] ChanServ: -o sevenseacat
[07:08:21] senny: has joined #RubyOnRails
[07:08:43] hephaestus_rg: has joined #RubyOnRails
[07:08:51] Kovensky: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[07:10:15] senny: has joined #RubyOnRails
[07:10:39] kwd: has joined #RubyOnRails
[07:12:32] Radar: baweaver: Mjolnir is out?
[07:12:45] senny: has joined #RubyOnRails
[07:12:54] baweaver: certain repeated questions without listening
[07:13:12] ChanServ: -o baweaver
[07:13:23] Radar: not bannable, unfortunately
[07:13:25] Radar: just par for the course
[07:13:52] baweaver: yeah, so is life.
[07:14:09] comrad: has joined #RubyOnRails
[07:14:41] beardy_frost: Just gotta give 'em what they are asking for, even if it's wrong... hasn't posted again since I sent the link
[07:16:31] Radar: cheeti: Send 500 USD to radarlistener@gmail.com and you can be certified by a Rails Expert, (me)
[07:16:47] kalusn: has joined #RubyOnRails
[07:17:17] Radar: cheeti: not kidding
[07:17:29] cheeti: Radar ya i am ending wait
[07:18:29] beardy_frost: cheeti: I will certify you (and mail you an authentic, embossed certificate) for only $499
[07:18:34] cheeti: Radar are you got it
[07:19:01] cheeti: beardy_frost very cheap
[07:19:12] Radar: cheeti: nope not yet
[07:19:15] Radar: try sending again
[07:19:58] cheeti: Radar ho i sended return my first sended $500 after that i will send again
[07:20:33] rushed: cheeti: ha my returned sended second will not again yogurt
[07:21:08] Radar: cheeti: still not getting it. Sorry.
[07:21:16] Radar: I guess I will have to certify other people who are more deserving.
[07:21:20] sininen: has joined #RubyOnRails
[07:21:48] cheeti: Radar then try to find fools to believe on you
[07:22:12] cheeti: Radar fools only deserve u
[07:22:19] Radar: baweaver: launch
[07:22:25] Radar: all yours :)
[07:22:32] beardy_frost: Radar: I'd like to invite you to my exclusive certifiers certification course. For only $1499 I will certify you as an officially certified ror certifier
[07:22:43] Radar: beardy_frost: I will sign up ASAP
[07:23:08] DHH: has joined #RubyOnRails
[07:23:14] tetraktys: has joined #RubyOnRails
[07:23:29] yogeshrt: has joined #RubyOnRails
[07:23:49] nfk|laptop: has joined #RubyOnRails
[07:23:58] Shoutsid: has joined #RubyOnRails
[07:24:24] baweaver: Radar: sent
[07:24:28] mark3: has joined #RubyOnRails
[07:24:57] bmalum: has joined #RubyOnRails
[07:25:07] baweaver: You do know Radar literally helped to write one of the books on Rails right?
[07:25:35] rushed: baweaver: you do know reality isn't a part of this conversation
[07:25:43] baweaver: ...was that dhh?
[07:25:43] redmaverick: has joined #RubyOnRails
[07:26:04] adac: has joined #RubyOnRails
[07:26:24] baweaver: most conversations aren't
[07:26:51] ruurd: has joined #RubyOnRails
[07:27:03] wpp: has joined #RubyOnRails
[07:27:32] beardy_frost: baweaver: Maybe Radar did, but I'm willing to bet he's not official certified as an official certification certifier. And with that type of prestige attending my course, the price just went up to $2499
[07:28:53] voker57: has joined #RubyOnRails
[07:32:06] chipotle: has joined #RubyOnRails
[07:33:05] yogeshrt: has joined #RubyOnRails
[07:33:13] rgtk_: has joined #RubyOnRails
[07:36:36] honzahovorka: has joined #RubyOnRails
[07:37:06] roshanavand: has joined #RubyOnRails
[07:37:27] rhizome: mmm yogurt
[07:37:31] zorbash: has joined #RubyOnRails
[07:38:33] pawnbox: has joined #RubyOnRails
[07:38:47] sevenseacat: has joined #RubyOnRails
[07:39:11] yogeshrt: has joined #RubyOnRails
[07:39:12] Oog: has joined #RubyOnRails
[07:39:58] Oog: why http://apidock.com/rails/ActiveRecord/Associations/ClassMethods/belongs_to doesnt list :index as an option but it seems to work...
[07:40:04] Oog: what am i missing
[07:41:34] redmaverick: has left #RubyOnRails: ()
[07:41:37] deception1: has joined #RubyOnRails
[07:41:54] rushed: Oog: are you confusing models & migrations?
[07:42:18] Oog: where can i find the belongs_to migration documentation
[07:42:19] rushed: deception1: !
[07:42:42] deception1: sry by mistake
[07:47:26] MaDErroR123: has joined #RubyOnRails
[07:48:08] yogeshrt: has joined #RubyOnRails
[07:49:05] roshanavand: has joined #RubyOnRails
[07:49:56] Macaveli: has joined #RubyOnRails
[07:50:24] Pupeno: has joined #RubyOnRails
[07:50:32] KnownSyntax_: has joined #RubyOnRails
[07:50:47] Macaveli: has joined #RubyOnRails
[07:51:05] rgtk: has joined #RubyOnRails
[07:51:41] senny: Oog http://edgeapi.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_reference
[07:52:22] Scripore: has joined #RubyOnRails
[07:52:30] Oog: thanks. i want to add a unique index on user_id, status=1 - i only want there to be 1 row for eacher with status 1. is there a way to do that with add_index ?
[07:52:44] Oog: something like add_index :member_subscriptions, [:user_id, :status => 1], :unique => true
[07:53:00] krz: has joined #RubyOnRails
[07:53:13] workmad3: has joined #RubyOnRails
[07:53:46] rushed: Oog: don't use the helper to add the index, add it explicitly after the table create?
[07:53:56] Oog: i might hve to
[07:54:11] rushed: Oog: they're just helpers, at the point where they are no longer "helping" move on :)
[07:54:44] Pupeno: has joined #RubyOnRails
[07:55:05] senny: Oog using a partial index (if your database supports that) => http://edgeapi.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_index
[07:55:20] senny: add_index(:accounts, [:branch_id, :party_id], unique: true, where: "active")
[07:55:25] Oog: senny nice!
[07:55:27] Oog: thta is it thanks
[07:55:39] Oog: i use postgres was just about to do a CREATE UNIQUE INDEX tbl_some_name_idx ON tbl (subset) WHERE type = 'true';
[07:55:57] senny: yes, that's it then.
[07:56:13] annlewis: has joined #RubyOnRails
[07:56:20] l_tonz: has joined #RubyOnRails
[07:56:58] yogeshrt: has joined #RubyOnRails
[07:57:22] ijiijijjjijiij: has joined #RubyOnRails
[08:00:06] yfeldblum: has joined #RubyOnRails
[08:00:46] bmalum: has joined #RubyOnRails
[08:01:01] yfeldblum: has joined #RubyOnRails
[08:01:09] Cervajz: has joined #RubyOnRails
[08:02:00] Scripore: has joined #RubyOnRails
[08:03:46] Ropeney_: has joined #RubyOnRails
[08:03:51] yogeshrt: has joined #RubyOnRails
[08:04:16] kitsuneyo: has joined #RubyOnRails
[08:05:12] jsrn_: has joined #RubyOnRails
[08:05:29] srinidhi: has joined #RubyOnRails
[08:05:47] mytrile: has joined #RubyOnRails
[08:06:19] mytrile: Hey guys, I'm using Resque as ActiveJob adapter, but cannot figure out how to configure retry on job failure
[08:06:42] richb__: has joined #RubyOnRails
[08:08:03] bruno-: has joined #RubyOnRails
[08:08:44] JohnBat26: has joined #RubyOnRails
[08:09:03] WizJin: has joined #RubyOnRails
[08:09:07] bmalum_: has joined #RubyOnRails
[08:09:17] KnownSyntax: has joined #RubyOnRails
[08:09:20] SteenJobs: has joined #RubyOnRails
[08:09:24] JohnBat26: has joined #RubyOnRails
[08:09:58] cheeti: hi, any one suggest best online ruby certificationcourse
[08:10:12] rushed: cheeti: WELCOME BACK!
[08:10:13] sevenseacat: cheeti: stop it.
[08:10:19] KnownSyntax: has joined #RubyOnRails
[08:10:45] dhjondoh: has joined #RubyOnRails
[08:10:50] mikecmpbll: has joined #RubyOnRails
[08:11:29] JohnBat26: has joined #RubyOnRails
[08:11:37] cheeti: sevenseacat why this is a stupid question
[08:11:48] sevenseacat: because we've answered it a dozen times already.
[08:11:57] sevenseacat: there isn't one.
[08:12:31] rorF: has joined #RubyOnRails
[08:12:57] darutoko: has joined #RubyOnRails
[08:13:05] cheeti: sevenseacat there is no one site that is providing certification?
[08:13:07] norc: has joined #RubyOnRails
[08:13:16] sevenseacat: not any certifications that mean anything.
[08:13:38] norc: Hi. Is there a builtin rspec matcher that allows me to expect an array of ModelName that someone here can think of?
[08:13:51] workmad3: has joined #RubyOnRails
[08:13:54] Macaveli: has joined #RubyOnRails
[08:14:04] rushed: norc: what are you trying to check for?
[08:14:09] rorF: hi guys !
[08:14:21] krisquigley: has joined #RubyOnRails
[08:14:25] sevenseacat: rorF: we're not all guys here.
[08:14:34] franzip: has joined #RubyOnRails
[08:14:35] htmldrum: has joined #RubyOnRails
[08:14:47] norc: rushed: expect(assigns(:foo)).to be_array_of(MyModel) -- something along these lines. I will just write my own matcher if there is nothing built in already that can do this sensibly
[08:15:06] rorF: I have an issue with multiple indentation (an if in another one in a %li in a loop ), my plain text doesn't appear only blank
[08:15:22] bobbobbins: has joined #RubyOnRails
[08:15:50] DEA7TH: has joined #RubyOnRails
[08:15:52] rorF: @sevenseacat I'm so sorry lady ;)
[08:16:30] rushed: norc: generally you test for an outcome not a specific class type
[08:16:52] rushed: rorF: you might consider gisting what you're working with, the result, and what you're expecting
[08:17:11] norc: rushed: Actually this is the outcome Im hoping for. ;)
[08:17:15] Macaveli: has joined #RubyOnRails
[08:17:17] kalusn: has joined #RubyOnRails
[08:17:18] roshanavand: has joined #RubyOnRails
[08:17:57] norc: rushed: While you actually just gave me a good idea to move this into the model spec, I still want to do this.
[08:18:20] stannard: has joined #RubyOnRails
[08:19:30] Ergo: has joined #RubyOnRails
[08:20:52] leehambley: has joined #RubyOnRails
[08:21:00] rorF: rushed: It's actually a dropdown wich contains notifications, I'm looping on my notifications for displaying attributes. The multiple conditions make the plain text two levels deeper than the other %li of the %ul.. it doesn't seem that clear, is it ok ?
[08:22:04] rushed: rorF: gist = using https://gist.github.com to show us your code (as it mentions in the channel note)
[08:22:23] rorF: rushed: aaah ty
[08:22:38] norc: rorF: ah. all( be_an( ) ) :)
[08:22:45] norc: I meant rushed.
[08:23:13] ruurd: has joined #RubyOnRails
[08:23:20] pawnbox: has joined #RubyOnRails
[08:23:47] rorF: rushed: here we are https://gist.github.com/46eefec8a5022ee56b69.git
[08:24:37] marr: has joined #RubyOnRails
[08:25:03] neanderslob_: has joined #RubyOnRails
[08:25:07] rorF: rushed: here we are https://gist.github.com/faouzelfassi/46eefec8a5022ee56b69
[08:25:12] rorF: sorry :D
[08:25:30] KnownSyntax: has joined #RubyOnRails
[08:25:31] neanderslob: has joined #RubyOnRails
[08:25:49] rushed: rorF: and the output you're unhappy with?
[08:26:07] rorF: rushed: can I upload images via git ?
[08:26:30] rushed: rorF: you can add the html souce to the gist as another file
[08:26:49] rorF: rushed: ok ty ;)
[08:27:04] rushed: rorF: why is line 2 indented twice?
[08:27:45] zpe: has joined #RubyOnRails
[08:29:22] rorF: rushed: output https://gist.github.com/faouzelfassi/a63b03845cbc216aefd2
[08:30:37] rorF: rushed: it's copy and past.. the two loops where in a %ul so the loops are one level deeper
[08:31:01] Peg-leg: has joined #RubyOnRails
[08:31:49] rushed: rorF: what are you unhappy with in the output?
[08:31:56] Macaveli: has joined #RubyOnRails
[08:32:20] rorF: rushed: as you can see in the output we can only see the comment <!-- 2 jours apr??s --> which is one level before the rest above
[08:32:25] armyriad: has joined #RubyOnRails
[08:32:59] MaDErroR123: has joined #RubyOnRails
[08:33:00] roshanavand: has joined #RubyOnRails
[08:33:07] pawnbox: has joined #RubyOnRails
[08:33:39] Macaveli: has joined #RubyOnRails
[08:33:39] rushed: rorF: help me out, that is bad because... why?
[08:34:48] rorF: rushed: a clue please :D
[08:35:03] Macaveli: has joined #RubyOnRails
[08:35:06] rushed: rorF: I'm not being coy I don't understand what you want to be different
[08:35:33] atmosx_laptop: has joined #RubyOnRails
[08:35:35] rushed: rorF: also, do you even need comments in your output (as opposed to using "-#" to just leave a ruby comment in the source without impacting the output)
[08:36:35] Macaveli: has joined #RubyOnRails
[08:37:31] rorF: rushed: updated gists https://gist.github.com/faouzelfassi/a63b03845cbc216aefd2 and https://gist.github.com/faouzelfassi/46eefec8a5022ee56b69
[08:38:05] Macaveli: has joined #RubyOnRails
[08:38:30] roshanavand: has joined #RubyOnRails
[08:38:46] Macaveli: has joined #RubyOnRails
[08:38:59] rushed: rorF: so you think you're missing items that are under that if?
[08:39:02] bmalum_: has joined #RubyOnRails
[08:39:08] rushed: rorF: what have you done to verify that (c_notif.trigger_date.to_date - Date.today.to_date).to_i >= 4.abs is true?
[08:39:34] Macaveli: has joined #RubyOnRails
[08:40:39] rorF: rushed: it's sure, the link is displayed, and i tried it in the rails console
[08:41:02] rushed: rorF: show us :)
[08:41:05] Macaveli: has joined #RubyOnRails
[08:41:41] rorF: in the output file you can see the last link displayed
[08:41:46] pawnbox: has joined #RubyOnRails
[08:41:46] Macaveli: has joined #RubyOnRails
[08:42:05] youngbaks: has joined #RubyOnRails
[08:42:24] rushed: rorF: how does that tell you anything about if "(c_notif.trigger_date.to_date - Date.today.to_date).to_i >= 4.abs" is true?
[08:43:13] bmalum: has joined #RubyOnRails
[08:43:19] Macaveli: has joined #RubyOnRails
[08:43:22] rorF: because my trigger date verify the first condition
[08:43:25] rorF: 2.2.1 :051 > (Date.today.to_date - c.trigger_date.to_date).to_i >= 2.abs => true
[08:44:02] rorF: rushed: 2.2.1 :052 > (Date.today.to_date - c.trigger_date.to_date).to_i >= 4.abs => false
[08:44:03] Macaveli: has joined #RubyOnRails
[08:44:09] rushed: rorF: they're not the same clause
[08:44:14] rushed: rorF: the params are reversed
[08:44:25] rushed: rorF: one is not a superset of the other as currently written
[08:44:29] atmosx: has joined #RubyOnRails
[08:44:37] rushed: rorF: also, prove it with some logging instead of guessing :)
[08:44:55] rgtk: has joined #RubyOnRails
[08:45:17] atmosx: my mac crashes when I run 'rake' heh
[08:45:21] atmosx: ACTION reinstall rvm
[08:45:26] jgt: has joined #RubyOnRails
[08:45:26] rorF: rushed: I was copying the rails console ;)
[08:45:33] Macaveli: has joined #RubyOnRails
[08:46:10] rushed: rorF: put the logging in your view
[08:46:17] Macaveli: has joined #RubyOnRails
[08:46:27] rushed: rorF: and note that one is today - blah and the other is blah - today
[08:47:00] norc: has joined #RubyOnRails
[08:47:07] rorF: rushed: I know some notifications are triggered two days after a date, and others 4 days before
[08:47:23] ruurd: has joined #RubyOnRails
[08:47:24] rushed: rorF: great, problem solved then :)
[08:47:51] Macaveli: has joined #RubyOnRails
[08:47:58] rorF: rushed: I only had a view issue in fact
[08:49:12] rgtk: has joined #RubyOnRails
[08:49:20] Macaveli: has joined #RubyOnRails
[08:50:51] Macaveli: has joined #RubyOnRails
[08:52:18] Macaveli: has joined #RubyOnRails
[08:53:14] A124: has joined #RubyOnRails
[08:53:52] Macaveli: has joined #RubyOnRails
[08:54:10] rorF: rushed: ty a lot I just figured out the issue
[08:54:26] rorF: rushed: we were right the .abs are not in the correct place ;)
[08:54:35] Macaveli: has joined #RubyOnRails
[08:55:09] bmalum: has joined #RubyOnRails
[08:55:39] bmalum: has joined #RubyOnRails
[08:56:04] Macaveli: has joined #RubyOnRails
[08:56:58] annlewis: has joined #RubyOnRails
[08:57:33] Macaveli: has joined #RubyOnRails
[08:57:34] arBmind: has joined #RubyOnRails
[08:58:49] bmalum: has joined #RubyOnRails
[08:59:04] Macaveli: has joined #RubyOnRails
[09:00:38] Macaveli: has joined #RubyOnRails
[09:01:10] roshanav_: has joined #RubyOnRails
[09:01:17] ijiijijjjijiij: has joined #RubyOnRails
[09:01:21] Guest93301: has left #RubyOnRails: ()
[09:01:23] Macaveli: has joined #RubyOnRails
[09:01:49] norc: has joined #RubyOnRails
[09:02:07] Macaveli: has joined #RubyOnRails
[09:03:39] Macaveli: has joined #RubyOnRails
[09:03:44] norc: Is there an alternative way to do a transaction/rollback block than ActiveRecord::Transactions with ActiveRecord::Rollback? I just dislike using an Exception here to control the flow.
[09:04:19] Macaveli: has joined #RubyOnRails
[09:05:54] Macaveli: has joined #RubyOnRails
[09:06:06] ror15: has joined #RubyOnRails
[09:06:40] TvL2386: has joined #RubyOnRails
[09:07:22] Macaveli: has joined #RubyOnRails
[09:08:19] codesoda: has joined #RubyOnRails
[09:08:50] bruno-: has joined #RubyOnRails
[09:08:52] Macaveli: has joined #RubyOnRails
[09:09:14] workmad3: has joined #RubyOnRails
[09:09:52] bobbobbins: has joined #RubyOnRails
[09:10:23] Macaveli: has joined #RubyOnRails
[09:11:27] linus1: has joined #RubyOnRails
[09:11:54] Macaveli: has joined #RubyOnRails
[09:12:36] Macaveli: has joined #RubyOnRails
[09:13:22] Macaveli: has joined #RubyOnRails
[09:14:31] linus2: has joined #RubyOnRails
[09:14:52] Macaveli: has joined #RubyOnRails
[09:15:18] bonhoeffer: has joined #RubyOnRails
[09:16:22] Macaveli: has joined #RubyOnRails
[09:16:48] freezevee: how could you debug/trace the issue where there's a "Method Not Allowed" returned when posting a form ?
[09:17:23] waseem_: freezevee: Look at the logs?
[09:17:51] Macaveli: has joined #RubyOnRails
[09:18:09] freezevee: waseem_: If you mean the development one yes
[09:18:20] freezevee: I am using WEBrick so I see them live
[09:18:23] waseem_: freezevee: Yes.
[09:18:32] freezevee: it only says Started POST ... and then nothing
[09:19:07] freezevee: waseem_: I used also pry inside the code but it doesn't work inside #create
[09:19:24] Macaveli: has joined #RubyOnRails
[09:19:27] freezevee: waseem_: it seems that it doesn't go that far, after posting from #new somehow it fails
[09:19:44] freezevee: I am running out of ways to troubleshoot this
[09:20:12] freezevee: even the POST request in firebug seems fine
[09:20:29] borkdude: has joined #RubyOnRails
[09:20:37] rromanch_: has joined #RubyOnRails
[09:20:51] Macaveli: has joined #RubyOnRails
[09:21:00] waseem_: freezevee: Can you gist the relevant part of the log?
[09:21:16] WhereIsMySpoon_: has joined #RubyOnRails
[09:21:27] Cork: if i do parent.child = Child.new; parent.child.save (parent has a has_one :child)
[09:21:27] Cork: is that .save suppose to trigger a save on the parent?
[09:21:27] Cork: (i'm trying to debug a recursive loop bug i have in a model solution i have)
[09:21:30] freezevee: waseem_: it only says Started POST "/assets" for 192.168.33.1 at 2015-10-14 09:16:38 +0000 and then nothing, that's all
[09:22:27] waseem_: freezevee: This seems to be your issue: http://stackoverflow.com/questions/30484716/rails-4-method-not-allowed-after-upgrading-from-rails-3
[09:23:22] kitsuneyo: has joined #RubyOnRails
[09:26:10] linus3: has joined #RubyOnRails
[09:27:25] freezevee: waseem_: I am not sure, it's different kind of assets
[09:27:33] freezevee: checking out
[09:27:58] freezevee: I guess 405 could happen If you post on a GET only action
[09:28:13] freezevee: so method "GET" not allowed probably
[09:30:05] freezevee: sorry, "POST" not allowed
[09:30:20] waseem_: freezevee: Anything except GET is disallowed.
[09:30:43] freezevee: the relevant line in routes.rb is resources :assets
[09:31:05] waseem_: freezevee: You have the same issue. See the non-accepted answer how to fix it.
[09:31:14] freezevee: and form sends <%= form_for(@asset, url: assets_url, :html => {:class => "ui small form"}) do |f| %>
[09:32:58] waseem_: Cork: That should save the parent as well.
[09:33:06] sevenseacat: has joined #RubyOnRails
[09:33:21] freezevee: waseem_: I also believe it's the routes, but before changing this line in routes.rb I want to find out what has gone wrong
[09:33:31] Cork: waseem_: that explains my mysterious recursive problem (damn inherited code...)
[09:33:40] nettoweb: has joined #RubyOnRails
[09:33:42] Cork: waseem_: is there a way to prevent that?
[09:34:13] waseem_: Cork: Save the child first and then do parent.child = child; parent.save
[09:34:17] workmad3: freezevee: can you gist your routes.rb file?
[09:34:27] Cork: the code here have an before_create that does a create on a has_one relation
[09:34:57] Cork: waseem_: hmm so replace self.create_child with Child.create... that might work
[09:35:00] Cork: waseem_: thx for the idea
[09:35:06] waseem_: Cork: Yep.
[09:36:10] workmad3: freezevee: but yeah... avoid the name `asset` as what's most likely happening is your request gets routed to the Sprockets engine, which goes 'nope'
[09:36:20] waseem_: workmad3: o/
[09:36:29] workmad3: waseem_: good morning :)
[09:36:44] freezevee: workmad3: thanks for that
[09:36:50] freezevee: I didn't know it may happen
[09:37:14] freezevee: I've been working like this for some months, but updated to latest versions lately so I am not pretty sure what happened
[09:37:23] freezevee: "assets" could be reserved, that's true
[09:37:41] freezevee: waseem_: https://github.com/chrisvel/ticketbox/blob/master/config/routes.rb
[09:37:53] ruurd: has joined #RubyOnRails
[09:37:57] waseem_: workmad3: Good morning good sir. :)
[09:38:39] workmad3: waseem_: scandalous lies! I am neither good nor a sir!
[09:38:58] AzaToth: has joined #RubyOnRails
[09:39:29] njero: has joined #RubyOnRails
[09:39:45] shmoon_: has joined #RubyOnRails
[09:43:59] dici: has joined #RubyOnRails
[09:44:32] bmalum: has joined #RubyOnRails
[09:44:51] allcentury: has joined #RubyOnRails
[09:45:45] freezevee: waseem_: something like that ? https://gist.github.com/chrisvel/6c574e4d3f71756326ed
[09:45:48] zpe_: has joined #RubyOnRails
[09:45:57] waseem_: workmad3: ^
[09:46:17] tvw: has joined #RubyOnRails
[09:46:29] kitsuneyo: has joined #RubyOnRails
[09:46:33] waseem_: freezevee: Yeah that's problematic.
[09:46:51] workmad3: freezevee: you'd also need to sort out the `index` action... but personally, why not consider sorting out the name
[09:47:14] freezevee: workmad3: why index? it works fine
[09:47:16] workmad3: freezevee: 'assets' is very generic after all... surely there's a better, more specific name you could use ;)
[09:47:38] freezevee: workmad3: meaning that I got to change hundreds of variable names...
[09:47:53] workmad3: ACTION shrugs
[09:47:59] workmad3: that's the price to pay for bad names normally
[09:48:12] freezevee: workmad3: I know, I deserve this pain :P
[09:48:40] Linuus: has joined #RubyOnRails
[09:49:10] freezevee: I still get a 405 error though
[09:50:29] _lazarevsky: has joined #RubyOnRails
[09:51:17] _lazarevsky: good morning ladies and gentlemen
[09:51:28] tetraktys: has joined #RubyOnRails
[09:51:50] pawnbox: has joined #RubyOnRails
[09:51:50] _lazarevsky: is it possible to configure Rails to read from and write to different end points?
[09:52:09] rushed: _lazarevsky: what's an end point?
[09:52:22] _lazarevsky: we're using AWS RDS
[09:52:38] _lazarevsky: so in the host: attribute in database.yml we point to an endpoint generated by RDS
[09:52:46] workmad3: _lazarevsky: you mean "Is it possible to split reads and writes to different database connections"?
[09:52:55] _lazarevsky: workmad3: that's exactly what I mean
[09:53:39] rushed: _lazarevsky: multidb
[09:54:05] rushed: _lazarevsky: also https://www.ruby-toolbox.com/categories/Active_Record_Sharding
[09:54:16] njero: has joined #RubyOnRails
[09:54:32] rushed: _lazarevsky: don't be scared of the "sharding" the gems listed cover a variety of db crazy
[09:54:32] freezevee: waseem_: https://gist.github.com/chrisvel/f4f027e89ac6425f1b53
[09:54:49] njero: has joined #RubyOnRails
[09:56:21] darrencauthon: has joined #RubyOnRails
[09:56:32] _lazarevsky: rushed: thanks man!
[09:56:40] _lazarevsky: rushed: much appreciated. Off to do some reading
[09:56:43] wethu: has joined #RubyOnRails
[09:57:19] njero: has joined #RubyOnRails
[09:57:32] bobbobbins: has joined #RubyOnRails
[09:57:44] annlewis: has joined #RubyOnRails
[09:57:49] rromanch_: has joined #RubyOnRails
[09:58:43] njero: has joined #RubyOnRails
[10:02:36] freezevee: workmad3: you're absolutely right, assets name is the problem
[10:02:59] freezevee: it must have appeared in the latest Rails versions
[10:03:07] SPYGAME: has joined #RubyOnRails
[10:03:13] Scripore: has joined #RubyOnRails
[10:03:17] tetraktys: has joined #RubyOnRails
[10:03:25] freezevee: and it seems there's no alternative
[10:04:24] jenrzzz: has joined #RubyOnRails
[10:05:54] qejk: has joined #RubyOnRails
[10:09:36] bruno-: has joined #RubyOnRails
[10:11:56] kitsuneyo: has joined #RubyOnRails
[10:12:29] freezevee: workmad3: did it
[10:13:06] freezevee: workmad3: I used post 'create_asset' => 'assets#create' and used that url in form_for
[10:13:33] wethu: has joined #RubyOnRails
[10:15:22] adre: has joined #RubyOnRails
[10:15:59] srinidhi: has joined #RubyOnRails
[10:20:29] rickmasta: has joined #RubyOnRails
[10:20:29] bmalum: has joined #RubyOnRails
[10:20:46] execute: has joined #RubyOnRails
[10:21:15] execute: newbie here, mostly a php/nodejs guy maintaining ror code.
[10:21:35] execute: i need to know how a function returns false even if the function works as intended?
[10:22:05] ghostboy1: has joined #RubyOnRails
[10:22:18] rushed: execute: false, return false, thing_that_returns_false()
[10:22:42] rushed: execute: returning false doesn't mean it broke... in node or php either :P
[10:23:12] rushed: execute: right
[10:23:13] execute: i dont know what i'm missing here
[10:23:47] execute: would an exception cause it to return false even if the exception was rescued?
[10:23:57] rushed: execute: maybe gist what you're working with :)
[10:24:50] execute: rushed: yeah, thinking of doing that, hard without sharing too much info... let me think about this a little bit more :-)
[10:25:04] kitsuneyo: has joined #RubyOnRails
[10:25:32] execute: ok how about this... if i have this: if @thing.active? && @thing.do_it!
[10:26:05] execute: and then thing.do_it! actually updates thing.active = false, would the if condition fail?
[10:26:50] rushed: execute: don't guess man, put in some logging, or use something like binding.pry to poke at your objects to see what's going one :)
[10:27:03] rushed: execute: http://railscasts.com/episodes/280-pry-with-rails
[10:29:02] dionysus69: has joined #RubyOnRails
[10:29:02] execute: rushed: yeah, i know. its just that this is sort of a hotfix on a live server and i havent had time to spool up a staging or local env. but i guess i'll do that now :-)
[10:29:27] yashinbasement: has joined #RubyOnRails
[10:30:38] TheRokh: has joined #RubyOnRails
[10:31:02] ruurd: has joined #RubyOnRails
[10:31:07] pawnbox: has joined #RubyOnRails
[10:33:02] dionysus69: I have home controller for both clients and for admins in admin namespace protect by authentication, I want to generate index page of home controller with an admin namespace home controller, how do I do that?
[10:33:26] constantinexvi: has joined #RubyOnRails
[10:34:04] dionysus69: actually, the non namespace controller is called welcome controller instead of home controller
[10:34:48] Cervajz: has joined #RubyOnRails
[10:35:34] Scripore: has joined #RubyOnRails
[10:38:08] Cervajz__: has joined #RubyOnRails
[10:38:22] ghostboy1: has left #RubyOnRails: ()
[10:45:45] dnewkerk: has joined #RubyOnRails
[10:46:12] tetraktys: has joined #RubyOnRails
[10:46:55] w0rd-driven: has joined #RubyOnRails
[10:48:51] Jasaka: has joined #RubyOnRails
[10:52:43] lxsameer: has joined #RubyOnRails
[10:54:50] pabvid: has joined #RubyOnRails
[10:55:03] Macaveli: has joined #RubyOnRails
[10:55:21] srinidhi: has joined #RubyOnRails
[10:56:20] rodfersou: has joined #RubyOnRails
[10:58:30] annlewis: has joined #RubyOnRails
[10:58:54] quazimodo: has joined #RubyOnRails
[11:00:00] tulak: has joined #RubyOnRails
[11:02:02] nfk|laptop: has joined #RubyOnRails
[11:02:44] bePolite: has joined #RubyOnRails
[11:03:59] yogeshrt: has joined #RubyOnRails
[11:05:12] pixeltrix: has joined #RubyOnRails
[11:07:10] Linuus: has joined #RubyOnRails
[11:07:24] Fly80: has joined #RubyOnRails
[11:07:35] chills42: has joined #RubyOnRails
[11:08:18] guidohcosta: has joined #RubyOnRails
[11:08:19] supergeek: has joined #RubyOnRails
[11:10:53] bruno-: has joined #RubyOnRails
[11:14:10] bePolite: has joined #RubyOnRails
[11:14:57] pixeltrix: has left #RubyOnRails: ()
[11:15:24] Flyy7: has joined #RubyOnRails
[11:15:51] pixeltrix: has joined #RubyOnRails
[11:16:08] stamina: has joined #RubyOnRails
[11:16:50] pixeltrix: has left #RubyOnRails: ()
[11:20:09] x44x45x41x4E: has joined #RubyOnRails
[11:20:09] x44x45x41x4E: has joined #RubyOnRails
[11:20:58] kitsuneyo: has joined #RubyOnRails
[11:21:32] Scripore: has joined #RubyOnRails
[11:24:16] MaDErroR123: has joined #RubyOnRails
[11:27:43] njero: has joined #RubyOnRails
[11:30:00] jgt: has joined #RubyOnRails
[11:30:46] Linuus: has joined #RubyOnRails
[11:32:55] qejk: has joined #RubyOnRails
[11:33:13] doodlehaus: has joined #RubyOnRails
[11:34:28] EdwardIII: hey is there a way i can tell which :params are from the querystring in a controller?
[11:34:44] EdwardIII: i need to do this dirty thing where i have an endpoint with a variable querystring, and i just want to dump that in a db
[11:34:55] EdwardIII: kinda a crappy version of what ga do with their tracking pixel
[11:35:58] norc: EdwardIII: Nest it inside a known attribute.
[11:36:13] norc: And require it in your params method, like this:
[11:36:59] EdwardIII: when i say variable querystring i mean like i'll be getting unstructured data sent and i just wanna bang the whole thing in the db
[11:37:16] EdwardIII: so it might be ?age=25 or it might not be, params i haven't even thought of
[11:38:06] jhass: http://api.rubyonrails.org/classes/ActionDispatch/Request.html#method-i-query_parameters ?
[11:38:14] jhass: request.query_parameters
[11:38:27] norc: EdwardIII: http://pastie.org/10480828
[11:38:51] EdwardIII: it looks like ruby puts it's own stuff in 'params' "controller"=>"entry", "action"=>"create"
[11:39:03] jhass: EdwardIII: see my link ?
[11:39:07] EdwardIII: heh also where the heck do 'params' come from?
[11:39:09] EdwardIII: looking now
[11:39:24] EdwardIII: query parameters looks good
[11:39:36] EdwardIII: weird how i couldn't find that by googling heh
[11:39:46] norc: EdwardIII: http://api.rubyonrails.org/classes/ActionController/Metal.html
[11:40:01] EdwardIII: stuff like this: http://stackoverflow.com/questions/7316656/how-to-get-query-string-from-passed-url-in-ruby-on-rails
[11:40:14] jhass: params should come from http://api.rubyonrails.org/classes/ActionController/StrongParameters.html#method-i-params which should be included into AC::Base
[11:40:36] jhass: but you can always check with method(:params).source_location / .owner
[11:41:05] norc: Or just tap into the request object directly
[11:41:09] norc: Thats what params does anyway.
[11:41:24] ldnunes: has joined #RubyOnRails
[11:44:10] sankaber: has joined #RubyOnRails
[11:46:03] workmad3: EdwardIII: `params` is the ActionController way of providing you with a parsed, ready-to-use hash-like structure that glosses over the need to know whether params came from query string, form-encoded params, a JSON request body, etc.
[11:46:36] htmldrum: has joined #RubyOnRails
[11:47:24] TvL2386: has joined #RubyOnRails
[11:51:28] Octophore: has joined #RubyOnRails
[11:51:40] urkle: has joined #RubyOnRails
[11:53:41] zpe: has joined #RubyOnRails
[11:57:28] EdwardIII: ah so in ruby params is the same as self.params()?
[11:58:04] beast: has joined #RubyOnRails
[11:58:14] quazimodo: has joined #RubyOnRails
[11:58:18] aaronr: has joined #RubyOnRails
[11:58:54] workmad3: EdwardIII: pretty much... `foobar` could be either a local variable or an implicit, paramater-less method call on `self` in ruby
[11:59:04] w0rd-driven: has joined #RubyOnRails
[11:59:06] EdwardIII: seems a little confusing heh
[11:59:12] EdwardIII: what with things getting autoloaded all over the gaff
[11:59:15] annlewis: has joined #RubyOnRails
[11:59:23] workmad3: EdwardIII: it works out fine pretty much all the time ;) and only constants get autoloaded
[11:59:49] _el_fer_: has joined #RubyOnRails
[12:00:07] workmad3: EdwardIII: so unless you're writing huge methods where you can't see which local variables you've introduced, you can identify method calls and local vars pretty easily
[12:01:19] kalusn: has joined #RubyOnRails
[12:01:44] EdwardIII: heh huge methods
[12:01:48] EdwardIII: well i do try to avoid them
[12:02:00] zorbash: has joined #RubyOnRails
[12:02:41] jhass: I actually find that I don't even think about whether something is a method call or a local var for a surprising amount of time. I just care about "thing that gives me X"
[12:03:17] bruno-: has joined #RubyOnRails
[12:03:21] inoter: has joined #RubyOnRails
[12:03:31] workmad3: jhass: yup... about the only time I ever need to think about it is when I try to debug someone's code where they do something like `favorites = favorites.where(active: true)` in a model
[12:03:48] workmad3: and start complaining that it produces `NoMethod` errors on nil :)
[12:04:35] EdwardIII: very zen jhass heh
[12:05:00] EdwardIII: hrm is there a way to make ruby's error messaging & stack trace come back as json rather than html?
[12:05:10] EdwardIII: rail's error messaging i should say sorry
[12:06:05] darrencauthon: has joined #RubyOnRails
[12:06:26] workmad3: EdwardIII: I find a lot of the typical concerns of people coming from compiled, static-typed languages tend to be non-concerns most of the time... "Won't it get confusing not knowing what type something is?" sometimes, but it's pretty rare - "Isn't the open class structure a recipe for chaos and hidden bugs?" no more so than just about any form of code... just be sensible!, etc.
[12:06:52] EdwardIII: i have seen bugs from the bowels of hell from languages that allow monkey patching in the real world though
[12:07:14] EdwardIII: i've done quite a lot of python too which isn't compiled/static
[12:07:32] senny: has joined #RubyOnRails
[12:07:56] leehambley: has joined #RubyOnRails
[12:08:02] rushed: EdwardIII: right, why do we use ruby when other languages are nasty bug proof, so silly~
[12:08:02] EdwardIII: tbh it didn't happen much in python, they were pretty good
[12:08:17] syath: has joined #RubyOnRails
[12:08:55] workmad3: EdwardIII: I've seen bugs from the bowels of hell from languages that don't allow monkey patching too ;)
[12:09:24] workmad3: EdwardIII: hell, I've seen forums where it's a *game* to try and produce the longest possible compile error from the shortest amount of C++ code...
[12:09:25] norc: workmad3: Honestly I prefer a mechanism for monkey patching over people fiddling around with pointers abusing implementation details to get the same thing done in C++.
[12:09:31] rushed: you must be misremembering, I mean how could that happen? because type checking~
[12:09:44] Pazician: has joined #RubyOnRails
[12:11:03] workmad3: norc: heh :) the fun trick in C++ is to alter the header of a class... if you just pull out `private` declarations and slap a `public` at the top, you can have lots of fun (just make sure to not alter the order of anything in the class, because then you alter the memory layout and hijinks ensue)
[12:12:02] workmad3: EdwardIII: if you ever want bad error messages, just start looking at the compile errors from C++ code that has a template error somewhere :D
[12:12:05] marienz: has joined #RubyOnRails
[12:13:02] EdwardIII: hrm i've tried this, but i still seem to be getting my errors outputted as html: https://gist.github.com/EdwardIII/bc406037155b51df97f6
[12:13:08] workmad3: EdwardIII: library version conflicts for java webapps running inside a J2EE server can be fun too... I think I had 1000 lines rooted in a 'NullPointerException' for one app that I eventually tracked down to "this jar is bundling a library that's included in the server already"
[12:13:43] EdwardIII: heh that's a nice one
[12:14:07] ggcstop_: has joined #RubyOnRails
[12:14:25] workmad3: EdwardIII: I wouldn't recommend leaving that in a production app btw
[12:14:38] EdwardIII: well it doesn't work in dev even
[12:15:04] ggcstop_: has left #RubyOnRails: ()
[12:15:30] workmad3: EdwardIII: what exception are you trying to test it with? :)
[12:15:36] w0rd-driven: has joined #RubyOnRails
[12:15:47] workmad3: EdwardIII: not all exceptions are generated at the controller level, so won't be caught by that anyway
[12:16:07] EdwardIII: workmad3: ActionController::RoutingError
[12:16:28] workmad3: EdwardIII: yeah, that's one that doesn't reach the controller... missing routes get detected before a controller is invoked
[12:17:05] doodlehaus: has joined #RubyOnRails
[12:17:28] workmad3: EdwardIII: also, why are you wanting to turn exceptions into a JSON object only in dev?
[12:17:36] Fly80: has joined #RubyOnRails
[12:17:43] EdwardIII: workmad3: well i'm just playing at the moment
[12:17:59] TvL2386: has joined #RubyOnRails
[12:18:03] maximski: has joined #RubyOnRails
[12:18:07] EdwardIII: and it's a pain, because most of my tests are using httpie, and i have to output to file then open that in chrome to quickly make sense of it
[12:18:12] workmad3: EdwardIII: https://coderwall.com/p/w3ghqq/rails-3-2-error-handling-with-exceptions_app
[12:18:18] EdwardIII: (it's mostly going to be rest endpoints anyway so it kind of makes sense)
[12:18:26] maximski: how can i "prettyfie" the output of jbuilder?
[12:18:44] rushed: EdwardIII:"most of my tests are using httpie" <= wtf?
[12:19:10] workmad3: EdwardIII: yeah... that's what I figured you'd say... but if anything, you want the output to be JSON in production then, along the lines of `{ "error": "Internal service error" }` not just dev ;)
[12:20:14] workmad3: EdwardIII: also, your way of grabbing the exception will prevent things like logging the exception out, inspection with a tool like better_errors in dev, etc.
[12:20:16] EdwardIII: rushed: why wtf?
[12:20:16] bruno-: has joined #RubyOnRails
[12:20:22] EdwardIII: workmad3: right that's all bad
[12:20:22] norc: workmad3: What do you mean by "header of a class" ?
[12:20:38] yogeshrt: has joined #RubyOnRails
[12:20:38] workmad3: norc: the class definition in C++, generally in a header file
[12:21:03] norc: workmad3: Oh, I misunderstood. I thought you were talking about the memory layout of common compilers - and that would have made no sense in that context.
[12:21:32] EdwardIII: workmad3: something must be making these exceptions into nice html errors. can i not just swap that out?
[12:21:51] workmad3: EdwardIII: that's the exceptions app I just linked you to ;)
[12:21:57] rushed: EdwardIII: you're "testing" manually using curl?
[12:22:18] workmad3: EdwardIII: although in dev, the exceptions are handled by a different middleware (which better_errors swaps out for you)
[12:22:30] chrissonar: has joined #RubyOnRails
[12:22:33] EdwardIII: rushed: i'm playing, i don't even know how to make a route work yet. i picked up rails this morning
[12:22:36] norc: workmad3: The _definition_ is not generally in the header file though. ;)
[12:22:42] EdwardIII: workmad3: ah ok maybe i should check out better_errors then
[12:22:42] jgt: has joined #RubyOnRails
[12:23:02] workmad3: norc: gah, it's been a while since I did C++... *declaration* :P
[12:23:09] rushed: EdwardIII: you might consider giving the testing tools and workflows from the Rails ecosystem a try before striking out on your own :)
[12:23:12] dhjondoh: has joined #RubyOnRails
[12:24:00] mostlybadfly: has joined #RubyOnRails
[12:24:04] EdwardIII: rushed: i have some unit tests already, but when i'm poking around playing with stuff (i.e. seeing how routes work) i'm going to use a web browser/httpie
[12:24:52] workmad3: ok, lunch time, before I make any more C++ terminology fubars :)
[12:25:06] norc: workmad3: enjoy. :-)
[12:25:29] MartinElvar: has joined #RubyOnRails
[12:25:31] rushed: EdwardIII: instead of seeing how they work, you might consider reading how they work http://guides.rubyonrails.org/routing.html
[12:26:11] EdwardIII: rushed: thanks for the pointers - that's what i'm doing
[12:27:06] MartinEl_: has joined #RubyOnRails
[12:27:37] norc: Bah, how do I require a spec/support/foo.rb from spec/controller/bar.rb sensibly?
[12:28:24] rushed: norc: support files are usually required in spec_helper.rb
[12:28:31] rushed: norc: so... you dont?
[12:28:51] norc: rushed: I only need it in this spec. Dont want it autoloaded every time
[12:29:19] abracadaniel: has joined #RubyOnRails
[12:29:33] rushed: norc: why so serious?
[12:29:52] norc: rushed: spec_helper.rb tells me to not include stuff there if I can help it.
[12:30:44] MartinEl_: has joined #RubyOnRails
[12:30:49] abracadaniel: has joined #RubyOnRails
[12:30:52] cajone: has joined #RubyOnRails
[12:30:58] norc: Ah well. /spec is in the load path it seems
[12:32:19] abracadaniel: has joined #RubyOnRails
[12:32:59] guidohcosta: has joined #RubyOnRails
[12:33:12] MartinElvar: has joined #RubyOnRails
[12:34:46] Cervajz: has joined #RubyOnRails
[12:35:11] franzip: has joined #RubyOnRails
[12:35:39] yosemitesam: has joined #RubyOnRails
[12:44:21] dstarh: has joined #RubyOnRails
[12:45:04] ror15: has joined #RubyOnRails
[12:45:54] paolodoors: has joined #RubyOnRails
[12:51:11] t4nkD: has joined #RubyOnRails
[12:51:44] hephaestus_rg: has joined #RubyOnRails
[12:52:01] mrmylanman: has joined #RubyOnRails
[12:52:53] gerep: has joined #RubyOnRails
[12:53:00] jkamenik: has joined #RubyOnRails
[12:53:12] jsrn_: has joined #RubyOnRails
[12:54:34] MaDErroR123: has joined #RubyOnRails
[12:56:39] Balzrael: has joined #RubyOnRails
[12:56:41] ramortegui: has joined #RubyOnRails
[13:00:04] annlewis: has joined #RubyOnRails
[13:02:04] victortyau: has joined #RubyOnRails
[13:02:08] User458764: has joined #RubyOnRails
[13:03:11] ruurd: has joined #RubyOnRails
[13:05:39] qejk: has joined #RubyOnRails
[13:07:26] dionysus69: is it a security thing not to let other devices access dev rails server? I cant access it from my phone, on the projects that I use foreman server on it works by going to my dev pc's IP:5000 but in this case IP:3000 results in error
[13:07:50] guidohcosta_: has joined #RubyOnRails
[13:08:26] kitsuneyo: dionysus69, i guess you're not talking about localhost that only the local computer can access?
[13:08:44] dionysus69: it is localhost but in foreman's case it worked as I said ))
[13:10:28] kitsuneyo: what is foreman?
[13:10:53] kitsuneyo: a way to spread that localhost access around your local network?
[13:12:03] Cervajz__: has joined #RubyOnRails
[13:13:36] senny: has joined #RubyOnRails
[13:14:01] dionysus69: no its just a tool that comes with a heroku toolbelt
[13:14:16] snick007: has joined #RubyOnRails
[13:14:27] dionysus69: it includes its own server which runs on port 5000 and I have been able to directly access localhost sites from different devices
[13:15:52] s2013: has joined #RubyOnRails
[13:17:11] tetraktys: has joined #RubyOnRails
[13:18:03] pabvid_: has joined #RubyOnRails
[13:19:25] kitsuneyo: has joined #RubyOnRails
[13:21:22] s2013: has joined #RubyOnRails
[13:21:25] User458764: has joined #RubyOnRails
[13:21:40] sankaber: has joined #RubyOnRails
[13:21:56] s2013: morning yall.. trying to figure out why i get OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed when using the rails console
[13:22:21] riotjones: has joined #RubyOnRails
[13:22:35] doodlehaus: has joined #RubyOnRails
[13:23:05] lipoqil: has joined #RubyOnRails
[13:23:27] nettoweb: guys... which gem to pull data from google analytics do you suggest me? Im lokking at https://github.com/tpitale/legato but dont know if there is a better
[13:24:06] sankaber: has joined #RubyOnRails
[13:25:23] siaW: has joined #RubyOnRails
[13:26:04] siaW: i need help here https://gist.github.com/siaw23/ed0d939d984f15ebc908 i am getting ???undefined method `email' for nil:NilClass??? in my test. any idea why?
[13:28:11] umgrosscol: has joined #RubyOnRails
[13:29:54] jamiejackson: has joined #RubyOnRails
[13:29:56] A124: has joined #RubyOnRails
[13:30:09] jessemcgilallen: has joined #RubyOnRails
[13:33:07] mrchris: has joined #RubyOnRails
[13:33:08] Scient: because you are calling .email on a nil object
[13:33:18] ritic: has joined #RubyOnRails
[13:34:33] wpp: has joined #RubyOnRails
[13:38:25] bruno-: has joined #RubyOnRails
[13:38:58] devdazed: has joined #RubyOnRails
[13:41:19] stannard: has joined #RubyOnRails
[13:41:41] siaW: Scient: @ticket.author is not a nil object
[13:42:10] n1lo: has joined #RubyOnRails
[13:43:00] mase-chatter: has joined #RubyOnRails
[13:43:27] joshkovach: has joined #RubyOnRails
[13:46:54] kitsuneyo: has joined #RubyOnRails
[13:47:19] htmldrum: has joined #RubyOnRails
[13:50:52] darrencauthon: has joined #RubyOnRails
[13:51:27] bmalum: has joined #RubyOnRails
[13:53:38] xcesariox: has joined #RubyOnRails
[13:54:40] codesoda: has joined #RubyOnRails
[13:55:48] n1lo: has joined #RubyOnRails
[13:55:57] jmignault: has joined #RubyOnRails
[13:57:18] JohnBat26: has joined #RubyOnRails
[13:58:41] wcalderipe: has joined #RubyOnRails
[14:00:10] beast_: has joined #RubyOnRails
[14:00:47] annlewis: has joined #RubyOnRails
[14:02:10] SPYGAME: has joined #RubyOnRails
[14:03:18] codesoda: has joined #RubyOnRails
[14:04:08] zorbash: has joined #RubyOnRails
[14:05:47] nanuko: has joined #RubyOnRails
[14:05:50] jenrzzz: has joined #RubyOnRails
[14:06:03] defsdoor: has joined #RubyOnRails
[14:06:13] Dopagod: has joined #RubyOnRails
[14:06:13] Dopagod: has joined #RubyOnRails
[14:10:26] ruurd: has joined #RubyOnRails
[14:14:07] wpp: Hello, anyone know how action cable client support for native clients would look like?
[14:14:09] dopamean_: has joined #RubyOnRails
[14:14:21] beauby: has joined #RubyOnRails
[14:16:26] kitsuneyo: someone should write an article about how to formulate programming questions in a way other people can understand. it would be the most shared thing ever.
[14:18:20] ror15: has joined #RubyOnRails
[14:18:42] greengriminal: has joined #RubyOnRails
[14:19:38] smathy: has joined #RubyOnRails
[14:21:18] yardenbar: has joined #RubyOnRails
[14:21:32] techsethi: has joined #RubyOnRails
[14:21:56] sarink: has joined #RubyOnRails
[14:22:23] wcalderipe: has joined #RubyOnRails
[14:23:38] tubbo: kitsuneyo: !ask
[14:23:38] helpa: kitsuneyo: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[14:23:46] tubbo: you mean something like that? :P
[14:24:18] kitsuneyo: tubbo, i've not read it yet but i guess so
[14:24:25] kitsuneyo: bookmarked :D
[14:25:10] tubbo: dionysus69: wait, foreman its own server running on localhost:5000?
[14:25:41] Ergo: has joined #RubyOnRails
[14:28:46] shmilan: has joined #RubyOnRails
[14:30:36] jtb__: has joined #RubyOnRails
[14:31:06] ckinniburgh: has joined #RubyOnRails
[14:33:00] CJKinni: has joined #RubyOnRails
[14:33:13] sivsushruth: has joined #RubyOnRails
[14:34:04] axl_: has joined #RubyOnRails
[14:34:59] weihan: has joined #RubyOnRails
[14:36:32] greengriminal: has joined #RubyOnRails
[14:36:56] greengriminal: has joined #RubyOnRails
[14:37:13] yardenbar: has joined #RubyOnRails
[14:37:24] rromanch_: has joined #RubyOnRails
[14:37:27] greengriminal: has joined #RubyOnRails
[14:37:48] rubyonrails528: has joined #RubyOnRails
[14:37:59] greengriminal: has joined #RubyOnRails
[14:38:34] momomomomo: has joined #RubyOnRails
[14:38:52] ror15_: has joined #RubyOnRails
[14:39:12] greengriminal: has joined #RubyOnRails
[14:39:13] stardiviner: has joined #RubyOnRails
[14:39:40] chouhoulis: has joined #RubyOnRails
[14:39:52] r0r15: has joined #RubyOnRails
[14:40:04] greengriminal: has joined #RubyOnRails
[14:40:52] bruno-: has joined #RubyOnRails
[14:41:20] chills42: has joined #RubyOnRails
[14:42:00] ror15: has joined #RubyOnRails
[14:42:11] wpp: kitsuneyo were you referring to my question? I'm sorry, I'm looking to add "real-time" capabilities to an existing rails project and got pointed towards ActionCable. I understand that the project is still in Alpha but was wondering wether someone in #rails might have more insights.
[14:42:13] polishdub: has joined #RubyOnRails
[14:42:21] ror15: Sorry if this came through and you are seeing it twice - LimeChat is silly
[14:42:23] ror15: Do I have to create config/initializer/omniauth.rb when using omniauth or is there a rails command that sets it up?
[14:42:52] wpp: kitsuneyo because the Readme only shows a javascript client, I was wondering how native client support would look like.
[14:42:58] dionysus69: tubbo: I think so yes
[14:43:56] tubbo: wpp: didn't you see my answer from yesterday?
[14:44:16] wpp: tubbo no I didn't
[14:44:21] rickmasta: has joined #RubyOnRails
[14:44:28] chouhoulis: has joined #RubyOnRails
[14:44:58] tubbo: wpp: yeah you were like going in and out connection wise :D anyway, i said that i haven't seen anything in the source nor in the readme that would indicate action_cable is anything more than just a replacement for something like Faye.
[14:45:07] chrislotix: has joined #RubyOnRails
[14:45:26] pawnbox: has joined #RubyOnRails
[14:45:31] tubbo: wpp: that said, it's just a Rack app so i think you can add middleware that will intercept incoming requests and fire the messages off to your native client APIs.
[14:45:45] tubbo: and i'm 99.999% sure we will see that either prior to or right around the release of action_cable
[14:46:07] tubbo: wpp: but if you're looking to build realtime web apps, why not check out elixir and phoenix? a lot of rubyists are starting to gravitate to phoenix when they need real-time support
[14:46:36] tubbo: rails is still a lot better for most of what you'd need in a web app, but phoenix is not to be ignored.
[14:47:07] wpp: tubbo yeah my connection is flakey at times. Sorry about that. so on client side you would open tcp/tls socket as opposed to wss and you'd be on your own?
[14:47:25] kitsuneyo: wpp, i was but i also have the problem of not formulating Qs well
[14:48:14] sivsushruth: has joined #RubyOnRails
[14:48:27] kitsuneyo: it's hard sometimes
[14:48:49] a1fa: can you put two if conditions in validates_presence_of?
[14:49:02] wpp: kitsuneyo no no thanks for pointing out, I was lazy should have taken some time
[14:49:05] a1fa: i have two fields, either one can be blank, but not both
[14:49:57] Peteykun: has joined #RubyOnRails
[14:50:31] tubbo: wpp: i wouldn't know, haven't ever done this
[14:50:50] wpp: tubbo is there a way to merge them with existing rails apps? Or would you have to start fresh with elixir?
[14:51:23] tubbo: a1fa: no, but you could combine both conditions into a block or an additional method
[14:52:37] speakingcode: has joined #RubyOnRails
[14:52:41] a1fa: tubbo: so :if => :whatever? && :whatever2?
[14:53:08] tubbo: wpp: well you can't just write elixir code inside an existing rails app, if that's what you mean. but you can create an additional app and then have the existing one's JS talk to it over websockets.
[14:53:12] The_Phoenix: has joined #RubyOnRails
[14:53:51] tubbo: a1fa: no, you'd have to define an additional method that would do whatever? && whatever2?
[14:54:03] tubbo: a1fa: but i think `if:` can take a block as well
[14:54:23] jhass: proc/lambda :P
[14:55:54] avril14th: has joined #RubyOnRails
[14:56:18] avril14th: Hello, about conditional associations, that should work, right? https://gist.github.com/muichkine/1c3c91e6b3211f8f8ad9
[14:58:02] Or1on: has joined #RubyOnRails
[14:59:27] mary5030: has joined #RubyOnRails
[14:59:56] wpp: tubbo thanks for your tips!
[15:00:23] mary5030: has joined #RubyOnRails
[15:01:08] t4nkD: has joined #RubyOnRails
[15:01:09] tubbo: jhass: what did you call me???
[15:01:25] CJKinni_: has joined #RubyOnRails
[15:01:34] annlewis: has joined #RubyOnRails
[15:01:40] jhass: a pure function of course!
[15:03:04] northfurr: has joined #RubyOnRails
[15:03:09] rromanch_: has joined #RubyOnRails
[15:03:26] amortimer: If I???m using OAuth for Devise can I get rid of passwords?
[15:04:37] avril14th: amortimer: yeah if you ONLY use oauth, but then, do these really take too much space for you to worry?
[15:04:42] treehug88: has joined #RubyOnRails
[15:05:23] tubbo: kinda depends on the app
[15:05:34] amortimer: I???ll only be using OAuth, as things stand now. No, but it???s kind of pointless that they are there.
[15:05:50] tubbo: amortimer: you can not load :database_authenticatable and get rid of the password column in the db
[15:05:54] gabeodess: has joined #RubyOnRails
[15:06:03] amortimer: That???s what I???m running into now.
[15:06:06] tubbo: that's how one would replace devise's authentication logic with their own
[15:06:21] gabeodess: Hey guys, does anyone know if Foreman has some kind of ???before kill??? hook?
[15:06:39] gabeodess: killing Foreman with ctrl-c seems to leave my sidekiq workers running
[15:07:06] gabeodess: I want to add a kill script to be run for my sidekiq workers when I end my foreman server.
[15:07:23] amortimer: So :database_authenticatable relies on there being passwords? That kind of sucks leaving a double interface with one facet orphaned, if I don???t build forms to support the passwords.
[15:08:09] arup_r: has joined #RubyOnRails
[15:08:36] tubbo: amortimer: yes, database_authenticatable (the devise module) relies on there being passwords, because that's all it does...authenticate users from a hashed password saved to the database. which is precisely what you DON'T want to do, right?
[15:08:51] amortimer: You are correct.
[15:09:01] tubbo: amortimer: so i don't understand why you think that sucks :{
[15:09:33] erich: has joined #RubyOnRails
[15:09:35] _wldcordeiro: has joined #RubyOnRails
[15:09:52] kitsuneyo: has joined #RubyOnRails
[15:11:17] Cervajz: has joined #RubyOnRails
[15:12:05] Cervajz__: has joined #RubyOnRails
[15:12:16] amortimer: I just don???t want the passwords there.
[15:13:01] amortimer: It seems like something extra I don???t need.
[15:13:18] amortimer: (Not saying I???m not totally missing something.)
[15:14:07] amortimer: If I???m going to be using Oauth means of managing my users access, why even bother having a password?
[15:14:29] Skelz0r: has joined #RubyOnRails
[15:14:29] northfurr: has joined #RubyOnRails
[15:15:34] tubbo: amortimer: they aren't there...
[15:15:52] _wldcordeiro: has joined #RubyOnRails
[15:15:54] l_tonz: has joined #RubyOnRails
[15:16:05] nertzy2: has joined #RubyOnRails
[15:16:16] tubbo: amortimer: if you remove database_authenticatable, the User doesn't have any password/confirmation validation and it doesn't hash passwords into the DB. that's what you wanted, right?
[15:17:49] amortimer: I???ll have to try it.
[15:18:10] guidohcosta: has joined #RubyOnRails
[15:18:17] ror15: has joined #RubyOnRails
[15:18:48] amortimer: I may not understand the implications of database_authenticatable
[15:19:37] tubbo: amortimer: devise's wiki and rdoc documentation can enlighten you on exactly what it's doing.
[15:19:39] EminenceHC: has joined #RubyOnRails
[15:19:52] amortimer: I will read it.
[15:19:55] codesoda: has joined #RubyOnRails
[15:20:01] amortimer: I???ve been in and out of it all along.
[15:20:20] amortimer: ???Devise no passwords??? wasn???t doing me much good.
[15:20:57] ruurd: has joined #RubyOnRails
[15:20:58] amortimer: I obviously need to grok somethings.
[15:21:25] codesoda_: has joined #RubyOnRails
[15:21:30] michaeldeol: has joined #RubyOnRails
[15:22:48] northfurr: has joined #RubyOnRails
[15:23:06] codesoda_: has joined #RubyOnRails
[15:23:12] weihan: has joined #RubyOnRails
[15:23:13] l_tonz: has joined #RubyOnRails
[15:23:19] MartinElvar: has joined #RubyOnRails
[15:24:30] gaboesquivel: has joined #RubyOnRails
[15:25:12] rasalghul: has joined #RubyOnRails
[15:25:40] weihan: has joined #RubyOnRails
[15:25:52] disgrntld: has joined #RubyOnRails
[15:27:34] basiles: has joined #RubyOnRails
[15:28:00] hfp: has joined #RubyOnRails
[15:28:16] rasalghul_: has joined #RubyOnRails
[15:28:31] corioliss: has joined #RubyOnRails
[15:28:46] pixelhandler: has joined #RubyOnRails
[15:29:31] annlewis: has joined #RubyOnRails
[15:29:40] hfp: Hi all, I'm trying to import a csv file into my model. I have a column named 'payee_name' in my schema and 'payee name' in my csv. I import with `Model.create! row.to_hash` but I'm getting an error "unknown attribute 'payee name' for Model". Doesn't it convert 'payee name' to 'payee_name' automatically?
[15:31:02] tubbo: hfp: it does not
[15:31:02] danadanad: has joined #RubyOnRails
[15:31:11] tubbo: i mean, clearly ;)
[15:31:38] desiph3r: has joined #RubyOnRails
[15:32:02] amortimer: tubbo: I get it. Thanks. OAtuh is just an Interface to the actual Auth.
[15:32:20] hfp: tubbo: duh I think I got confused between to_hash and to_s
[15:32:32] hfp: i mean to_sym
[15:32:40] davispuh: has joined #RubyOnRails
[15:33:02] tubbo: amortimer: yeah, like there's a lot of information on using OmniAuth with Devise...though it's not totally apparent that the only thing you need to do is remove database_authenticatable and boom, your Users no longer require passwords to register.
[15:33:11] tubbo: because it's understood that OmniAuth is controlling authentication procedures
[15:34:12] amortimer: I wasn???t able to authenticate with out it.
[15:34:25] amortimer: Is that what you mean, I needed to write my own?
[15:34:46] tubbo: amortimer: no, you have to replace it with something else though
[15:35:08] Dopagod: has joined #RubyOnRails
[15:35:12] amortimer: Ok, because OAuth is trying to call encrypted_password and choking on that.
[15:35:20] tubbo: amortimer: a lot of people use simple token auth (just generating a token on the User and using that as an api key) when they make SPAs that use rails as an API. so instead of using the built in :authenticate_user! they write their own.
[15:35:34] tubbo: amortimer: what is "OAuth" in this case? because OAuth is a concept, not a library.
[15:35:45] tubbo: i mean, it is a library...but it's typically not what you use
[15:36:09] amortimer: I???m sorry, omniauth-google-oauth2
[15:37:07] eGGsha: has joined #RubyOnRails
[15:37:30] tubbo: amortimer: it's probably getting triggered automatically by devise because you have database_authenticatable in there. https://github.com/zquestz/omniauth-google-oauth2/search?utf8=%E2%9C%93&q=encrypted_password
[15:37:34] shinnya: has joined #RubyOnRails
[15:38:06] EminenceHC: has joined #RubyOnRails
[15:38:15] riotjones: has joined #RubyOnRails
[15:38:19] amortimer: That???s not showing any results.
[15:38:36] tubbo: amortimer: i know. :) that's because omniauth-google-oauth2 doesn't ever call encrypted_password.
[15:39:25] SamGerber: has joined #RubyOnRails
[15:40:15] amortimer: duh, removed it from the migration but not the model???
[15:42:31] sivsushruth: has joined #RubyOnRails
[15:43:47] tubbo: i have definitely done that before
[15:44:52] danman: has joined #RubyOnRails
[15:45:40] siddart: has joined #RubyOnRails
[15:45:48] barhum2013: has joined #RubyOnRails
[15:45:49] rasalghul_: Hi guys, I'm trying to make a project run with mysql2 on Ubuntu 14.04.3 but a message say Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile ...can anyone help me?
[15:46:10] [Butch]: has joined #RubyOnRails
[15:47:07] havenwood: rasalghul_: Did you add `gem 'mysql2'` and run?: bundle install
[15:47:58] htmldrum: has joined #RubyOnRails
[15:48:21] rasalghul_: havenwood, yes
[15:48:48] momomomomo: has joined #RubyOnRails
[15:49:28] rasalghul_: havenwood, I have installed libmysqlclient-dev library too
[15:49:57] havenwood: rasalghul_: Not?: libmysql-dev
[15:51:19] tercenya: has joined #RubyOnRails
[15:51:21] greengriminal: has joined #RubyOnRails
[15:52:14] rasalghul_: havenwood, no that library isn't in my repo
[15:52:43] rasalghul_: should I have to add a PPA?
[15:53:10] havenwood: rasalghul_: Ah, nevermind then. I was surprised to see libmysqlclient-dev so it seems I'm just not up-to-speed on Ubuntu 14.04 mysql packages.
[15:53:35] chopin: has joined #RubyOnRails
[15:53:35] big|bad|wolf: has joined #RubyOnRails
[15:54:11] trautwein: has joined #RubyOnRails
[15:55:30] Maletor: has joined #RubyOnRails
[15:56:08] havenwood: rasalghul_: https://github.com/rails/rails/issues/21544
[15:57:39] l_tonz: has joined #RubyOnRails
[15:57:52] rasalghul_: havenwood, ok, I have install *-dev packages for mysql, I was looking on stackoverflow for a solution. in some comments says if may change "gem 'mysql2', '~>0.3.20'" and I did it but the same message appears
[15:58:22] havenwood: rasalghul_: It seems your package is correct and it isn't having any trouble linking. What version of Rails?
[15:58:35] rasalghul_: havenwood, I try with newer versions like gem 'mysql2', '~> 0.4.1' but nothing
[15:58:56] rasalghul_: rails -v: Rails 4.2.3
[15:59:28] rasalghul_: ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
[15:59:35] greengriminal: has joined #RubyOnRails
[16:00:27] l_tonz: has joined #RubyOnRails
[16:00:40] herbst: has joined #RubyOnRails
[16:01:11] roshanavand: has joined #RubyOnRails
[16:01:28] ktchup: has joined #RubyOnRails
[16:02:15] willardg: has joined #RubyOnRails
[16:04:19] twohlix: has joined #RubyOnRails
[16:04:24] l_tonz: has joined #RubyOnRails
[16:04:41] Cervajz: has joined #RubyOnRails
[16:04:52] srinidhi: has joined #RubyOnRails
[16:05:18] bmalum: has joined #RubyOnRails
[16:05:56] darkxploit: has joined #RubyOnRails
[16:06:05] rgtk: has joined #RubyOnRails
[16:07:20] Cervajz__: has joined #RubyOnRails
[16:07:24] kies^: has joined #RubyOnRails
[16:07:33] raazdaan: has joined #RubyOnRails
[16:09:41] chills42: has joined #RubyOnRails
[16:09:55] towski_: has joined #RubyOnRails
[16:10:47] safety_cut: has joined #RubyOnRails
[16:11:14] michaeldeol: has joined #RubyOnRails
[16:12:00] l_tonz: has joined #RubyOnRails
[16:13:41] The_Phoenix1: has joined #RubyOnRails
[16:15:05] momomomomo: has joined #RubyOnRails
[16:16:30] basiles: has joined #RubyOnRails
[16:19:04] cschneid_: has joined #RubyOnRails
[16:19:20] Thomas-0725: has joined #RubyOnRails
[16:20:33] dionysus69: has joined #RubyOnRails
[16:20:43] mrchris: has joined #RubyOnRails
[16:20:49] DLSteve: has joined #RubyOnRails
[16:21:12] EminenceHC: has joined #RubyOnRails
[16:21:14] siaW: has joined #RubyOnRails
[16:21:24] Shoutsid: has joined #RubyOnRails
[16:21:41] mrchris: has joined #RubyOnRails
[16:21:49] diegobiavati: has joined #RubyOnRails
[16:21:54] n008f4g_: has joined #RubyOnRails
[16:21:55] mrchris: anyone know how to override a validation message after its been set?
[16:23:13] hephaestus_rg: has joined #RubyOnRails
[16:24:11] roshanavand: has joined #RubyOnRails
[16:24:54] deception1: has joined #RubyOnRails
[16:25:53] benlieb: has joined #RubyOnRails
[16:26:31] ktchup_: has joined #RubyOnRails
[16:26:41] renegadeandy: has joined #RubyOnRails
[16:26:48] rgtk: has joined #RubyOnRails
[16:27:00] mrchris: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[16:27:05] mrchris: has joined #RubyOnRails
[16:27:23] roshanav_: has joined #RubyOnRails
[16:29:21] renegadeandy: Hey people. Can somebody help me to use the time zone select helper for a nested form : https://gist.github.com/renegadeandy/923066e4e67c33dd0ec8
[16:30:50] l_tonz: has joined #RubyOnRails
[16:31:32] renegadeandy: venue_form.time_zone_select does not work, which is what I thought the right way
[16:31:33] nertzy2: has joined #RubyOnRails
[16:32:50] codesoda: has joined #RubyOnRails
[16:33:14] matthewd: renegadeandy: Have you tried changing the parameters you're passing to match the output you want?
[16:34:06] renegadeandy: matthewd: i assume you mean : :local_time_zone -- im not sure waht else to make it
[16:35:22] helpa-bot: has joined #RubyOnRails
[16:35:31] matthewd: You're passing: :local_time_zone, 'time_zone'
[16:35:46] matthewd: It's outputting: name="local_time_zone[time_zone]"
[16:36:06] USvER: has joined #RubyOnRails
[16:36:19] rhino-sic: has joined #RubyOnRails
[16:36:46] barhum2013: has joined #RubyOnRails
[16:37:17] helpa-bot: has joined #RubyOnRails
[16:38:16] matthewd: Yeah, that's not a valid symbol; use a string
[16:38:27] sonOfRa_: has joined #RubyOnRails
[16:38:55] renegadeandy: sweet thats it!
[16:39:18] helpa-bot: has joined #RubyOnRails
[16:39:44] erichmenge_: has joined #RubyOnRails
[16:39:54] bartj3_: has joined #RubyOnRails
[16:40:30] spekode_: has joined #RubyOnRails
[16:40:31] speaking1ode: has joined #RubyOnRails
[16:41:17] helpa: has joined #RubyOnRails
[16:47:56] helpa: has joined #RubyOnRails
[16:47:58] Junaos_: has left #RubyOnRails: ()
[16:48:17] Junaos: has joined #RubyOnRails
[16:49:03] Ankhers_: has joined #RubyOnRails
[16:49:03] CustosLim3n: has joined #RubyOnRails
[16:49:15] allcentury: has joined #RubyOnRails
[16:53:05] MaDErroR123: has joined #RubyOnRails
[16:53:57] ngscheur1: has joined #RubyOnRails
[16:54:48] petricore: has joined #RubyOnRails
[16:56:54] AntiSpamMeta: has joined #RubyOnRails
[16:58:25] arashb: has joined #RubyOnRails
[16:58:28] roshanavand: has joined #RubyOnRails
[16:59:11] safety_cut: has joined #RubyOnRails
[17:00:01] l_tonz: has joined #RubyOnRails
[17:00:01] cschneid_: has joined #RubyOnRails
[17:00:01] towski_: has joined #RubyOnRails
[17:00:01] kies^: has joined #RubyOnRails
[17:00:01] defsdoor: has joined #RubyOnRails
[17:00:01] joshkovach: has joined #RubyOnRails
[17:00:01] execute: has joined #RubyOnRails
[17:00:01] nyaa: has joined #RubyOnRails
[17:00:01] havenwood: has joined #RubyOnRails
[17:00:01] fcser_: has joined #RubyOnRails
[17:00:01] jtperreault: has joined #RubyOnRails
[17:00:01] weaksauce: has joined #RubyOnRails
[17:00:01] Cervajz_: has joined #RubyOnRails
[17:00:01] digitalknk: has joined #RubyOnRails
[17:00:01] Dfoolz: has joined #RubyOnRails
[17:00:01] svkurowski: has joined #RubyOnRails
[17:00:01] wenchenx_: has joined #RubyOnRails
[17:00:01] shawnacscott: has joined #RubyOnRails
[17:00:01] Hamled|Erp: has joined #RubyOnRails
[17:00:01] Liothen: has joined #RubyOnRails
[17:00:01] beingjohnm: has joined #RubyOnRails
[17:00:01] p7r: has joined #RubyOnRails
[17:00:01] alol: has joined #RubyOnRails
[17:00:01] kramsee: has joined #RubyOnRails
[17:00:01] mikajo: has joined #RubyOnRails
[17:01:44] jessemcgilallen: has joined #RubyOnRails
[17:03:02] diegobiavati: has joined #RubyOnRails
[17:03:36] __butch__: has joined #RubyOnRails
[17:04:27] tubbo: cool story bro
[17:04:33] n1lo: has joined #RubyOnRails
[17:05:34] safety_cut: has joined #RubyOnRails
[17:06:07] snockerton: has joined #RubyOnRails
[17:06:46] marienz: has joined #RubyOnRails
[17:07:21] zorbash: has joined #RubyOnRails
[17:07:37] sami: has joined #RubyOnRails
[17:07:38] SmOkE_RU: has joined #RubyOnRails
[17:07:38] DefV: has joined #RubyOnRails
[17:07:38] lsone: has joined #RubyOnRails
[17:07:38] Kingdutch: has joined #RubyOnRails
[17:07:39] dmarr: has joined #RubyOnRails
[17:07:39] Killerkeksdose: has joined #RubyOnRails
[17:07:39] meshugga: has joined #RubyOnRails
[17:07:39] hoodow: has joined #RubyOnRails
[17:07:39] jiriki: has joined #RubyOnRails
[17:07:39] BaNzounet: has joined #RubyOnRails
[17:07:39] pavelz: has joined #RubyOnRails
[17:07:40] SmOkE_RU: has joined #RubyOnRails
[17:07:40] hoodow: has joined #RubyOnRails
[17:07:40] EdwardIII: has joined #RubyOnRails
[17:07:40] K0nserv-: has joined #RubyOnRails
[17:07:41] arthurnn: has joined #RubyOnRails
[17:07:41] Puffball: has joined #RubyOnRails
[17:07:42] nibbo: has joined #RubyOnRails
[17:07:42] phon: has joined #RubyOnRails
[17:07:43] codelahoma: has joined #RubyOnRails
[17:07:43] Pro|: has joined #RubyOnRails
[17:07:43] quazimodo: has joined #RubyOnRails
[17:07:43] raenk: has joined #RubyOnRails
[17:07:44] hypnosb: has joined #RubyOnRails
[17:07:45] ekem: has joined #RubyOnRails
[17:07:46] paolodoors: has joined #RubyOnRails
[17:07:47] brazenbraden: has joined #RubyOnRails
[17:07:49] defswork: has joined #RubyOnRails
[17:07:51] rakm: has joined #RubyOnRails
[17:07:53] Jasaka: has joined #RubyOnRails
[17:08:01] nanuko: has joined #RubyOnRails
[17:08:02] chouhoulis: has joined #RubyOnRails
[17:08:06] siddart: has joined #RubyOnRails
[17:08:06] amortimer: has joined #RubyOnRails
[17:08:12] lampe2: has joined #RubyOnRails
[17:08:13] desiph3r: has joined #RubyOnRails
[17:08:15] rgtk: has joined #RubyOnRails
[17:08:17] tbuehlmann: has joined #RubyOnRails
[17:08:21] mrtomme: has joined #RubyOnRails
[17:08:21] smathy: has joined #RubyOnRails
[17:08:35] WhereIsMySpoon_: has joined #RubyOnRails
[17:08:39] hypnosb: has joined #RubyOnRails
[17:09:13] ModusPwnens: has joined #RubyOnRails
[17:09:16] yopp: has joined #RubyOnRails
[17:09:26] basiles: has joined #RubyOnRails
[17:10:06] smathy: renegadeandy, or, f.time_zone_select :timezone
[17:10:28] jkamenik: has joined #RubyOnRails
[17:10:32] voker57: has joined #RubyOnRails
[17:10:32] snockerton: has joined #RubyOnRails
[17:10:32] __butch__: has joined #RubyOnRails
[17:10:32] l_tonz: has joined #RubyOnRails
[17:10:32] cschneid_: has joined #RubyOnRails
[17:10:32] towski_: has joined #RubyOnRails
[17:10:32] kies^: has joined #RubyOnRails
[17:10:32] defsdoor: has joined #RubyOnRails
[17:10:32] joshkovach: has joined #RubyOnRails
[17:10:32] execute: has joined #RubyOnRails
[17:10:32] nyaa: has joined #RubyOnRails
[17:10:32] havenwood: has joined #RubyOnRails
[17:10:32] fcser_: has joined #RubyOnRails
[17:10:32] jtperreault: has joined #RubyOnRails
[17:10:32] weaksauce: has joined #RubyOnRails
[17:10:32] Cervajz_: has joined #RubyOnRails
[17:10:32] digitalknk: has joined #RubyOnRails
[17:10:32] Dfoolz: has joined #RubyOnRails
[17:10:32] svkurowski: has joined #RubyOnRails
[17:10:32] wenchenx_: has joined #RubyOnRails
[17:10:32] shawnacscott: has joined #RubyOnRails
[17:10:32] Hamled|Erp: has joined #RubyOnRails
[17:10:32] Liothen: has joined #RubyOnRails
[17:10:32] beingjohnm: has joined #RubyOnRails
[17:10:32] p7r: has joined #RubyOnRails
[17:10:32] alol: has joined #RubyOnRails
[17:10:32] kramsee: has joined #RubyOnRails
[17:10:32] mikajo: has joined #RubyOnRails
[17:10:38] smathy: *:local_time_zone
[17:10:55] smathy: Heh, * venue_form
[17:11:03] smathy: venue_form.time_zone_select :local_time_zone
[17:11:16] ModusPwnens: If you have a resource (let's call it Foo), and its state can be changed and attributes updated by creating a different resource (let's call it FooUpdate), how would you represent that with an ActiveRecord interface for those models?
[17:11:31] Shoutsid: has joined #RubyOnRails
[17:11:44] dionysus69: has joined #RubyOnRails
[17:12:06] ModusPwnens: Is it considered an update to the Foo resource? Or do you post the create to the FooUpdate?
[17:12:29] _wldcordeiro: has joined #RubyOnRails
[17:12:44] masscrx: has joined #RubyOnRails
[17:13:10] brazenbraden: having a little trouble getting sidekiq to talk to redis in my dockerized app. here is a gist of the bits. https://gist.github.com/brazenbraden/64e23e8c7d49d71d14a1 basically, docker is setting up redis in the hosts file correctly and the initializer makes that connection but sidekiq fails to find the url and looks for the database on 127.0.0.1. What have i missed?
[17:14:22] TheNet: has joined #RubyOnRails
[17:15:37] smathy: ModusPwnens, really depends on the details.
[17:16:36] Lincee: has joined #RubyOnRails
[17:16:36] ValicekB: has joined #RubyOnRails
[17:17:18] ModusPwnens: What details would it depend on? Sorry if that seems like a dumb question. This is an area of restful design that I have trouble with.
[17:18:00] USvER: How to read all available data from IO class and block till new data arrives?
[17:18:00] krisquigley: has joined #RubyOnRails
[17:18:02] tubbo: ModusPwnens: let's say you are making a wiki, which has a Page model. but you want to track changes to the wiki, so you use a Revision model
[17:18:27] tubbo: ModusPwnens: Page has_many :revisions, but it also belongs_to :current_revision which is what the :title and :content attributes are delegated to
[17:18:33] tubbo: and all of the content is actually in revision
[17:18:37] tubbo: Revision*
[17:18:38] blackmesa: has joined #RubyOnRails
[17:19:04] tubbo: ModusPwnens: in that case, i think the best API is to make PUT /articles/1 actually create a Revision. the details of how you're storing the data is irrelevant, a user just knows "I am editing this page".
[17:19:15] GreatSage: has left #RubyOnRails: ()
[17:20:04] ModusPwnens: So you make a PUT to /articles/1 actually create a revision object behind the scenes in that case?
[17:20:22] workmad3: ModusPwnens: ^ tubbo pretty much hits it on the head... whether you PUT to a URL or POST to a URL really depends on the external view of whether you're directly updating a resource (PUT) or if a request to one resource makes changes that the user is responsible for to another (POST)
[17:20:59] DEA7TH: has joined #RubyOnRails
[17:21:05] workmad3: in the wiki example, the revision tracking is an internal detail that the user isn't responsible for, so PUT to a /post or /article resource is very appropriate :)
[17:21:32] smathy: BrazenBraden, nothing wrong with your setup, must be something in the docker space.
[17:21:34] johnflux: has joined #RubyOnRails
[17:21:42] hnanon: has joined #RubyOnRails
[17:21:57] stannard_: has joined #RubyOnRails
[17:22:03] hnanon: I need some help modeling data.
[17:22:10] ModusPwnens: So the external representation of your resource is provided via URLs and it could be the case that for every resource you have, there is a corresponding Updater/Creator resource, but you don't expose that to consumers?
[17:22:11] matthewd: USvER: #read ?
[17:22:13] jgt: has joined #RubyOnRails
[17:22:20] hnanon: I have an Industry model and a Market model.
[17:22:25] ModusPwnens: and instead you just tell them to do an update to the thing they think they are updating conceptually?
[17:22:32] workmad3: ModusPwnens: pretty much
[17:22:42] matthewd: USvER: It doesn't do literally what you said, but what you actually said sounds like a very odd thing to want to do
[17:22:42] zorbash: has joined #RubyOnRails
[17:22:56] hnanon: I want the cost of a service to be built from the industry and market.
[17:23:05] qejk: has joined #RubyOnRails
[17:23:07] ModusPwnens: workmad3: What happens if you have to create several different objects to update one object and that is blowing up your controller.
[17:23:09] workmad3: ModusPwnens: the typical example for a POST is of course the 'collection' resource (e.g. /articles)... you can POST to that to request a new sub-resource gets created in the collection
[17:23:21] hnanon: Where should I put that service's price?
[17:23:27] workmad3: ModusPwnens: then it sounds like you have an internal design issue :P
[17:23:44] USvER: matthewd, i have STDOUT from script wich is IO class, and i want to perform action as soon as script outputed something
[17:23:51] hnanon: Should I have a separate table for Price?
[17:24:03] brazenbraden: smathy, thanks, will dig around further
[17:24:09] smathy: USvER, you might want to use the four arg select instead.
[17:24:52] USvER: smathy, you mean IO::select?
[17:25:00] smathy: USvER, yes.
[17:25:05] pixelhandler: has joined #RubyOnRails
[17:25:08] matthewd: USvER: Yeah, read_nonblock + select
[17:25:11] smathy: BrazenBraden, you're welcome.
[17:25:24] USvER: smathy, matthewd, thanks
[17:25:32] arBmind: has joined #RubyOnRails
[17:25:46] stannard_: has joined #RubyOnRails
[17:26:11] smathy: USvER, you're welcome.
[17:27:04] smathy: hnanon, what's a service? You only mentioned Industry and Market.
[17:27:42] hnanon: smathy: Ok. I have Industry, Market, and Leads
[17:27:59] hnanon: I want the price of a lead to depend on the market and industry selected.
[17:28:38] [Butch]: has joined #RubyOnRails
[17:28:49] hnanon: NYC + Law = Higher lead price
[17:29:04] hnanon: Cleveland + Law = Lower lead price
[17:29:10] smathy: So a Lead belongs_to :market and belongs_to :industry (see how I actually speak in code here? (I can't believe I'm STILL saying this to you))
[17:29:19] bmalum: has joined #RubyOnRails
[17:29:35] basiles: has joined #RubyOnRails
[17:29:38] hnanon: smathy: I have that.
[17:29:53] adac: has joined #RubyOnRails
[17:29:53] smathy: hnanon, that was a question, which you've now answered.
[17:30:27] hnanon: I wasn't clear then.
[17:30:33] guidohcosta: has joined #RubyOnRails
[17:30:36] rhino-sic: how can I add secure to the set-cookie for a session?
[17:30:52] smathy: hnanon, so if a Lead has those associations, then just put price in Lead. It's not like a Lead is associated with more than one market or industry, so the price will always be fixed for a given lead.
[17:31:13] rhino-sic: I am using a cache store, and tried doing :secure => true, but it does not work
[17:31:59] s2013: has joined #RubyOnRails
[17:32:08] hnanon: But Lead prices are dynamic.
[17:32:08] TheNet: has joined #RubyOnRails
[17:32:50] hnanon: Hmm. Let me think about how I can explain this better.
[17:32:57] brazenbraden: if im starting sidekiq from an init script, will it know about the redis address? does it by default know where to look?
[17:33:18] roshanavand: has joined #RubyOnRails
[17:33:28] s2013: ok this is a really stupid question but how do i make this work? "something #{if something} something else #{ end }"
[17:33:36] s2013: having brain fart
[17:33:58] rhino-sic: put the if after the something
[17:34:08] rhino-sic: #{something if something}
[17:34:10] stannard: has joined #RubyOnRails
[17:35:28] rhizome: s2013: use a helper
[17:35:38] siaW: has joined #RubyOnRails
[17:35:59] hnanon: Let me give you an example of my proposed solution. A lead has a base price, x. I can add a multiplier column to both Industry and Market. NYC would be 2x, Law would be 2x. Cleveland would be 1.2x, Plumbing would be 1.3x, for example. So when a lead comes in, I'll do that math and charge that amount for the lead.
[17:36:02] s2013: thing is that its a big block of text
[17:36:07] s2013: with \n\n and \t
[17:36:54] rhizome: how is that a thing?
[17:37:32] TheNet: has joined #RubyOnRails
[17:37:40] shmilan: has joined #RubyOnRails
[17:37:40] workmad3: s2013: maybe use ERB
[17:37:53] s2013: i am using erb. let me paste actual code, one sec
[17:38:06] smathy: rhino-sic, can I question your approach here instead.
[17:38:11] workmad3: s2013: then why do you have standard ruby string interpolation :P
[17:38:15] rhino-sic: smathy: sure
[17:38:33] workmad3: s2013: in erb, it would be "something <% if condition %> something else <% end %>"
[17:38:46] smathy: rhino-sic, ...your question suggests that your setup makes you unsure that you'll have an SSL connection to the browser at a time when you're passing privileged data to them.
[17:39:09] smathy: rhino-sic, that suggests you'd also be unsure that you'd be receiving privileged data over SSL.
[17:39:12] northfurr: has joined #RubyOnRails
[17:39:23] smathy: rhino-sic, you should fix that instead, so you're always certain it's all happening over SSL.
[17:39:23] rhizome: content_tag(:p, "something #{'otherthing' if blah} something")
[17:39:53] s2013: yeah that wont work though
[17:40:05] rhizome: oh, i'm just joking
[17:40:22] riotjones: has joined #RubyOnRails
[17:40:22] smathy: hnanon, !gist your models instead
[17:40:22] helpa: hnanon: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:40:30] rhino-sic: smathy: this is true, I have multidomain site, only one domain is ssl. I only want to pass the cookie when its ssl
[17:41:04] ericjphillips: has joined #RubyOnRails
[17:41:10] rhizome: "except this one case" is always a favorite spec
[17:41:55] hnanon: smathy: Nothing is written yet. Just thinking about how to handle that before beginning.
[17:41:56] bmalum: has joined #RubyOnRails
[17:42:00] s2013: https://gist.github.com/ss2k/6edb46595bb1651dfc0f here is the gist of it.. except the text inside the block is much longer
[17:42:03] smathy: rhino-sic, well Rails will always use the full hostname for the :domain of the cookie, so as long as that host is always SSL then the cookie will always be protected.
[17:42:05] baweaver: has joined #RubyOnRails
[17:42:20] s2013: i just put <% if .. to show where it would go
[17:42:55] workmad3: s2013: ok, so that string *isn't* erb :P
[17:43:09] workmad3: s2013: use a helper and construct the string in sections with that
[17:43:21] s2013: i was wondering if there was another way of doing it
[17:43:31] Spami: has joined #RubyOnRails
[17:43:34] workmad3: s2013: why do you need another way of doing it?
[17:43:44] gerep: has joined #RubyOnRails
[17:43:46] baweaver: has joined #RubyOnRails
[17:43:47] s2013: to just put it there
[17:43:53] siaW: has joined #RubyOnRails
[17:44:08] rhizome: a helper is that wau
[17:44:18] workmad3: s2013: you could have written the helper in the time you've spent asking how to achieve this... you could have written this in the time since being told to use a helper :P
[17:44:19] Snarkz: has joined #RubyOnRails
[17:44:28] smathy: hnanon, all that 1x and 2x and 1.5x is all very interesting, but, the Lead already has a fixed association to a single Market and a single Industry, so if the multipliers are in Market and Industry then it will still be a fixed price for that Lead. This "base price" for the lead is useless unless the multipliers in Market and Industry are changing, and even then you're still talking about a single method in Lead like: def price; base_price *
[17:44:28] smathy: ( industry.multiplier + market.multiplier); end # or something like that.
[17:44:49] s2013: yeah true but for future refernece as well
[17:44:59] joserc87: has joined #RubyOnRails
[17:45:10] rhizome: "future reference" is why i suggested a helper
[17:45:20] workmad3: s2013: well, for future reference - you're best off using a helper and constructing the string with normal ruby :P
[17:45:22] nanuko: has joined #RubyOnRails
[17:45:33] darkxploit: has joined #RubyOnRails
[17:45:52] ModusPwnens: As a separate question, when we receive an update request, we have to create a few objects to send along with the request. These objects have attributes that are populated using the posted parameters, but they aren't just copied. There is some amount of massaging and business logic that goes on.
[17:46:09] ModusPwnens: How do you avoid bloating your controller with the logic for creating those request objects?
[17:46:39] ModusPwnens: Do people typically make a helper class that serves to just massage those parameters and create request objects out of theM?
[17:46:57] gerep: Can someone please help me find my error with a delayed job that is always running? https://gist.github.com/gerep/c85a190392a840705a0c
[17:47:15] hnanon: smathy: But combinations of Markets and Industries affect the lead price.
[17:47:19] rhizome: ModusPwnens: service class is the generic solution name, but yeah
[17:47:30] hnanon: That's why I thought of using the multipliers.
[17:47:42] stesind: has joined #RubyOnRails
[17:47:44] gerep: It is a simple delayed job class that returns if the environment is development, which is the case now but the foreman console shows it as RUNNING and it never stop
[17:47:58] s2013: yeah true
[17:48:02] s2013: thanks rhizome and workmad3
[17:48:44] htmldrum: has joined #RubyOnRails
[17:48:56] gerep: Shouldn't this job run and be complete immediately?
[17:49:02] hnanon: a lead that is associated with the Industry "law" and the Market "NYC" is priced higher than a lead that comes in for "plumbing" and "NYC."
[17:49:25] smathy: hnanon, but you said that a Lead belongs_to :industry and belongs_to :market. So THERE'S ONLY ONE COMBINATION!
[17:49:46] joserc87: has joined #RubyOnRails
[17:49:48] hnanon: Yes, for that particular lead.
[17:50:00] smathy: hnanon, right, so for a given lead the PRICE IS FIXED FOR THAT LEAD.
[17:50:06] smathy: ...so just store it
[17:50:31] rhizome: would "plumbing" really have an industry multiplier? seems like it's a fixed price with a location multiplier
[17:50:42] northfurr: has joined #RubyOnRails
[17:50:47] diegoviola: has joined #RubyOnRails
[17:50:49] smathy: rhizome, so maybe it's multiplier is just 1x
[17:50:57] siddart: has joined #RubyOnRails
[17:51:02] hnanon: rhizome: It would, relative to other industries.
[17:51:03] wharr: has joined #RubyOnRails
[17:51:11] Brando753: has joined #RubyOnRails
[17:51:55] rhizome: what does it mean that plumbing is 1x and window washing is 1.2x? when would that ever be a factor, why not just price them out at the actual price?
[17:52:22] gerep: Other workers are running fine
[17:52:35] rhizome: how are law and plumbing compared to derive an industry multiplier, i guess is my quandary.
[17:52:44] smathy: rhizome, I'm guessing that somewhere, he'll have a base price for a given job - but y'know how these onion problems go.
[17:53:08] hnanon: rhizome: By average size of a sale.
[17:53:23] joserc87: has joined #RubyOnRails
[17:53:27] tubbo: you're an onio
[17:53:42] hnanon: A lawyer can expect to generate may be 5k from a lead. A plumber, maybe 500.
[17:54:15] MaDErroR123: has joined #RubyOnRails
[17:54:19] symbole: has joined #RubyOnRails
[17:54:19] kalusn: has joined #RubyOnRails
[17:54:39] hnanon: smathy: So a lead is generated. I have a price column in the Leads table. Tell me how I should fill that value.
[17:55:05] TheNet: has joined #RubyOnRails
[17:55:22] symbole: Can anyone recommend a design pattern for when a rails application starts to have mailers with advanced logic? I don't like scheduling mailers in models or putting all the logic in the mailer itself.
[17:55:31] smathy: gerep, sorry, no idea about DJ - maybe because `perform` is returning nil?
[17:55:42] smathy: gerep, put some debug in there.
[17:55:43] cnk: has joined #RubyOnRails
[17:56:00] roshanavand: has joined #RubyOnRails
[17:56:02] siaW: has joined #RubyOnRails
[17:56:04] gerep: smathy:I made it return true and it still doesn't work, adding a debug is doesn't stop there
[17:56:32] madebymarkca: has joined #RubyOnRails
[17:56:44] wharr: I have two rails methods that I want to redirect to the same action after completion. Can I use an after filter for this?
[17:57:59] rhizome: wharr: is typing "redirect_to foo_action_path" a problem?
[17:58:12] wharr: rhizome I just don't want to type it twice
[17:58:26] FailBit: you'll save more effort typing it twice
[17:58:33] FailBit: then writing an after_action
[17:58:35] rhizome: well that's all i got. maybe someone else has some magic to offer
[17:58:57] wharr: FailBit not trying to save effort, it's just something I want to do
[17:59:00] smathy: hnanon, I really have no idea about what you're doing yet, a Lead is generally something that a sales team - with an existing list of products/services generates. In that scenario the product/service that the lead would be being generated for would already be associated with an industry, and would already have a base price. So the only multiplier would be the information about the prospect, eg. which market or location (or currency) they
[17:59:07] FailBit: wharr: then sure
[17:59:21] smathy: gerep, I meant a debug to just log, so you at least know the `process` is being entered.
[17:59:21] pawnbox: has joined #RubyOnRails
[17:59:29] FailBit: after_action :redirect_to_place, only: [:endpoint]
[17:59:43] wharr: I tried it out but it's trying to find a template for my endpoints
[17:59:57] FailBit: it will only be called if no redirect/render occurred in the main action
[18:00:03] MaDErroR_: has joined #RubyOnRails
[18:00:23] FailBit: it will also lookup the template name for the action itself
[18:00:32] FailBit: not for the called method
[18:00:44] htmldrum: has joined #RubyOnRails
[18:01:00] FailBit: metaphorically or literally?
[18:01:04] wharr: is there a way to supress template lookup?
[18:01:11] ijiijijjjijiij: has joined #RubyOnRails
[18:01:22] FailBit: you can specify which template to render, or not to render
[18:01:28] FailBit: redirect_to bypasses render
[18:01:59] FailBit: render action: "new" #render views/<collection>/new
[18:02:22] devdazed: has joined #RubyOnRails
[18:02:36] USvER: matthewd, does IO.each waits(block) EOF or it wait for each "line"?
[18:02:45] smathy: wharr, just call the :endpoint method from your other methods, don't use the callback.
[18:04:35] hnanon: smathy: I guess the problem is that I didn't define what a lead is. For my purposes, it's a sale, with a price upon generation, depending on the market and industry it's associated with.
[18:04:48] FailBit: !xyproblem
[18:04:51] matthewd: USvER: It yields each line as available
[18:05:19] craysiii: has joined #RubyOnRails
[18:05:19] USvER: matthewd, nice
[18:05:30] smathy: hnanon, you should probable call it Sale then.
[18:05:52] EminenceHC: has joined #RubyOnRails
[18:06:04] USvER: matthewd, that means i don't actualy need the select, i only need each with custom separator(in my cas it's "\r")
[18:06:39] petricore: has joined #RubyOnRails
[18:06:42] diegoviola: has joined #RubyOnRails
[18:06:46] USvER: matthewd, stdout.each("\r") do |line|
[18:07:02] erich: has joined #RubyOnRails
[18:07:10] diegoviola: has joined #RubyOnRails
[18:07:17] USvER: matthewd, ot will wait each line separately... nice
[18:09:11] K3VA: has joined #RubyOnRails
[18:10:01] qwertme: has joined #RubyOnRails
[18:10:12] petricore: has joined #RubyOnRails
[18:10:16] avemestr: has joined #RubyOnRails
[18:10:39] TheNet: has joined #RubyOnRails
[18:11:08] stesind: has joined #RubyOnRails
[18:12:13] podman: has joined #RubyOnRails
[18:13:10] baweaver: has joined #RubyOnRails
[18:14:53] safety_cut: has joined #RubyOnRails
[18:15:18] baweaver: has joined #RubyOnRails
[18:15:35] Linuus: has joined #RubyOnRails
[18:16:10] alevy-: has joined #RubyOnRails
[18:16:38] willardg: has joined #RubyOnRails
[18:17:09] TheNet: has joined #RubyOnRails
[18:18:12] nyaa: has joined #RubyOnRails
[18:19:37] TheNet: has joined #RubyOnRails
[18:19:41] i: has joined #RubyOnRails
[18:20:11] dopie: has joined #RubyOnRails
[18:20:51] bbrowning: has joined #RubyOnRails
[18:22:10] TheNet: has joined #RubyOnRails
[18:23:23] bbrowning: has joined #RubyOnRails
[18:25:30] hobodave: has joined #RubyOnRails
[18:26:45] yfeldblum: has joined #RubyOnRails
[18:26:55] jenrzzz: has joined #RubyOnRails
[18:26:56] guidohcosta: has joined #RubyOnRails
[18:27:00] s2013: hmm in haml how do i pass in current_user.name to a data field
[18:28:06] rromanch_: has joined #RubyOnRails
[18:28:07] momomomomo: has joined #RubyOnRails
[18:28:31] s2013: nvm i thikn i got it
[18:29:38] hephaestus_rg: has joined #RubyOnRails
[18:29:41] chills42: has joined #RubyOnRails
[18:30:06] l_tonz: has joined #RubyOnRails
[18:30:07] gusrub: has joined #RubyOnRails
[18:30:10] epoch2: has joined #RubyOnRails
[18:31:13] Guest15240: has joined #RubyOnRails
[18:32:15] TheNet: has joined #RubyOnRails
[18:32:36] chills42: has joined #RubyOnRails
[18:33:16] ddv: s2013: on an element {data: {sexy: 'ddv'}}
[18:33:25] gusrub: has joined #RubyOnRails
[18:34:13] ddv: with date field you mean data attributes?
[18:34:41] gusrub: has joined #RubyOnRails
[18:34:42] TheNet: has joined #RubyOnRails
[18:37:09] dionysus69: has joined #RubyOnRails
[18:38:10] ericjphillips: has joined #RubyOnRails
[18:39:46] TheNet: has joined #RubyOnRails
[18:39:57] stevednd: has joined #RubyOnRails
[18:40:54] user1138: has joined #RubyOnRails
[18:41:14] riotjones: has joined #RubyOnRails
[18:42:07] nYmo: has joined #RubyOnRails
[18:42:43] nyaa: has joined #RubyOnRails
[18:46:42] ror15: has joined #RubyOnRails
[18:46:49] youngbaks: has joined #RubyOnRails
[18:46:58] manfrin: has joined #RubyOnRails
[18:48:53] meoblast001: has joined #RubyOnRails
[18:48:53] dikaio: has joined #RubyOnRails
[18:49:40] njero: has joined #RubyOnRails
[18:49:46] TheNet: has joined #RubyOnRails
[18:50:13] chrisja: has joined #RubyOnRails
[18:54:13] a1fa: hi rhizome
[18:54:53] a1fa: in a AR model, self. means whats already stored for the record?
[18:55:29] A124: has joined #RubyOnRails
[18:55:53] atmosx: has joined #RubyOnRails
[18:55:54] sugaryourcoffee: has joined #RubyOnRails
[18:55:57] SteenJobs: has joined #RubyOnRails
[18:55:57] TheNet: does devise prevent associations from being deleted with a devise record? when I call user.destroy rails doesn't delete any of the associated records (it's a has_many, belongs_to relationship)
[18:56:24] netzfisch: has joined #RubyOnRails
[18:57:01] rhizome: a1fa: could be unsaved within a method. it means (something like) the model class in general when used in a method definition
[18:57:19] pabvid: has joined #RubyOnRails
[18:57:47] rhizome: TheNet: do you have any "dependent:" directives?
[18:57:52] TheNet: rhizome: nope
[18:57:56] craysiii: TheNet i think you need to use dependent:
[18:57:58] rhizome: that's how you do that
[18:58:15] craysiii: oops im a bit late :)
[18:58:17] TheNet: I thought dependent was if you didn't want rails to delete associated records
[18:58:24] rhizome: irc is async
[18:58:52] rhizome: TheNet: "dependent: :destroy" means you don't want to delete?
[18:58:52] a1fa: rhizome: how do i access what's saved for the record without having to "fetch" it again
[18:59:06] craysiii: i was looking at another screen while typing :P
[18:59:18] a1fa: do i use controller's set ?
[18:59:20] TheNet: rhizome: makes sense I guess
[18:59:22] jeffleeismyhero: has joined #RubyOnRails
[18:59:34] TheNet: that goes on the has_many, right?
[18:59:34] rhizome: a1fa: not making sense
[19:00:29] a1fa: rhizome: i need to check if a record has a status = 10, that means read only record
[19:00:43] jeffleeismyhero: When using capistrano for deployments, delayed_job starts but doesn???t see email configuration values from secrets.yml (Rails.application.secrets). If I start delayed_job by logging in, emails work fine.
[19:00:47] a1fa: rhizome: right now i have before_save :check_status
[19:01:30] a1fa: rhizome: it does error.add if status == 10
[19:01:31] rhizome: so, before save you have all the attributes as you set them
[19:02:34] TheNet: has joined #RubyOnRails
[19:03:19] a1fa: rhizome: so instead of before_save i should do validate?
[19:03:22] rhizome: but there's easier ways of making those records read only
[19:03:28] a1fa: all ears
[19:03:52] rhizome: def readonly? status == 10; end
[19:04:45] rhizome: doesn't work with delete/destroy tho
[19:04:50] annlewis: has joined #RubyOnRails
[19:05:24] manfrin_: has joined #RubyOnRails
[19:05:26] codesoda: has joined #RubyOnRails
[19:05:31] a1fa: no need to delete/destroy at the moment, i will try this
[19:05:37] a1fa: but what if i need to set status == 10
[19:05:37] rhizome: unless you implement them yourself
[19:05:40] tvon: has joined #RubyOnRails
[19:05:55] rhizome: you don't set status == 10, you set status = 10
[19:06:09] FailBit: I keep getting this error when I try to prepare my test env
[19:06:12] FailBit: NoMethodError: undefined method `[]' for nil:NilClass
[19:06:14] FailBit: https://gist.github.com/liamwhite/26b974a5dd89cc52c935
[19:06:19] FailBit: gist of error log^
[19:07:07] srinidhi: has joined #RubyOnRails
[19:07:11] SteenJobs_: has joined #RubyOnRails
[19:07:52] bmurt: has joined #RubyOnRails
[19:09:34] jeffleeismyhero: Why would the secret values (which come from ENV) not be accessible by the capistrano task?
[19:09:54] symbol__: has joined #RubyOnRails
[19:09:55] rhizome: FailBit: google hints at bad characters in database.yml
[19:10:26] tubbo: jeffleeismyhero: how are you loading them into the environment?
[19:11:02] FailBit: rhizome: ta
[19:11:10] FailBit: the problem was that I didn't set up a test db
[19:11:26] rhizome: that'll do it
[19:11:40] jeffleeismyhero: They are loaded by RVM in the rvm environment file: /usr/local/rvm/gems/ruby-2.2.2@application-production/environment
[19:12:15] rhizome: jeffleeismyhero: maybe bundle exec
[19:12:20] kadoppe: has joined #RubyOnRails
[19:12:37] jeffleeismyhero: delayed_job is started with: execute :bundle, :exec, :'bin/delayed_job', args, :start
[19:13:14] dionysus69: has joined #RubyOnRails
[19:18:40] guidohcosta_: has joined #RubyOnRails
[19:18:41] gusrub: has joined #RubyOnRails
[19:18:58] krisquigley: has joined #RubyOnRails
[19:19:52] jeffleeismyhero: It seems that capistrano loads .bash_profile on some systems and .bashrc on others. On CentOS, loading the RVM environment file from within .bashrc seems to fix the issue.
[19:20:00] jeffleeismyhero: I was loading it in .bash_profile.
[19:20:05] nettoweb: has joined #RubyOnRails
[19:20:21] USvER: has joined #RubyOnRails
[19:20:47] chills42: has joined #RubyOnRails
[19:22:11] smathy: FailBit, FWIW - probably if you took a look at the code being called in the stacktrace you would have seen that yourself. The second line passes: ActiveRecord::Base.configurations['test'] - which is obviously nil.
[19:23:05] USvER: has joined #RubyOnRails
[19:24:42] baweaver: has joined #RubyOnRails
[19:24:52] adac: has joined #RubyOnRails
[19:25:03] renegadeandy: Does anybody know why when i press my submit button on this big form...why no HTTP Post is performed, and nothing actually is send to rails : https://gist.github.com/renegadeandy/638359736b8d5a7febd5
[19:25:10] Ergo: has joined #RubyOnRails
[19:25:23] salinn: has joined #RubyOnRails
[19:25:26] greengriminal: has joined #RubyOnRails
[19:25:58] blackmesa: has joined #RubyOnRails
[19:26:14] tubbo: jeffleeismyhero: capistrano actually is just following the conventions of whatever shell you use, and what kind of shell (login or, uhh...regular)
[19:26:25] baweaver: has joined #RubyOnRails
[19:26:43] tubbo: jeffleeismyhero: for example, ~/.bashrc is only executed for login shells, which i don't believe capistrano does if you `set :pty`
[19:26:50] tubbo: s/does/uses
[19:27:12] tubbo: jeffleeismyhero: sorry, replace bashrc with bash_profile in what i said :)
[19:27:22] skyjumper: has joined #RubyOnRails
[19:27:44] skyjumper: anyone know of a way to use gems (ex: in rails console) that aren't in the Gemfile?
[19:28:46] paolodoors: has joined #RubyOnRails
[19:29:43] Stuffness: has joined #RubyOnRails
[19:30:01] hfp: I'd like to group my paginated activerecords by year and month so I can add the 'spending' column from every entry and get a monthly total. I'm not sure how to do that though. for now I have `@model.group_by{ |m| m.date.strftime('%Y-%m')}`. I can extract `year-month` in my view with that but I don't know how to add the totals for specific columns in the controller instead of passing an array of records to
[19:30:05] tubbo: skyjumper: use irb? :)
[19:30:07] hfp: my view
[19:30:17] hephaestus_rg: has joined #RubyOnRails
[19:31:22] acti0nman: has joined #RubyOnRails
[19:31:24] tubbo: skyjumper: i think you can also set BUNDLE_DISABLE_SHARED_GEMS: '0' in your .bundle/config but not sure if that causes other issues
[19:31:26] SmOkE_RU: has joined #RubyOnRails
[19:33:49] DLSteve: has joined #RubyOnRails
[19:35:20] w0b: has joined #RubyOnRails
[19:36:15] pierre: has joined #RubyOnRails
[19:37:04] Oog: has joined #RubyOnRails
[19:37:49] smathy: renegadeandy, because some JS is in play.
[19:38:04] codesoda: has joined #RubyOnRails
[19:38:23] greengriminal: has joined #RubyOnRails
[19:38:24] Snarkz: has joined #RubyOnRails
[19:39:39] pierre: has left #RubyOnRails: ()
[19:39:39] RockLee: has joined #RubyOnRails
[19:42:00] safety_cut: has joined #RubyOnRails
[19:42:43] tubbo: jiriki: def
[19:43:40] Oog: from PostgreSQLAdapter is it possible to get the underlying PG:Connection? i need it to check http://www.rubydoc.info/gems/pg/PG/Connection#transaction_status-instance_method
[19:44:05] tubbo: Oog: yeah you can use ActiveRecord::Base.connection
[19:44:06] USvER: has joined #RubyOnRails
[19:44:20] Oog: that gives me a ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
[19:44:30] matthewd: Oog: .connection again, I think?
[19:44:36] Oog: i thought so but no
[19:44:43] Oog: and i dont see something in the docs http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html
[19:45:03] roshanavand: has joined #RubyOnRails
[19:45:13] sugaryou1: has joined #RubyOnRails
[19:46:02] matthewd: raw_connection
[19:46:07] A124: has joined #RubyOnRails
[19:48:58] Oog: thanks!
[19:49:06] Oog: how did you find that? shouldnt it be in the docs?
[19:49:21] Oog: i see had to go to parent class
[19:49:33] tubbo: yeah i thought it was :D
[19:50:21] matthewd: I found it by searching the code for something that was exposing @connection... but yes, it is documented on AbstractAdapter :)
[19:50:33] matthewd: I just like doing things the hard way
[19:51:33] nfk: has joined #RubyOnRails
[19:51:45] Snarkz: has joined #RubyOnRails
[19:52:36] mary5030: has joined #RubyOnRails
[19:53:26] mary5030: has joined #RubyOnRails
[19:55:16] ror15: has joined #RubyOnRails
[19:56:47] ror15: has joined #RubyOnRails
[19:57:13] codelahoma: has joined #RubyOnRails
[19:57:42] s2013: has joined #RubyOnRails
[19:59:27] a1fa: rhizome: def readonly? and i still have a chicken and the egg problem
[19:59:28] Thomas-0725: has joined #RubyOnRails
[19:59:48] a1fa: if update with status = 10, it thinks the record is readonly
[20:00:41] ngscheurich: has joined #RubyOnRails
[20:01:23] htmldrum: has joined #RubyOnRails
[20:01:49] jgt: has joined #RubyOnRails
[20:03:10] codesoda: has joined #RubyOnRails
[20:03:42] gusrub: has joined #RubyOnRails
[20:04:31] bmalum: has joined #RubyOnRails
[20:05:12] salinn: has joined #RubyOnRails
[20:06:53] salinn: has left #RubyOnRails: ()
[20:07:21] a1fa: rhizome: temprorary work around, i used controller to set @record = Record.where("status != 10")
[20:07:29] dideler: has joined #RubyOnRails
[20:07:47] siddart: has joined #RubyOnRails
[20:07:55] a1fa: that way, you cant pull recorords with status 10 into edit screen.. right or wrong
[20:08:09] krisquigley: has joined #RubyOnRails
[20:11:30] neanderslob: has joined #RubyOnRails
[20:11:39] __butch__: has joined #RubyOnRails
[20:13:25] VeryBewitching: has joined #RubyOnRails
[20:13:38] jenrzzz: has joined #RubyOnRails
[20:14:43] jun: has joined #RubyOnRails
[20:15:04] shmilan: has joined #RubyOnRails
[20:15:29] SteenJobs: has joined #RubyOnRails
[20:16:34] SPYGAME: has joined #RubyOnRails
[20:18:34] Dopagod: has joined #RubyOnRails
[20:21:41] safety_cut: has joined #RubyOnRails
[20:23:15] nullwarp: has joined #RubyOnRails
[20:24:29] nullwarp: hey guys, i have this AR qury - @servers = Server.joins(:heartbeats).where('servers.last_heartbeat = heartbeats.created_at') (server has many heartbeats)
[20:24:46] JohnHirbour: has joined #RubyOnRails
[20:24:47] nullwarp: I just want it to pull one because there are potentially a lot of heartbeats, and it does do that in the query in the log
[20:25:04] nullwarp: but then when i try to access it in the view it immediately just does select * from heartbeats and pulls them all anyway
[20:25:53] ngscheurich: has joined #RubyOnRails
[20:26:09] smathy: nullwarp, add an `includes(:heartbeats)` to your query for the eager loading behavior. More here: http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
[20:28:01] nullwarp: sweet that did it, thank you smathy
[20:28:11] smathy: nullwarp, you're welcome.
[20:29:22] hahuang65: has joined #RubyOnRails
[20:29:57] doodlehaus: has joined #RubyOnRails
[20:31:32] Maletor: has joined #RubyOnRails
[20:33:32] rgtk: has joined #RubyOnRails
[20:33:41] safety_cut: has joined #RubyOnRails
[20:34:01] erich: has joined #RubyOnRails
[20:34:20] nanuko: has joined #RubyOnRails
[20:34:55] rhizome: i'd make an association for latest
[20:35:03] arBmind: has joined #RubyOnRails
[20:35:13] benlieb: has joined #RubyOnRails
[20:36:00] Coldblackice: has joined #RubyOnRails
[20:38:03] nettoweb: has joined #RubyOnRails
[20:40:18] Cervajz: has joined #RubyOnRails
[20:42:02] riotjones: has joined #RubyOnRails
[20:42:24] rickmasta: has joined #RubyOnRails
[20:43:18] safety_cut: has joined #RubyOnRails
[20:44:14] ijiijijjjijiij: has joined #RubyOnRails
[20:47:05] codesoda: has joined #RubyOnRails
[20:49:17] agdr: has joined #RubyOnRails
[20:51:06] pulpfiction: has joined #RubyOnRails
[20:51:17] doodlehaus: has joined #RubyOnRails
[20:51:55] pulpfiction: $ rake routes | grep edit_medicament_variant ==> edit_medicament_variant GET /cub/medicaments/:medicament_id/variants/:id/edit(.:format) medicament_variants#edit
[20:52:08] pulpfiction: why using edit_medicament_variant_url gives me a
[20:52:34] pulpfiction: nevermind, got it hehe
[20:54:41] baweaver: has joined #RubyOnRails
[20:57:27] ayonkhan: has joined #RubyOnRails
[20:57:33] EminenceHC: has joined #RubyOnRails
[20:59:21] yfeldblum: has joined #RubyOnRails
[21:00:04] mikecmpbll: has joined #RubyOnRails
[21:00:21] paolodoors: has joined #RubyOnRails
[21:00:27] guidohcosta: has joined #RubyOnRails
[21:00:40] pulpfiction: just something i learned today: rubber duck debugging
[21:01:32] safety_cut: has joined #RubyOnRails
[21:02:55] jenrzzz: has joined #RubyOnRails
[21:03:42] stannard: has joined #RubyOnRails
[21:04:09] alasi: has joined #RubyOnRails
[21:04:28] w0b: any action going on atm?
[21:04:43] nanuko: has joined #RubyOnRails
[21:04:52] tubbo: w0b: nope, rails is dead
[21:05:01] tubbo: everybody go home party's over
[21:05:02] slash_nick: w0b: long live rails!
[21:05:25] sdwrage: has joined #RubyOnRails
[21:08:28] [Butch]: has joined #RubyOnRails
[21:10:14] ijiijijjjijiij: guyz guyz guyz what if we did SOA with PHP and AJAX
[21:10:45] blackmesa: has joined #RubyOnRails
[21:12:46] iamjarvo_: has joined #RubyOnRails
[21:13:03] hephaestus_rg: has joined #RubyOnRails
[21:13:12] diego4: has joined #RubyOnRails
[21:13:49] diego4: has joined #RubyOnRails
[21:14:24] diegoviola: ijiijijjjijiij: stop trolling
[21:15:26] diegoviola: SPAs are very annoying to use
[21:15:38] diegoviola: not everyone likes big blobs of JS
[21:16:33] wethu: has joined #RubyOnRails
[21:16:37] ProLoser: has joined #RubyOnRails
[21:16:55] EminenceHC: has joined #RubyOnRails
[21:17:20] rodferso1: has joined #RubyOnRails
[21:19:51] PlasmaStar: has joined #RubyOnRails
[21:20:30] yfeldblum: has joined #RubyOnRails
[21:21:03] alasi: How do you guys do frontend dev with a rails app? Set up a quick http server, or run the whole elephant as you work?
[21:21:03] PlasmaStar: has joined #RubyOnRails
[21:21:14] Scripore: has joined #RubyOnRails
[21:21:45] slash_nick: alasi: what's your front end composed of? just views? backbone app? lots of backbone apps? ember?
[21:22:00] slash_nick: lots of ember apps?
[21:22:12] alasi: and some preprocessed views .erb views but that might change
[21:22:37] fschuindt: has joined #RubyOnRails
[21:23:11] fschuindt: Folks, I want to learn RSpec. But every course/cast/book I found is kinda outdated. Any tip?
[21:23:19] slash_nick: alasi: i use ember for some features in our rails app... if i'm developing that feature, i just run the ember app (sans rails app)... I set ember up so that i can use mocked responses (faking requests to rails)
[21:23:20] stesind: has joined #RubyOnRails
[21:23:24] diego4: has joined #RubyOnRails
[21:23:33] diego4: has joined #RubyOnRails
[21:23:49] alasi: slash_nick: ah makes sense. But do you edit the view itself?
[21:24:19] alasi: Like views/
[21:24:27] TheNet: has joined #RubyOnRails
[21:24:33] slash_nick: alasi: i'm not sure waht you're asking... in the ember app, i work only with the content that gets embedded in the rails view... so when working im ember, i'm working sans layout and any other markup that's defined in rails
[21:24:37] slash_nick: so, div by div
[21:24:48] alasi: Ah so you're componentizing it
[21:24:59] slash_nick: this week, yeah :P
[21:25:04] slash_nick: next week who knows lol
[21:25:14] momomomomo: has joined #RubyOnRails
[21:25:19] alasi: This is gonna sound really silly
[21:25:22] alasi: do you just refresh
[21:25:33] alasi: or use browsersync / grunt ?
[21:25:42] rromanch_: has joined #RubyOnRails
[21:25:58] baweaver: has joined #RubyOnRails
[21:26:04] slash_nick: ember has some watch thingy to reload views when code changes
[21:26:14] rgtk: has joined #RubyOnRails
[21:26:29] slash_nick: so i don't refresh... the latter, probably... haven't worked with angular, so i dont know what it has/wants you to use for that
[21:26:59] guidohcosta: has joined #RubyOnRails
[21:27:15] IFrank00: has joined #RubyOnRails
[21:27:18] Skelz0r: has joined #RubyOnRails
[21:27:43] ishikawa91: fschuindt not much conceptually has changed. the best way to write a small tool, library, or whatever scratches your itch but do it using tdd with rspec
[21:27:47] FailBit: another reason to eat shit rspec
[21:27:50] FailBit: /home/derpibooru/derpibooru/app/controllers/posts_controller.rb:1:in `<top (required)>': uninitialized constant ApplicationController (NameError)
[21:28:24] ishikawa91: take a look at this https://www.relishapp.com/rspec/rspec-rails/docs/gettingstarted
[21:28:26] pwnd_nfsw: lolwdf FailBit
[21:28:26] Thomas-0725: has joined #RubyOnRails
[21:28:40] ishikawa91: and then this https://semaphoreci.com/community/tutorials/getting-started-with-rspec
[21:30:14] blackhuey: has joined #RubyOnRails
[21:30:19] Macaveli: has joined #RubyOnRails
[21:30:32] ModusPwnens: Am I thinking about how to structure my service objects wrong? E.g. I have a CreateCat service obj and a CreateDog service obj. Both of these have some common behaviour generic to both of them. How do I share that between two service objects? Concerns?
[21:31:05] ModusPwnens: Or do I make another service obj called CreateHousePet that both of those service objects call?
[21:31:06] ciree: ModusPwnens: concerns/mixins or a base class
[21:31:15] rgtk: has joined #RubyOnRails
[21:31:38] ciree: ModusPwnens: thats really up to you,
[21:33:32] alasi: slash_nick: ah, ty
[21:33:32] diego4: has joined #RubyOnRails
[21:33:38] ModusPwnens: ciree: does it make sense to have a base class if the base class is useless by itself? Ruby doesn't really have a notion of abstract classes like Java does.
[21:33:38] ijiijijjjijiij: We've run into a lot of issues with observers and are sick of them- they're really hard to reason about and keep causing weird spooky action that makes debugging a nightmare. At the same time, we have cases where we need to trigger a specific action if one of like 15 models gets updated, so we can't easily replace that with internal callbacks or a service layer. Are there any good Observer replacements
[21:33:40] ijiijijjjijiij: for watching a bunch of different objects? Maybe a good signalling library or something?
[21:33:40] avemestr_: has joined #RubyOnRails
[21:33:43] slash_nick: alasi: np... good luck
[21:34:03] jessemcgilallen: has joined #RubyOnRails
[21:34:07] alasi: thanks :) coming from a node.js background so some things are still unfamiliar
[21:34:27] jenrzzz: has joined #RubyOnRails
[21:34:27] slash_nick: good to have you... maybe i'll need some node help one day!
[21:34:31] ciree: ModusPwnens: Yeah I don't see why not
[21:34:43] ciree: the place I work at is a rails shop and does that
[21:34:49] diego4: has joined #RubyOnRails
[21:35:13] ciree: ModusPwnens: for 'abstract' you could have something like this
[21:35:15] ciree: def message; raise NotImplementedError; end
[21:35:21] slash_nick: ijiijijjjijiij: ActiveSupport::Notifications is a pub/sub kind of feature in rails...
[21:35:26] ciree: not perfect, but same idea
[21:35:35] renegadeandy: smathy: how do you know that?
[21:36:01] kalusn: has joined #RubyOnRails
[21:36:11] ijiijijjjijiij: slash_nick: oooh this could work. Thanks!
[21:36:19] slash_nick: ijiijijjjijiij: no problem
[21:36:42] smathy: renegadeandy, JS is really the only things that can cause a submit button not to submit.
[21:37:10] Maletor: has joined #RubyOnRails
[21:37:41] slash_nick: smathy: css :)
[21:38:35] slash_nick: ACTION digresses immediately, as the button would still work (it'd only be more difficult to click)
[21:40:20] smathy: slash_nick, right, you could make something that's not the submit button appear as if it is. I'm assuming he's clicking on the actual submit button.
[21:40:39] Joufflu: has joined #RubyOnRails
[21:41:22] slash_nick: my thoughts were toward disabling pointer events through css
[21:41:40] slash_nick: which would be a silly thing to do... sorry for the noise :)
[21:41:46] smathy: Oh right, TIL actually. Interesting.
[21:45:01] baweaver: has joined #RubyOnRails
[21:45:14] l_tonz: has joined #RubyOnRails
[21:45:26] northfurr: has joined #RubyOnRails
[21:47:41] htmldrum: has joined #RubyOnRails
[21:48:50] hephaestus_rg: has joined #RubyOnRails
[21:52:01] n008f4g_: has joined #RubyOnRails
[21:54:27] darrencauthon: has joined #RubyOnRails
[21:54:45] hobodave: has joined #RubyOnRails
[21:54:55] darrencauthon: has joined #RubyOnRails
[21:55:04] rickmasta: has joined #RubyOnRails
[21:56:53] rhizome: has joined #RubyOnRails
[21:59:11] hahuang65: has joined #RubyOnRails
[22:04:20] lacuna: has joined #RubyOnRails
[22:06:38] Scripore: has joined #RubyOnRails
[22:09:29] safety_cut: has joined #RubyOnRails
[22:11:12] northfurr: has joined #RubyOnRails
[22:12:18] a1fa: how can i add childs error messages? error.messages.merge! child.error.messages works, but the order gets funky.
[22:12:25] lacuna: has joined #RubyOnRails
[22:13:04] sankaber: has joined #RubyOnRails
[22:14:30] a1fa: i tried doing error.add child.error.messages but that didnt work
[22:14:37] a1fa: it sounds reasonable that it should work
[22:15:48] beauby: has joined #RubyOnRails
[22:15:58] baweaver: has joined #RubyOnRails
[22:16:35] rhizome: ISTR saving nesteds puts errors on the instance
[22:19:12] codesoda: has joined #RubyOnRails
[22:19:23] Rixius: has joined #RubyOnRails
[22:19:30] a1fa: rhizome: looks like merge also over-writes existing keys
[22:19:38] Maletor: has joined #RubyOnRails
[22:19:45] SteenJobs: has joined #RubyOnRails
[22:19:52] benlieb: has joined #RubyOnRails
[22:20:00] jenrzzz: has joined #RubyOnRails
[22:20:01] a1fa: rhizome: i am having to do errors.add("","#{child.errors.messages}")
[22:20:08] EminenceHC: has joined #RubyOnRails
[22:20:13] rhizome: use the instance
[22:20:17] cornerma1: has joined #RubyOnRails
[22:20:53] a1fa: i cant find that in the api dco
[22:21:15] a1fa: i will do each, and add it that way
[22:21:20] rhizome: @foo.errors
[22:23:51] Maletor: has joined #RubyOnRails
[22:26:14] devdazed: has joined #RubyOnRails
[22:28:37] Cervajz: has joined #RubyOnRails
[22:28:57] pixilla: has joined #RubyOnRails
[22:28:59] judetucker: has joined #RubyOnRails
[22:29:13] prettiestPony11: has joined #RubyOnRails
[22:29:38] mary5030: has joined #RubyOnRails
[22:30:25] sankaber: has joined #RubyOnRails
[22:30:31] manfrin: has joined #RubyOnRails
[22:31:48] pixilla: With activerecord what is the recommended way to sum and count with group by association?
[22:31:54] pydave6367: has joined #RubyOnRails
[22:35:03] djbkd: has joined #RubyOnRails
[22:35:21] pixilla: I???m using TableOne.joins(table_two: :table_three).group(???table_threes.table_two_id???).select(???table_threes.name, count(table_twos.id) as count, sum(table_ones.quantity) as quantity???)
[22:35:54] herbst: has joined #RubyOnRails
[22:36:26] hephaestus_rg: has joined #RubyOnRails
[22:36:38] nettoweb: has joined #RubyOnRails
[22:36:58] pixilla: table_one belongs_to :table_two, table_two belongs_to :table_three.
[22:37:06] Dopagod: has joined #RubyOnRails
[22:38:04] rhizome: you're making a scope or something?
[22:38:10] pixilla: process, process_type and process_category are the actual table names.
[22:38:33] Contigi: has joined #RubyOnRails
[22:39:34] pixilla: I am presenting summary data at the top of the veiw index (table).
[22:40:14] Rixius: has joined #RubyOnRails
[22:40:16] pixilla: My example works but feels ackward.
[22:40:21] ror15: has joined #RubyOnRails
[22:40:25] jessemcgilallen: has joined #RubyOnRails
[22:40:31] safety_cut: has joined #RubyOnRails
[22:40:34] pixilla: I could not mix .sum() and .count().
[22:41:19] rushed: has joined #RubyOnRails
[22:41:43] rhizome: yeah, not sure what to do about that
[22:41:44] pixilla: I guess you cannot chain sum().count(), sound right?
[22:42:05] rhizome: i'm not sure how rails deals with that. obviously it's doable in sql
[22:42:20] rhizome: what was your chained query?
[22:42:49] riotjones: has joined #RubyOnRails
[22:43:58] pixilla: jp = JobProcess.joins(process_type: :process_category).group("process_types.process_category_id").sum("job_processes.quantity").count("job_processes.quantity")
[22:44:15] bonhoeffer: has joined #RubyOnRails
[22:46:42] pixilla: When I chain .sum.count I get sum not count and chaining count.sum I get count and not sum.
[22:47:18] pixilla: I???ll stick to using .select() which is working.
[22:48:47] njero: has joined #RubyOnRails
[22:48:55] pixilla: rhizome: thanks for the interest, I???m going to stick with .select() and move on.
[22:48:58] rhizome: seems to be the prevalent method http://stackoverflow.com/questions/16357935/group-by-name-count-and-total-and-display-it-in-a-view-using-rails
[22:50:24] pixilla: rhizome: thanks! That is more or less what I concluded. Thanks for confirming I???m not overlooking something simple.
[22:50:38] baweaver: has joined #RubyOnRails
[22:53:20] quazimodo: has joined #RubyOnRails
[22:53:55] codesoda: has joined #RubyOnRails
[23:00:19] jobewan: has joined #RubyOnRails
[23:02:03] diegobiavati: has joined #RubyOnRails
[23:04:38] manfrin: has joined #RubyOnRails
[23:05:49] darrencauthon: has joined #RubyOnRails
[23:05:56] lacuna: has joined #RubyOnRails
[23:06:06] shmilan: has joined #RubyOnRails
[23:10:43] superlou: has joined #RubyOnRails
[23:11:09] codesoda: has joined #RubyOnRails
[23:11:55] seank_: has joined #RubyOnRails
[23:12:18] yfeldblum: has joined #RubyOnRails
[23:13:27] njero: has joined #RubyOnRails
[23:14:04] seank_: has joined #RubyOnRails
[23:14:42] pontiki: has joined #RubyOnRails
[23:18:23] Ropeney: has joined #RubyOnRails
[23:19:00] stannard: has joined #RubyOnRails
[23:20:09] seank_: has joined #RubyOnRails
[23:20:17] hahuang65: has joined #RubyOnRails
[23:21:08] Scripore: has joined #RubyOnRails
[23:24:06] rromanch_: has joined #RubyOnRails
[23:24:30] malcolmva: has joined #RubyOnRails
[23:24:35] Lightsword: has joined #RubyOnRails
[23:25:07] l1meon: has joined #RubyOnRails
[23:26:50] RockLee: has joined #RubyOnRails
[23:27:45] pixilla: has joined #RubyOnRails
[23:28:03] simplyianm: has joined #RubyOnRails
[23:28:51] l1meon: hello, I have a question, I have a game controller, and 3 types of games with different actions behavior for each, should I make a module for each and past the in controller/concerns ? or where best to paste them, and should their be modules or classes?
[23:29:57] pixilla: has joined #RubyOnRails
[23:36:01] lacuna: has joined #RubyOnRails
[23:40:16] mary5030: has joined #RubyOnRails
[23:40:35] maximski: has joined #RubyOnRails
[23:40:41] atomical: has joined #RubyOnRails
[23:40:47] malcolmva: has joined #RubyOnRails
[23:42:37] quazimodo: has joined #RubyOnRails
[23:43:45] codesoda: has joined #RubyOnRails
[23:45:33] lapide_viridi: has joined #RubyOnRails
[23:48:20] bonhoeffer: has joined #RubyOnRails
[23:50:22] rromanch_: has joined #RubyOnRails
[23:52:29] diegobiavati: has joined #RubyOnRails
[23:52:48] lacuna: has joined #RubyOnRails
[23:53:24] one_zero: has joined #RubyOnRails
[23:55:57] GeissT: has joined #RubyOnRails
[23:56:51] gaboesquivel: has joined #RubyOnRails
[23:57:08] baweaver: has joined #RubyOnRails
[23:57:20] AnoHito_: has joined #RubyOnRails
[23:57:41] USvER[1]: has joined #RubyOnRails
[23:57:58] michaeldeol: has joined #RubyOnRails
[23:58:25] crdpink2: has joined #RubyOnRails
[23:58:49] fumduq: has joined #RubyOnRails