« Back to channel list

#RubyOnRails - 13 October 2015

« Back 1 day Forward 1 day »
[00:00:30] zeknox: smathy: thanks bossman
[00:00:57] smathy: zeknox, You can still put it in the same migration, just after the create_table block.
[00:01:11] zeknox: smathy: perfect! let me try that
[00:01:39] smathy: (remember to do the rollback before changing the migration :)
[00:01:47] sevenseacat: has joined #RubyOnRails
[00:02:10] nya: has joined #RubyOnRails
[00:03:41] moeabdol: has joined #RubyOnRails
[00:05:41] jtperreault: has joined #RubyOnRails
[00:06:14] zeknox: smathy: Radar: thanks gents, its working properly! not sure I'm quite a fan of it quite yet, but I understand why it exists
[00:06:32] SteenJobs: has joined #RubyOnRails
[00:07:07] zeknox: is it safe to say that dependent: :destroy's are not necessary if you setup your on_deletes properly in the migrations?
[00:07:32] workmad3: has joined #RubyOnRails
[00:08:41] sanjayu: has joined #RubyOnRails
[00:11:13] moeabdol: has joined #RubyOnRails
[00:11:36] ericjphillips: has joined #RubyOnRails
[00:11:58] chipotle: has joined #RubyOnRails
[00:13:19] SteenJobs: is it frowned upon to use a boolean to essentially provide exactly 3 rather than 2 possibilities? (true, false, nil) - not asking specifically with regard to ruby (i have swift in mind), but just the general practice? i only trust answers from this chat haha.
[00:13:25] barhum2013: has joined #RubyOnRails
[00:14:03] sevenseacat: its not a great idea, but sometimes it does neatly encapsulate what you want.
[00:14:08] sevenseacat: I've done it before.
[00:15:53] Aeyrix: SteenJobs: 0 1 2
[00:15:57] Aeyrix: use an integer and make an enum
[00:16:05] SteenJobs: aright cool
[00:16:30] smathy: zeknox, correct, unnecessary with the DB stuff.
[00:16:49] SteenJobs: sevenseacat: yea that???s what i was thinking???like it???s not being used as intended, which gives me an uneasy feeling, but it doesn???t seem like there would be much negative that can come out of it???like it seems like a pretty safe and potentially super helpful ???hack???.
[00:17:07] Aeyrix: i literally just gave you a viable alternative that is considered 'correct' lel
[00:17:20] SteenJobs: sevenseacat: in my case it really neatly does encapsulate what i want - a completion handler that can have exactly 3 variables for exactly 3 possiblities.
[00:17:23] SteenJobs: Aeyrix: i know!!
[00:17:24] smathy: SteenJobs, a boolean cannot be more than true/false.
[00:17:33] acovrig: has joined #RubyOnRails
[00:17:33] FailBit: smathy, it could be nil.
[00:17:37] Aeyrix: smathy: the field can be empty
[00:17:38] SteenJobs: smathy: nil
[00:17:39] smathy: SteenJobs, if you have something representing three values then it's not a boolean.
[00:17:49] sevenseacat: SteenJobs: 'three possibilities' does not correspond to a boolean value
[00:17:50] Aeyrix: all aboard the semantics train tbh
[00:18:00] smathy: SteenJobs, if it's three states then it's a ternary - not a boolean
[00:18:01] sevenseacat: 'true, false, and unknown' corresponds to a boolean value
[00:18:04] lukekhamilton: has joined #RubyOnRails
[00:18:12] SteenJobs: well now we???re getting philosophical, because it???s not really a third value, it???s more a lack of value being represented as a third value.
[00:18:19] acovrig: I'm starting a project that needs auth, I'm thinking of using devise, but I need to auth the API also, is devise recommended for this, or is there something 'better' I should use?
[00:18:36] smathy: No, the word "boolean" has a meaning, it doesn't mean true, false and unknown.
[00:18:46] Aeyrix: SteenJobs: Remember that depending on how you are writing your code, nil can sometimes translate to "not true", or false.
[00:18:49] Aeyrix: So be careful of that.
[00:18:51] SteenJobs: sevenseacat: right right - i meant i want to execute three different actions (if, elsif, else) based on the boolean value being true, false, unknown.
[00:18:54] bonhoeffer: acovrig: devise should be fine ??? rolling your own is not a bad idea
[00:19:00] SteenJobs: Aeyrix: right, good point.
[00:19:05] smathy: SteenJobs, my point is that if you ask your question as: "can I have an attribute that represents three values" then of course the answer is "of course".
[00:19:10] Aeyrix: if true, else if false, else
[00:19:12] bonhoeffer: omniauth has a lot of options as well
[00:19:18] sevenseacat: it doesnt sound like a boolean is what you want.
[00:19:18] Kerber0s: has joined #RubyOnRails
[00:19:18] SteenJobs: Aeyrix: i???m using swift in this case, so i made sure that it wouldn???t be == false if it has a value of nil.
[00:19:20] qejk: has joined #RubyOnRails
[00:19:26] Aeyrix: SteenJobs: ok cool
[00:19:42] SteenJobs: Aeyrix: bingo, that???s what i did. if true, else if false, else - to correspond to true, false, nil.
[00:19:43] smathy: SteenJobs, and as soon as you acknowledge that actually you're using a tristate, then you can just deal with it appropriately and there's no issue.
[00:19:53] SteenJobs: yea yea i???m totally open to that
[00:20:17] SteenJobs: i figured using a boolean wasn???t the best approach, just curious why not. but i???m ok with any method of providing exactly three options and no more.
[00:20:28] acovrig: bonhoeffer, I would like to be able to use the same method of auth for both (I.E. be able to use a single current_user variable); I'm having issues getting devise and devise_token_auth working, do I need devise_token_auth (I.E. does devise cover the API also?)
[00:20:31] SteenJobs: right, as Aeyrix advised.
[00:20:48] bonhoeffer: what api acovrig ?
[00:20:53] SteenJobs: sevenseacat: in the circumstances you referenced, why did you go the boolean route rather than using an enum?
[00:21:09] smathy: ...so then the question you're really asking is something like: "With my tristate property, is it good practice to have two of the states as the two boolean states so I can use the convenience operators for boolean evaluations?" - to which I'd say no, that's not a good idea.
[00:21:18] acovrig: bonhoeffer, the rails API (application/json)
[00:21:33] acovrig: bonhoeffer, I'm not consuming an API, I'm providing one
[00:21:48] sevenseacat: SteenJobs: because i was recording something that corresponded with the three appropriate values, from memory it was 'has this user taken this test?' and the answers were yes, no, and unknown
[00:21:50] SteenJobs: smathy: very nicely articulated!
[00:22:24] smathy: SteenJobs, misusing words/concepts leads to much confusion.
[00:22:28] bonhoeffer: acovrig: are you talking about token authentication?
[00:22:46] bonhoeffer: http://www.developingandrails.com/2015/02/api-authentication-with-devisetokenauth.html
[00:22:58] Aeyrix: nobody ever words questions like that in here
[00:23:07] acovrig: is it possible to use just devise with the default API to preform authenticated/authorized actions securely w/out needing a separate gem?
[00:23:09] SteenJobs: sevenseacat: right - mine is was the username requested/received from instagram properly saved? (true if yes, false if user doesn???t exist on instagram, nil if incompletely saved (missing attributes like a userID).
[00:23:20] SteenJobs: smathy: yea sorry about that. i realize it???s not definitionally a boolean
[00:23:29] SteenJobs: which is obviously binary, tautologically speaking
[00:23:35] acovrig: bonhoeffer, I followed that page and I'm having conflicts with devise and devise_token_auth
[00:23:36] smathy: I know, and many times it doesn't matter - but with heavily loaded words like "boolean" it can lead to a lot of mistakes and confusion.
[00:23:51] Aeyrix: i understood what SteenJobs meant
[00:23:52] bonhoeffer: acovrig: i???ve heard it works well, but i haven???t set it up
[00:23:59] Aeyrix: and so did sevenseacat
[00:24:05] SteenJobs: i meant the act of making the existence of a boolean bend to my will by squeezing three options out of it because of the way it functions within code.
[00:24:07] smathy: SteenJobs, right, so you're really asking the question I stated. "Should I use the boolean values of true/false for two of the three states of my tristate property?"
[00:24:08] acovrig: bonhoeffer, I presume I would POST a user&pass and get a token, then use said token for future requests?
[00:24:13] SteenJobs: smathy: bingo
[00:24:40] bonhoeffer: acovrig: how i thought it works
[00:25:00] smathy: SteenJobs, to which the answer is clearly no, because then your property will be named poorly to represent only two of your three states, and the third state will just be inferred knowledge not represented in the system. Eg. the magical value `nil` which is handled "specially".
[00:25:20] SteenJobs: Aeyrix: no worries - love that you have my back though, but smathy means it pedagogically, not critically (well in the negative sense) - i???ve learned much from him and generally defer to what he thinks :) (not out of an appeal to authority, just because he usually knows his shit and has insight worth paying attention to)
[00:25:21] acovrig: bonhoeffer, when I use CURL to test it, I get HTML back, even though I specify the 'Accept: application/json' header...
[00:25:37] djbkd: has joined #RubyOnRails
[00:25:45] SteenJobs: smathy: ah yea that???s a good point, for someone else looking at the code, it would be rather cryptic.
[00:26:30] smathy: SteenJobs, whereas a real tristate - an enum if you like - will be clear.
[00:26:38] SteenJobs: smathy: because i???m essentially writing code that has nothing to do with nil, it has to do with my knowledge that the variable can be nil and then specificying a resulting action. sounds shady.
[00:27:27] SteenJobs: ah yes, see a wonderful convo like this just doesn???t really go down in the iOS dev channel. but don???t tell them i said that.
[00:27:39] smathy: I will, next time I'm there.
[00:27:48] SteenJobs: you???re never there!!
[00:28:10] SteenJobs: nothing would be greater than having the lot of you in iphonedev???would make my [insert long period of time]
[00:28:30] FailBit: I don't like oranges.
[00:28:35] smathy: It's not a coincidence that we're not.
[00:28:45] SteenJobs: haha i know, as we???ve discussed
[00:29:26] SteenJobs: but perhaps that???s the problem! maybe with you guys, all the negatives we talked about could be fixed and improved. in order to improve, iOS needs a better community, but in order to attract a better community, it needs to improve???.sounds like my fav book of all time :D
[00:29:41] acovrig: I get `{"errors":["Invalid login credentials. Please try again."]}' when trying this: `curl -X POST -H 'Accept: application/json' http://ip_addr:3002/api/v1/auth/sign_in -d '{ "email": "test@example.com", "password": "asdf" }'
[00:30:16] Aeyrix: It sounds like you have invalid login credentials.
[00:30:19] smathy: SteenJobs, also as we've discussed, unless it's totally open sourced then contributing will only ever appeal to a small minority of people capable of doing so.
[00:30:20] Aeyrix: I don't know how or why I think that
[00:30:23] Aeyrix: maybe it's a coincidence.
[00:30:35] blackmesa: has joined #RubyOnRails
[00:30:42] sevenseacat: no interest in anything related to iOS.
[00:30:47] sevenseacat: i don't even use it.
[00:30:55] SteenJobs: we totes need to change that!
[00:30:57] FailBit: I don't like pears either.
[00:31:09] acovrig: Aeyrix, I believe they're correct, I can't try the web interface though, I get `wrong number of arguments (1 for 0)' when trying to login, it evidently doesn't like this `<% if user_signed_in? %>'
[00:31:10] SteenJobs: ugh it has so much potential, and you guys would blow so many of the devs in iOS out of the water.
[00:31:14] Aeyrix: I use iOS, but I don't develop for it. Too much effort.
[00:31:19] smathy: SteenJobs, it's a closed platform, it's not happening any time soon.
[00:31:38] s2013: has joined #RubyOnRails
[00:31:47] Aeyrix: I tip my fedora slightly less
[00:31:51] Aeyrix: so my only issue is that it's just a pain
[00:31:56] Aeyrix: i don't really care about how open / closed it is
[00:32:02] Aeyrix: just the process to develop and publish
[00:32:19] FailBit: my fedora is always tipped
[00:32:20] SteenJobs: the good news is i???m gonna get to revisit rails for the first time in a while - need to build a UI for our analytics data from Parse - just a shit ton of JSON that needs to be able to be organized and manipulated and displayed.
[00:32:27] Aeyrix: FailBit: you run a mlp booru
[00:32:30] SteenJobs: Aeyrix: which parts do you find to be a pain?
[00:32:32] Aeyrix: your fedora is so tipped it's stuck in perpetual motion
[00:32:35] FailBit: I have a neckbeard
[00:32:39] FailBit: I run fedora
[00:32:43] FailBit: can this get any worse
[00:32:44] Aeyrix: SteenJobs: literally all of it to be honest
[00:32:44] stannard: has joined #RubyOnRails
[00:32:48] Aeyrix: it's just painful enough that i can't be bothered
[00:33:19] Aeyrix: Huge boon for the platform is that you're pretty much at the point where you can write once and run on any iOS device.
[00:33:23] bungoman_: has joined #RubyOnRails
[00:33:25] SteenJobs: i???m so curious which parts haha. i???ve been doing iOS dev non stop since April, and it???s pretty much all i do now (given that our app is an iOS app, it makes sense)
[00:33:38] Aeyrix: Versus Android where you have to have lovely exceptions to work around some of the bullshit that Android vendors do.
[00:33:54] Aeyrix: G??D F??N
[00:34:15] SteenJobs: yea haven???t checked out the android SDK, although at least C# is pretty similar to Swift in case i do check it out
[00:34:28] Aeyrix: Android SDK is Java, fam.
[00:34:40] Aeyrix: Swift is p nice.
[00:34:45] FailBit: aren't all the cool kids using the NDK now
[00:34:45] Aeyrix: I wrote a couple small OS X tools in it.
[00:34:53] SteenJobs: ya ya, but i thought you can code with the android SDK in C# as well?
[00:34:54] FailBit: friggin cpp
[00:35:00] Aeyrix: SteenJobs: no idea, doubr it
[00:35:09] Aeyrix: you might mean C++
[00:35:12] Aeyrix: which is very unlike swift
[00:35:17] michaeldeol: has joined #RubyOnRails
[00:35:26] SteenJobs: yea swift is great - it was pretty intuitive coming from Ruby, although i miss blocks. but closures are pretty great.
[00:35:34] Aeyrix: you can use Xamarin if you like sub-par application performance
[00:35:42] SteenJobs: ah that???s what i was thinking of, Xamarin.
[00:35:46] Aeyrix: write-once-run-anywhere though
[00:35:47] Aeyrix: allegedly
[00:36:00] Aeyrix: I can write OS X shit in C# pretty well thanks to Xamarin, so I guess they have that going for them.
[00:36:13] SteenJobs: and i never learned Java given that i became interested in coding after it was too late to take any CS classes.
[00:36:43] Aeyrix: I learned Java because I did stuff for Bukkit.
[00:37:04] smathy: acovrig, you have no Content-type header.
[00:37:39] SteenJobs: Aeyrix: sounds dope. the real pain for me at first was just the super verbose and seemingly endless iOS SDK, but you warm up for it and it eventually clicks.
[00:37:48] FailBit: I learned java principles well enough to try to avoid them
[00:37:52] FailBit: I never learned java itself
[00:38:00] Aeyrix: I don't even really mind Java tbq
[00:38:23] FailBit: I'm not a java factory you know
[00:38:24] Aeyrix: I'd go so far as to say that, relative to other languages, I like it.
[00:38:40] FailBit: just can't interface well with the language
[00:38:46] SteenJobs: this is annoying. i need to test my app???s handling when there???s no network connection, but i???m running it on the iPhone simulator so i need to shut off my interweb???but that means interrupting this convo. such a dilemma.
[00:38:57] baweaver: has joined #RubyOnRails
[00:39:01] Aeyrix: Consider using a VM
[00:39:03] Aeyrix: or another machine
[00:39:22] SteenJobs: Aeyrix: probs just gonna stop being lazy and run it on my phone.
[00:39:58] SteenJobs: swift???s type casting was interesting, but i actually love it - (it has type inference as well, don???t panic)
[00:40:33] rubyonrailed: has joined #RubyOnRails
[00:41:09] mary5030: has joined #RubyOnRails
[00:41:43] speakingcode: has joined #RubyOnRails
[00:42:29] riotjones: has joined #RubyOnRails
[00:43:39] dopieee: has joined #RubyOnRails
[00:44:51] rickmasta: has joined #RubyOnRails
[00:45:19] darrencauthon: has joined #RubyOnRails
[00:46:07] hahuang65: has joined #RubyOnRails
[00:46:25] dopamean_: has joined #RubyOnRails
[00:47:00] chipotle: has joined #RubyOnRails
[00:47:39] t_mmyv: has joined #RubyOnRails
[00:48:56] mary5030: has joined #RubyOnRails
[00:49:59] mary5030: has joined #RubyOnRails
[00:50:04] shmilan: has joined #RubyOnRails
[00:55:00] madebymarkca: has joined #RubyOnRails
[01:05:09] madebymarkca: has joined #RubyOnRails
[01:06:25] nya: has joined #RubyOnRails
[01:09:33] workmad3: has joined #RubyOnRails
[01:09:38] bungoman: has joined #RubyOnRails
[01:09:45] bonhoeffer: has joined #RubyOnRails
[01:10:45] madebymarkca: has joined #RubyOnRails
[01:17:15] mostlybadfly: has joined #RubyOnRails
[01:22:02] IFrank00: has joined #RubyOnRails
[01:25:56] penguinpowernz: has joined #RubyOnRails
[01:26:17] qejk: has joined #RubyOnRails
[01:27:56] Shoutsid: has joined #RubyOnRails
[01:29:35] bruce_lee2: has joined #RubyOnRails
[01:30:50] beauby: has joined #RubyOnRails
[01:31:36] htmldrum: has joined #RubyOnRails
[01:32:16] pydave6367: has joined #RubyOnRails
[01:32:16] stardiviner: has joined #RubyOnRails
[01:34:35] rhizome: i can't believe this svn gui just added ignored files to my project
[01:35:44] mary5030: has joined #RubyOnRails
[01:35:50] simplyianm: has joined #RubyOnRails
[01:38:07] pabvid: has joined #RubyOnRails
[01:38:13] stannard: has joined #RubyOnRails
[01:40:27] rubyonrails152: has joined #RubyOnRails
[01:40:28] speakingcode: has joined #RubyOnRails
[01:43:15] riotjones: has joined #RubyOnRails
[01:43:16] greengriminal: has joined #RubyOnRails
[01:46:43] iamjarvo_: has joined #RubyOnRails
[01:47:35] michael_mbp: has joined #RubyOnRails
[01:49:20] Radar: that's so totally unlike svn
[01:49:25] inoter: has joined #RubyOnRails
[01:50:09] cajone: has joined #RubyOnRails
[01:53:54] riskish: has joined #RubyOnRails
[01:54:31] speakingcode: has joined #RubyOnRails
[01:55:15] Limix: has joined #RubyOnRails
[01:57:15] qejk: has joined #RubyOnRails
[01:57:50] undefinedvalue: has joined #RubyOnRails
[01:59:06] joshkovach: has joined #RubyOnRails
[02:00:55] jeffleeismyhero: has joined #RubyOnRails
[02:02:46] jeffleeismyhero: I???m using Capistrano 3.4 to deploy a Rails 4.2 application. Periodically, assets won???t update even though they compile without error.
[02:02:48] madebymarkca: has joined #RubyOnRails
[02:02:58] antn: has joined #RubyOnRails
[02:04:29] darrencauthon: has joined #RubyOnRails
[02:04:56] jeffleeismyhero: Any idea why that would happen?
[02:05:27] bruno-: has joined #RubyOnRails
[02:05:34] rickmasta: has joined #RubyOnRails
[02:06:02] northfurr: has joined #RubyOnRails
[02:06:24] rickmasta: has joined #RubyOnRails
[02:07:31] EminenceHC: has joined #RubyOnRails
[02:07:50] bobbobbins: has joined #RubyOnRails
[02:07:59] rushed: jeffleeismyhero: what didn't update?
[02:08:39] bonhoeffer: has joined #RubyOnRails
[02:08:58] jeffleeismyhero: As a test, I just added a simple `display:none;` to the footer. Works perfectly fine locally. No where to be found in production.
[02:09:42] Radar: Committed to Git?
[02:09:51] sevenseacat: compiled during the deploy?
[02:10:01] sevenseacat: link? code? something?
[02:10:23] workmad3: has joined #RubyOnRails
[02:10:27] jeffleeismyhero: Yes, it was committed to git.
[02:10:39] Aeyrix: sevenseacat: lol
[02:10:43] Radar: !debug-proxy
[02:10:43] helpa: This kind of issue is hard to debug remotely. You should hire someone who can look at your code and figure it out. We are most likely unable to help you in this situation.
[02:10:44] jeffleeismyhero: The code is dead simple: .copyright { display: none; }
[02:11:12] madebymarkca: has joined #RubyOnRails
[02:11:16] rushed: jeffleeismyhero: how did you verify that it made it to the remote repo and then to the server?
[02:12:26] jeffleeismyhero: I can see the code on the production server: $ grep ".copyright {" app/assets/stylesheets/boilerplate.scss
[02:12:26] jeffleeismyhero: .copyright { display: none; }
[02:12:42] rhizome: what about public/assets?
[02:13:15] chi6rag: has joined #RubyOnRails
[02:13:37] jeffleeismyhero: rhizome: It does not appear in the application-*.css file.
[02:14:12] SteenJobs: has joined #RubyOnRails
[02:14:21] rushed: jeffleeismyhero: how did you determine that?
[02:15:05] jeffleeismyhero: https://gist.github.com/jeffleeismyhero/46bc39751fa193c20c03
[02:15:24] rhizome: ok, now about capistrano raking your assets
[02:15:38] jeffleeismyhero: grep ".copyright" application-608abe538d35bc126e0c9120d27700707d414d4453b4535839ee999d8ec9eade.css
[02:15:50] rhizome: also are you using shared/assets with a symlink?
[02:16:19] jeffleeismyhero: set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads', 'public/production')
[02:17:32] rushed: jeffleeismyhero: is there anything else in boilerplate.scss that does appear, can you gist the application.css that shows it should be included?
[02:17:40] Shoutsid: has joined #RubyOnRails
[02:18:46] rainerborene1: has joined #RubyOnRails
[02:18:54] jeffleeismyhero: https://gist.github.com/jeffleeismyhero/90d072e31cdbd413b378
[02:19:07] Ropeney: has joined #RubyOnRails
[02:19:47] jeffleeismyhero: No, before I added the css to hide the copyright class, I deployed from my machine (instead of having CI do it) and the items that weren???t there were magically updated.
[02:20:35] rushed: jeffleeismyhero: so cap works and ci doesn't?
[02:21:36] jeffleeismyhero: CI deploys fine, local deploys work as well. Asset compilation isn???t working in either place (randomly)
[02:22:04] rhizome: manual cap doesn't update?
[02:22:09] rushed: jeffleeismyhero: generally a deploy that results in missing or corrupted assets wouldn't be considered working~
[02:22:12] pydave6367: has joined #RubyOnRails
[02:22:49] jeffleeismyhero: Sure. The deploy succeeds without errors.
[02:23:29] jeffleeismyhero: Certainly, the assets should be compiled, but no errors are generated from Capistrano.
[02:24:32] rhizome: do you see the compile command line in the output?
[02:25:27] northfurr: has joined #RubyOnRails
[02:26:01] annlewis: has joined #RubyOnRails
[02:26:37] jeffleeismyhero: Yes: https://gist.github.com/jeffleeismyhero/46bc39751fa193c20c03
[02:29:22] allcentury: has joined #RubyOnRails
[02:31:17] bruce_lee2: has left #RubyOnRails: ()
[02:31:21] mary5030: has joined #RubyOnRails
[02:31:28] bruce_lee: has joined #RubyOnRails
[02:32:43] unreal: has joined #RubyOnRails
[02:32:55] blackmesa: has joined #RubyOnRails
[02:33:23] rhizome: see if cap -d gets you anything interesting
[02:34:25] maxdoubt: has joined #RubyOnRails
[02:34:38] cajone: has joined #RubyOnRails
[02:34:55] jeffleeismyhero: OptionParser::AmbiguousOption: ambiguous option: -d
[02:36:02] qejk: has joined #RubyOnRails
[02:36:03] roshanavand: has joined #RubyOnRails
[02:36:31] sarink: has joined #RubyOnRails
[02:38:52] rhizome: huh. whatever the debug switch is
[02:39:11] qejk: has joined #RubyOnRails
[02:39:53] maxdoubt: has joined #RubyOnRails
[02:41:41] jeffleeismyhero: Bumping: Rails.application.config.assets.version = '1.3' resolves the problem.
[02:42:17] jeffleeismyhero: Why is that required sometimes and not others?
[02:42:18] smathy: You thinking of --trace rhizome ?
[02:43:11] rushed: jeffleeismyhero: it shouldn't be
[02:43:34] rushed: jeffleeismyhero: bumping the version changes all your hashs (even if the content doesn't change)
[02:44:04] riotjones: has joined #RubyOnRails
[02:46:01] baweaver: has joined #RubyOnRails
[02:48:58] jeffleeismyhero: Here is a deploy with ???trace: https://gist.github.com/jeffleeismyhero/182e1e6a4bb0e154bcc4
[02:49:02] rhizome: looks like cap 3 has a lot fewer options than 2
[02:50:32] smathy: rhizome, I think a big part of 2 -> 3 was to adopt the conventions/API of (or maybe even use internally) rake.
[02:51:14] krz: has joined #RubyOnRails
[02:52:39] PhantomSpank: has joined #RubyOnRails
[02:53:45] benlieb: has joined #RubyOnRails
[02:54:04] stannard: has joined #RubyOnRails
[02:54:23] Jameser: has joined #RubyOnRails
[02:54:35] rhizome: jeffleeismyhero: https://gist.github.com/jeffleeismyhero/182e1e6a4bb0e154bcc4#file-capistrano-debug-txt-L430
[02:54:51] rhizome: not dispositive, might be an old task in deploy.rb
[02:55:11] darrencauthon: has joined #RubyOnRails
[02:56:12] jeffleeismyhero: Yes, I was trying to add: set :normalize_asset_timestamps, %{public/images public/javascripts public/stylesheets}
[02:57:04] jeffleeismyhero: So, after bumping the assets.version, I can add and remove styles without issue. In other words, I can no longer get the problem to occur.
[03:01:12] mrtomme: has joined #RubyOnRails
[03:01:30] sankaber: has joined #RubyOnRails
[03:01:40] maxdoubt: has joined #RubyOnRails
[03:02:36] mices: my fields not making it to the database on an update submit but in the controller it's listed in params permit so where else can i look for the problem
[03:03:40] sankaber: has joined #RubyOnRails
[03:04:27] hephaestus_rg: has joined #RubyOnRails
[03:05:04] rhizome: jeffleeismyhero: all's well that ends well
[03:05:22] jeffleeismyhero: Thanks for the help rhizome
[03:05:24] jameswork: has joined #RubyOnRails
[03:06:34] jeffleeismyhero: I believe the issue starts when there is an error in the SCSS. There were a couple of astrisks left over from comments prior to this issue.
[03:07:38] jeffleeismyhero: We corrected that issue but none of the deploys after would update the assets properly.
[03:07:40] djbkd: has joined #RubyOnRails
[03:09:38] rhizome: huh. maybe it didn't see them as changed files because asterisks
[03:10:17] braincrash: has joined #RubyOnRails
[03:11:07] workmad3: has joined #RubyOnRails
[03:12:25] jeffleeismyhero: maybe so. Thanks again
[03:17:46] pydave6367: has joined #RubyOnRails
[03:21:07] bruno-: has joined #RubyOnRails
[03:25:01] antn: has joined #RubyOnRails
[03:26:46] annlewis: has joined #RubyOnRails
[03:29:10] The_Phoenix: has joined #RubyOnRails
[03:29:16] Jameser`: has joined #RubyOnRails
[03:33:43] benlieb: has joined #RubyOnRails
[03:38:19] SteenJobs: has joined #RubyOnRails
[03:39:06] michael_mbp: has joined #RubyOnRails
[03:42:52] pawnbox: has joined #RubyOnRails
[03:44:12] antn: has joined #RubyOnRails
[03:44:21] bob14: has joined #RubyOnRails
[03:45:03] riotjones: has joined #RubyOnRails
[03:45:37] sivsushruth: has joined #RubyOnRails
[03:47:03] IFrank00: Hello everybody
[03:47:34] IFrank00: good evening to all
[03:51:09] opal: has joined #RubyOnRails
[03:51:32] darrencauthon: has joined #RubyOnRails
[03:54:20] lukekhamilton: has joined #RubyOnRails
[03:55:07] arup_r: has joined #RubyOnRails
[03:57:02] towski_: has joined #RubyOnRails
[03:58:23] antn: has joined #RubyOnRails
[03:59:17] sivsushruth: has joined #RubyOnRails
[04:01:48] smathy: has joined #RubyOnRails
[04:02:21] psk17_: has joined #RubyOnRails
[04:03:08] shmilan: has joined #RubyOnRails
[04:04:46] pawnbox: has joined #RubyOnRails
[04:05:16] opal: has left #RubyOnRails: ()
[04:07:01] pawnbox: has joined #RubyOnRails
[04:09:02] mojo-jojo: has joined #RubyOnRails
[04:09:50] Plas: has joined #RubyOnRails
[04:11:54] workmad3: has joined #RubyOnRails
[04:13:15] stannard: has joined #RubyOnRails
[04:14:40] PlasmaStar: has joined #RubyOnRails
[04:16:26] stardiviner: has joined #RubyOnRails
[04:18:33] yardenbar: has joined #RubyOnRails
[04:18:47] sankaber: has joined #RubyOnRails
[04:18:52] stannard: has joined #RubyOnRails
[04:23:18] youngbaks: has joined #RubyOnRails
[04:23:21] allcentury: has joined #RubyOnRails
[04:23:26] jenrzzz: has joined #RubyOnRails
[04:27:32] annlewis: has joined #RubyOnRails
[04:28:27] pabvid: has joined #RubyOnRails
[04:33:46] blackmesa: has joined #RubyOnRails
[04:33:48] bruno-: has joined #RubyOnRails
[04:36:40] moeabdol: has joined #RubyOnRails
[04:37:32] djinni`: has joined #RubyOnRails
[04:38:00] dustinm`: has joined #RubyOnRails
[04:40:00] FCser: has joined #RubyOnRails
[04:40:31] tfitts: has joined #RubyOnRails
[04:41:09] lemur: has joined #RubyOnRails
[04:41:52] Pharaoh2: has joined #RubyOnRails
[04:43:24] l_tonz: has joined #RubyOnRails
[04:43:43] yfeldblum: has joined #RubyOnRails
[04:45:54] riotjones: has joined #RubyOnRails
[04:46:20] freezevee: has joined #RubyOnRails
[04:47:06] wcalderipe: has joined #RubyOnRails
[04:49:09] freezevee: I have set up some routes as "resources :profiles" in routes.rb, a typical controller and a form which sends data to @profile. In my controller, the @profile is set as @profile = current_user.profiles.find(params[:id]). When I use the form to create a profile, everything works fine. When I use the same form in order to update a profile, it doesn't work and I need to change the action where the form sends, and add "url:
[04:49:09] freezevee: profile_path(@profile)"
[04:49:44] freezevee: how can I make my form work for both create/update ? I tried using if/then/else but it fails
[04:52:22] rromanch_: has joined #RubyOnRails
[04:53:09] Radar: freezevee: !gist the code that you have now
[04:53:09] helpa: freezevee: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[04:53:22] freezevee: Radar: what code exactly ?
[04:53:32] Radar: ACTION drums fingers on desk
[04:53:44] freezevee: sorry I had the whole project on github
[04:53:46] Radar: Use that brain of yours :)
[04:53:56] freezevee: what do you mean ?
[04:54:07] Radar: OK bye I have better things to do.
[04:54:15] Aeyrix: lmaoooooo
[04:54:17] Aeyrix: record time
[04:54:20] Aeyrix: oh baby, a triple
[04:55:08] bob14: is there a way to skip all validations except for one? Something like this: @appointment.save(validate: false, address_validation: true)
[04:55:41] freezevee: Radar: just kidding
[04:55:47] freezevee: Radar: https://github.com/chrisvel/ticketbox/blob/master/app/views/profiles/_full_form.html.erb
[04:55:57] Radar: bob14: nope
[04:55:59] Radar: all or nothing
[04:56:08] Radar: freezevee: what happens when you use url
[04:56:20] freezevee: the update is completed
[04:56:23] bob14: Radar: oh thats dumb, lol
[04:56:34] Sam_Gerber: has joined #RubyOnRails
[04:56:41] freezevee: the post/create works with simple "@profile" in form
[04:56:42] Aeyrix: bob14: is it? oh
[04:56:42] Radar: bob14: I have a similar opinion about those who put "lol" at the end of non-funny sentences
[04:56:52] Aeyrix: roasted tbqhwyf
[04:56:53] freezevee: the patch/update wants a "url:...."
[04:57:54] bob14: Radar: I have a similar opinion of those who make fun of others for thinking something is funny when they dont think it is lol
[04:57:56] freezevee: Radar: I tried to track it down with binding.pry but never gets to that point
[04:58:12] freezevee: Radar: https://github.com/chrisvel/ticketbox/blob/master/app/controllers/profiles_controller.rb
[04:58:50] Aeyrix: bob14: lol
[04:59:07] bePolite: has joined #RubyOnRails
[05:02:10] freezevee: Radar: any ideas ?
[05:02:19] Fahrenhei7: has joined #RubyOnRails
[05:03:19] darrencauthon: has joined #RubyOnRails
[05:04:04] sevenseacat: has joined #RubyOnRails
[05:04:09] Radar: freezevee: !rule10
[05:04:09] helpa: freezevee: Do not beg / plead with people to help you. This includes asking questions like "Any ideas?" after posting your original question.
[05:04:27] Radar: Code is too complicated for me to follow. I don't know.
[05:05:07] freezevee: fair enough
[05:07:07] rakm: has joined #RubyOnRails
[05:07:33] pawnbox: has joined #RubyOnRails
[05:10:05] Spami: has joined #RubyOnRails
[05:10:32] bePolite: has joined #RubyOnRails
[05:11:32] freezevee: I needed beg instructions
[05:12:28] Flyy7: has joined #RubyOnRails
[05:12:37] Radar: !unworthy
[05:12:37] helpa: You are not worthy of this bot!
[05:12:42] workmad3: has joined #RubyOnRails
[05:13:00] dhjondoh: has joined #RubyOnRails
[05:13:48] freezevee: !lovethisroom
[05:13:56] Scripore: has joined #RubyOnRails
[05:14:30] SteenJobs: has joined #RubyOnRails
[05:15:23] stardiviner: has joined #RubyOnRails
[05:15:27] Pharaoh2: has joined #RubyOnRails
[05:18:00] doritostains: has joined #RubyOnRails
[05:19:45] Fahrenhei7: has left #RubyOnRails: ()
[05:20:01] Lytol: has joined #RubyOnRails
[05:20:17] mojo-jojo: has joined #RubyOnRails
[05:21:28] EminenceHC: has joined #RubyOnRails
[05:26:23] Shoutsid: has joined #RubyOnRails
[05:27:58] PlasmaStar: has joined #RubyOnRails
[05:28:45] annlewis: has joined #RubyOnRails
[05:29:21] lxsameer: has joined #RubyOnRails
[05:31:43] raunicolae: has joined #RubyOnRails
[05:33:40] ruurd: has joined #RubyOnRails
[05:36:31] tagrudev: has joined #RubyOnRails
[05:37:42] zpe: has joined #RubyOnRails
[05:37:58] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[05:39:28] trautwein: has joined #RubyOnRails
[05:39:47] bruno-: has joined #RubyOnRails
[05:41:05] yardenbar: has joined #RubyOnRails
[05:41:14] ruurd: has joined #RubyOnRails
[05:43:32] yogeshrt: has joined #RubyOnRails
[05:43:38] pawnbox: has joined #RubyOnRails
[05:45:23] Shoutsid: has joined #RubyOnRails
[05:46:05] CheckYourSix: has joined #RubyOnRails
[05:46:10] chrissonar: has joined #RubyOnRails
[05:48:35] MartinElvar: has joined #RubyOnRails
[05:49:19] pawnbox: has joined #RubyOnRails
[05:50:07] codezomb: has joined #RubyOnRails
[05:52:05] rvanlieshout: has joined #RubyOnRails
[05:55:22] Shoutsid: has joined #RubyOnRails
[05:58:06] krz: has joined #RubyOnRails
[06:03:40] dionysus69: has joined #RubyOnRails
[06:05:48] sanjayu: has joined #RubyOnRails
[06:06:12] riotjones: has joined #RubyOnRails
[06:10:04] Shoutsid: has joined #RubyOnRails
[06:13:31] workmad3: has joined #RubyOnRails
[06:14:30] fcser_: has joined #RubyOnRails
[06:15:51] sininen: has joined #RubyOnRails
[06:16:47] freezevee: has joined #RubyOnRails
[06:19:38] stannard: has joined #RubyOnRails
[06:20:24] norc: has joined #RubyOnRails
[06:26:29] helpa: has joined #RubyOnRails
[06:26:33] Radar: !botsnack
[06:26:33] helpa: Nom nom. Thanks, Radar!
[06:26:39] ejnahc: has joined #RubyOnRails
[06:26:49] yardenbar: has joined #RubyOnRails
[06:26:53] rhizome: it probably returns true/false
[06:26:58] darutoko: has joined #RubyOnRails
[06:27:22] yogeshrt: has joined #RubyOnRails
[06:27:28] tubbo: has joined #RubyOnRails
[06:27:33] davidt: has joined #RubyOnRails
[06:27:37] Shoutsid: has joined #RubyOnRails
[06:27:41] siddart: has joined #RubyOnRails
[06:27:54] eGGsha: has joined #RubyOnRails
[06:28:08] GJdan: has joined #RubyOnRails
[06:28:12] stardiviner: has joined #RubyOnRails
[06:28:12] roshanavand: has joined #RubyOnRails
[06:28:31] roshanavand: has joined #RubyOnRails
[06:29:23] Brando753: has joined #RubyOnRails
[06:29:30] annlewis: has joined #RubyOnRails
[06:30:02] hykykee: has joined #RubyOnRails
[06:31:31] arup_r: so I have `before_save :generate_one_time_password`. But I don't want this callback to run, when I will be doing Link.find(12).update(...)
[06:31:38] arup_r: https://gist.github.com/aruprakshit/9f7db717ef183e1dbec0
[06:31:55] arup_r: How can I avoid this callback while updating
[06:32:14] Mia: has joined #RubyOnRails
[06:32:38] arup_r: I want to avoid this specific callback generate_one_time_password while updating
[06:34:29] hyp3rkyd: has joined #RubyOnRails
[06:35:45] blackmesa: has joined #RubyOnRails
[06:35:48] CheckYourSix: has joined #RubyOnRails
[06:35:51] wcalderipe: has joined #RubyOnRails
[06:36:20] honzahov1: has joined #RubyOnRails
[06:37:14] l_tonz: has joined #RubyOnRails
[06:39:32] beast: has joined #RubyOnRails
[06:42:05] hyp3rkyd: has left #RubyOnRails: ()
[06:43:21] kwd: has joined #RubyOnRails
[06:44:17] sevenseacat: arup_r: so what you want isnt a before_save callback, it's only a before_create callback? how is it only a one-time password then?
[06:45:14] rubyonra_: has joined #RubyOnRails
[06:45:19] freezevee: has joined #RubyOnRails
[06:46:11] arup_r: Yes, I am now writing an update action, so I figured out that, I shouldn't use before_save, because the problem of using it in my situation reflects straight away. So, I have to go with before_create.
[06:49:30] freezevee: sevenseacat: can you help ?
[06:49:50] sevenseacat: freezevee: help you?
[06:50:00] sevenseacat: why would I want to do that?
[06:50:09] freezevee: sevenseacat: I know that you can, but do you want ?
[06:50:30] sevenseacat: go find someone else to insult
[06:50:36] freezevee: sevenseacat: If I change my nickname ?
[06:51:15] freezevee: why insult ? we're all a family here
[06:51:47] nickenchuggets__: has joined #RubyOnRails
[06:52:24] bruno-: has joined #RubyOnRails
[06:53:15] freezevee: ACTION hugs sevenseacat
[06:53:57] sevenseacat: you've entirely missed my point, but I'm used to that from you.
[06:55:13] freezevee: sevenseacat: what can I do to change your opinion about me ?
[06:55:33] sevenseacat: be a useful member of the channel.
[06:55:38] sevenseacat: instead of a whiny leech.
[06:55:41] freezevee: I'm afraid you've misjudged me
[06:56:10] quazimodo: I need to store opening time and closing time as 24hr format for each day of the week
[06:56:18] freezevee: sevenseacat: you're so cute when you talk like that
[06:56:33] quazimodo: and it needs to be something i can query like find all days where time is in the range opening time & closing time
[06:56:46] quazimodo: what's the recommended postgres/ar data type?
[06:56:50] freezevee: well my real intentions are those but somehow in the way I am being misjudged only by you
[06:57:43] arup_r: quazimodo: http://api.rubyonrails.org/classes/DateTime.html#method-i-end_of_day and its cousin
[06:58:34] arup_r: quazimodo: ohh. I missed your last question. :)
[06:59:08] arup_r: But yes, if you have a DateTime field, you can use those rails helpers I linked
[06:59:17] freezevee: sevenseacat: don't be prejudiced
[06:59:21] roshanavand: has joined #RubyOnRails
[07:00:15] Linuus: has joined #RubyOnRails
[07:01:45] sunya7a: has joined #RubyOnRails
[07:01:46] netzfisch: has joined #RubyOnRails
[07:02:25] krz: has joined #RubyOnRails
[07:02:35] rhizome: yeah, you're being unfair to leeches
[07:03:07] roshanavand: has joined #RubyOnRails
[07:04:10] freezevee: whiny leeches
[07:04:31] freezevee: no kidding, I wrote this down, this is creativity
[07:04:49] rhizome: glad i could be here to witness
[07:05:36] arBmind: has joined #RubyOnRails
[07:06:11] jas02: has joined #RubyOnRails
[07:07:36] MartinElvar: has joined #RubyOnRails
[07:08:39] yogeshrt: has joined #RubyOnRails
[07:09:54] jenrzzz: has joined #RubyOnRails
[07:10:18] freezevee: reality is harsh but I have to bear it
[07:10:41] freezevee: I will ask for help from the rest 578 people in this room
[07:11:08] baweaver: ACTION scratches head
[07:11:22] arup_r: baweaver: its ok. You can step back, :)
[07:11:30] nfk|laptop: has joined #RubyOnRails
[07:12:33] madebymarkca: has joined #RubyOnRails
[07:12:55] freezevee: I have set up some routes as "resources :profiles" in routes.rb, a typical controller and a form which sends data to @profile.In my controller, the @profile is set as @profile = current_user.profiles.find(params[:id]). When I use the form to create a profile, everything works fine. When I use the same form in order to update a profile, it doesn't work and I need to change the action where the form sends, and add "url:profile_path(@profil
[07:13:03] freezevee: how can I make my form work for both create/update ? I tried using if/then/else but it fails.
[07:13:17] norc: has joined #RubyOnRails
[07:13:24] freezevee: I mean I've tried <% if... in my .erb view
[07:14:02] freezevee: whiny leech asks for help
[07:14:17] workmad3: has joined #RubyOnRails
[07:14:35] arup_r: freezevee: make a quick gist. :)
[07:15:03] arup_r: just show the form_for for now
[07:15:48] norc: Radar: I want to create a batch of cities in a transaction (either all or none), but get all error message. Is this fine?
[07:16:02] norc: (Sorry for the delay, boss came in)
[07:16:09] norc: http://pastie.org/10478115
[07:16:23] freezevee: arup_r: https://gist.github.com/chrisvel/09cecc418bb739b8419e
[07:16:49] freezevee: arup_r: <%= form_for(@profile, :html => {:class => "ui small form", id: "myForm"}) do |f| %> is all in the form_for
[07:17:07] michael_mbp: has joined #RubyOnRails
[07:17:30] freezevee: arup_r: this way, the create action posts data successfully but the update just renders :edit with wrong data
[07:17:36] arup_r: That looks ok. So you meant, when you are trying to update it is not going to the `update` action.
[07:18:00] alex88: has joined #RubyOnRails
[07:18:03] freezevee: arup_r: If I change it to form_for(@profile, url:profile_path(@profile) it works
[07:18:31] freezevee: usually new controllers work with routes by using "resources :xxxxxx"
[07:18:35] arup_r: time to see your controller if you dont mind. :)
[07:18:46] freezevee: arup_r: thanks, it's in the gist
[07:18:59] arup_r: ok. I see. Long gist.. so overlooked
[07:19:11] freezevee: I've also tried to use binding.pry to see what happens but never gets there
[07:19:36] freezevee: and I've changed the route inside resources only for update
[07:19:36] Pupeno: has joined #RubyOnRails
[07:19:47] freezevee: I am searching for ideas on how to debug deeper
[07:20:23] comrad: has joined #RubyOnRails
[07:20:45] arup_r: ok. Here https://gist.github.com/chrisvel/09cecc418bb739b8419e#file-profiles_controller-rb-L85 current_user.profiles gives what object? User object?
[07:21:28] freezevee: arup_r: yes
[07:21:49] freezevee: In User model, has_many :profiles, class_name: "User", :foreign_key => "profile_id"
[07:21:55] freezevee: and belongs_to :user, foreign_key: :profile_id
[07:21:56] guardianL: has joined #RubyOnRails
[07:22:08] freezevee: it's a relation to the same table
[07:22:08] arup_r: hum. self join
[07:24:09] norc_: has joined #RubyOnRails
[07:24:23] arup_r: hum. Sorry, then form_for should go do PUT to update. do you have a problem with rendering the edit? I messed up myself. :(
[07:24:50] arup_r: What is your problem again with resourceful form_for declaration ?
[07:26:03] absklb: has joined #RubyOnRails
[07:26:43] absklb: doing multiple ajax to get info will be better or sending bulk data from controller to view and then on view just use js to process that data will be better?
[07:27:20] freezevee: arup_r: I didn't look for put in rake routes
[07:27:38] freezevee: arup_r: the same form is being used for create/update actions
[07:27:49] ruurd: has joined #RubyOnRails
[07:28:05] freezevee: arup_r: create works with @profile but update needs @profile, url: profiles_path(@profile) to work
[07:28:07] norc_: absklb: Right now Im doing the latter
[07:28:18] arup_r: Yes, it seems your update is working, but not rendering `edit`.. right?
[07:28:30] norc_: absklb: But I work in batches of multiple dozens of even up to a hundred.
[07:28:53] norc_: absklb: If you expect only few I recommend the first - its cleaner and simpler to implement.
[07:29:19] absklb: i will be returning a courses modules data and then its items data to view in hidden field. then js to process it
[07:29:49] freezevee: arup_r: I enter binding.pry inside if @profile.update_without_password(user_params) but it never goes there
[07:29:53] stardiviner: has joined #RubyOnRails
[07:30:15] freezevee: so I suppose it's false
[07:30:16] absklb: it will take (per course X all its modules) X each item of module per refresh
[07:30:24] annlewis: has joined #RubyOnRails
[07:30:40] Pharaoh2: has joined #RubyOnRails
[07:31:51] srinidhi: has joined #RubyOnRails
[07:32:13] freezevee: arup_r: If I enter binding.pry right after def update action, it also never gets called
[07:32:38] freezevee: arup_r: it seems that the form_for doesn't send data to the #update but always to #create
[07:33:00] arup_r: no idea. for me without real testing, looks form_for ok.
[07:33:14] herbst: has joined #RubyOnRails
[07:33:40] freezevee: arup_r: I checked out the post request and data seem to be fine, nothing strange
[07:33:54] arup_r: ok. no idea then. :/
[07:34:03] freezevee: arup_r: I believe it's a matter of routing but I don't know why it should be different from other resources
[07:34:09] freezevee: arup_r: np thanks
[07:34:13] arup_r: You definitely doing something wrong.. debug it more.
[07:34:46] freezevee: I know but what more than binding.pry ?
[07:34:51] artto: has joined #RubyOnRails
[07:36:12] srinidhi: has joined #RubyOnRails
[07:36:19] arup_r: well. As you said, that the form submission not coming to update. So do pry.binding in the view itself.
[07:36:32] arup_r: check there, if @profile..persisted or not
[07:36:41] arup_r: go check this first.. step back
[07:37:40] solars: has joined #RubyOnRails
[07:38:11] freezevee: I haven't thought that pry works in the view
[07:38:15] freezevee: thanks for that
[07:38:20] Shoutsid: has joined #RubyOnRails
[07:38:54] zorbash: has joined #RubyOnRails
[07:39:42] jgt: has joined #RubyOnRails
[07:40:53] jsrn_: has joined #RubyOnRails
[07:41:38] arup_r: it works.. where ruby works.. haha
[07:41:58] l_tonz: has joined #RubyOnRails
[07:42:40] zpe: has joined #RubyOnRails
[07:45:20] Palsson: has joined #RubyOnRails
[07:46:22] LinhVN: has joined #RubyOnRails
[07:49:36] Hates_: has joined #RubyOnRails
[07:50:05] Hates__: has joined #RubyOnRails
[07:50:37] pydave6367: has joined #RubyOnRails
[07:52:29] roshanavand: has joined #RubyOnRails
[07:55:04] LinhVN: has left #RubyOnRails: ()
[07:56:26] Skelz0r: has joined #RubyOnRails
[07:57:37] jgt: has joined #RubyOnRails
[07:57:50] The_Phoenix1: has joined #RubyOnRails
[07:58:50] mikecmpbll: has joined #RubyOnRails
[07:58:57] MartinElvar: has joined #RubyOnRails
[07:59:00] craysiii: has joined #RubyOnRails
[07:59:02] n008f4g_: has joined #RubyOnRails
[07:59:13] craysiii: good morning/evening
[07:59:57] allcentury: has joined #RubyOnRails
[08:01:26] bruno-: has joined #RubyOnRails
[08:01:42] nya: has joined #RubyOnRails
[08:01:52] kalusn: has joined #RubyOnRails
[08:02:46] norc_: Is there an equivalent to ActiveRecord::Persistence::ClassMethods#create that deletes passed records, returning the objects along with error messages to indicate whether it worked (and if not what the error message is) ?
[08:03:33] voker57: has joined #RubyOnRails
[08:03:34] voker57: has joined #RubyOnRails
[08:03:54] norc_: I want something like Foo.delete(Foo.first, Foo.second).map(&:errors).map(&:"empty?")
[08:04:49] zpe_: has joined #RubyOnRails
[08:06:24] norc_: Ah, destroy is what I want. :)
[08:06:48] allcentury: has joined #RubyOnRails
[08:06:54] krisquigley: has joined #RubyOnRails
[08:08:30] DoubleMalt: has joined #RubyOnRails
[08:10:05] tvw: has joined #RubyOnRails
[08:10:47] Ergo: has joined #RubyOnRails
[08:11:03] zpe: has joined #RubyOnRails
[08:11:15] jgt: has joined #RubyOnRails
[08:11:30] madebymarkca: has joined #RubyOnRails
[08:11:56] nya: has joined #RubyOnRails
[08:12:03] pawnbox: has joined #RubyOnRails
[08:12:28] roshanavand: has joined #RubyOnRails
[08:13:09] roshanavand: has joined #RubyOnRails
[08:13:40] krz: has joined #RubyOnRails
[08:15:04] workmad3: has joined #RubyOnRails
[08:15:58] roshanavand: has joined #RubyOnRails
[08:20:27] stannard: has joined #RubyOnRails
[08:21:54] voker57: has joined #RubyOnRails
[08:22:00] lukekhamilton: has joined #RubyOnRails
[08:23:09] artto: has joined #RubyOnRails
[08:25:51] jenrzzz: has joined #RubyOnRails
[08:26:04] nickenchuggets: has joined #RubyOnRails
[08:26:05] artto: has joined #RubyOnRails
[08:26:13] MaDErroR123: has joined #RubyOnRails
[08:28:43] Peg-leg: has joined #RubyOnRails
[08:28:59] mark2: has joined #RubyOnRails
[08:29:28] AzaToth: has joined #RubyOnRails
[08:29:47] stardiviner: has joined #RubyOnRails
[08:30:53] ruurd: has joined #RubyOnRails
[08:31:08] kitsuneyo: has joined #RubyOnRails
[08:31:14] annlewis: has joined #RubyOnRails
[08:31:57] kitsuneyo: is eloquent javascript the best book for beginners? it seems pretty good from the intro
[08:32:34] The_Phoenix: has joined #RubyOnRails
[08:34:45] adre: has joined #RubyOnRails
[08:34:51] sevenseacat: kitsuneyo: they might have more of an opinion in #javascript
[08:34:55] The_Phoenix: has joined #RubyOnRails
[08:35:04] kitsuneyo: yeah i guess
[08:35:34] ngr: mikecmpbll: did not forget about you ;) here is what my implementation of what I call 'sub_id' looks like: https://gist.github.com/ngrash/b0bb493fa2441670d934#file-has_sub_id-rb
[08:35:47] workmad3: has joined #RubyOnRails
[08:36:31] blackmesa: has joined #RubyOnRails
[08:36:37] yogeshrt: has joined #RubyOnRails
[08:38:13] roshanavand: has joined #RubyOnRails
[08:38:37] simplyianm: has joined #RubyOnRails
[08:38:38] mikecmpbll: ngr: https://gist.github.com/ngrash/b0bb493fa2441670d934#file-has_sub_id-rb-L40 <-- this can be improved with `maximum`
[08:39:03] mikecmpbll: but yeah, looks fine :]
[08:39:32] beast_: has joined #RubyOnRails
[08:40:13] The_Phoenix1: has joined #RubyOnRails
[08:40:58] bruno-_: has joined #RubyOnRails
[08:41:22] krisquigley: has joined #RubyOnRails
[08:41:59] zpe: has joined #RubyOnRails
[08:46:34] norc_: ActionController::Parameters.new({foo: [{a: 1}, {a: 2}]}).require(:foo) -- how can I permit the array inside?
[08:46:47] norc_: Or do I just have to nest the array inside a hash?
[08:46:57] solars: has joined #RubyOnRails
[08:51:41] andywww: has joined #RubyOnRails
[08:52:15] The_Phoenix: has joined #RubyOnRails
[08:52:48] norc_: ActionController::Parameters.new({bulk: {list: [{a:1}, {a:2}]}}).require(:bulk).permit(list: [:a]) this seems bizarre...
[08:54:05] lukekhamilton: has joined #RubyOnRails
[08:54:14] mikecmpbll: norc_: what's bizarre? :)
[08:54:38] norc_: mikecmpbll: I dont want that extra Hash. :(
[08:55:04] GreatSage: has joined #RubyOnRails
[08:55:26] GreatSage: completely noob question: how to setup the initial database?
[08:56:02] norc_: mikecmpbll: { cities: [{id: 1, name: "New York"}, {id: 2, name: nil}] } -- I would like to require city: [] and permit :id / :name inside that array
[08:56:23] norc_: GreatSage: Depends on what you have set up. Do you have migrations or a schema to load?
[08:56:40] GreatSage: there's a schema.rb
[08:57:04] norc_: GreatSage: rake db:schema:load will execute that schema.rb migration then.
[08:57:46] GreatSage: that's good, thanks
[08:58:04] norc_: GreatSage: Your migrations can then be loaded with rake db:migrate
[08:58:08] ruurd: has joined #RubyOnRails
[08:58:19] GreatSage: I tried to run it with RubyMine, didn't work
[08:59:08] GreatSage: I'm completely new to ruby and rails, actually
[08:59:24] zorbash: has joined #RubyOnRails
[08:59:29] norc_: GreatSage: I recommend a book or a guide (look at the channel topic) then. :)
[08:59:32] mikecmpbll: GreatSage: !didntwork
[08:59:32] helpa: GreatSage: 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.
[08:59:55] GreatSage: helpa: I could run the ones in the migrate folder
[09:00:06] GreatSage: but schema spit out an error
[09:00:31] GreatSage: but the rake command did it, so no need to fix it anymore, that's why I didn't specify
[09:00:40] marr: has joined #RubyOnRails
[09:01:17] quazimodo: has joined #RubyOnRails
[09:01:27] mikecmpbll: norc_: you probably just want ActionController::Parameters.new({foo: [{a: 1}, {a: 2}]}).permit(foo: [:a])
[09:02:05] Balzrael: has joined #RubyOnRails
[09:02:31] norc_: mikecmpbll: Yeah, that would allow for an empty parameter Hash though.
[09:03:14] tetraktys: has joined #RubyOnRails
[09:03:25] norc_: ActionController::Parameters.new({}).permit(list: [:a]).permitted? # => true
[09:03:33] mikecmpbll: you're parameters don't really fit in with the idea of rails resources, that's why you're struggling
[09:03:43] mikecmpbll: a resource has attributes, hence a hash. you can require the resource and permit it's attributes
[09:04:06] michael_mbp: has joined #RubyOnRails
[09:04:51] mikecmpbll: your resource is actually, a collection of other resources, so it should be soemthing like collection_resource: { resources: [...] }
[09:04:52] ngr: mikecmpbll: thanks for having a look :)
[09:05:04] mikecmpbll: because the resources is a property of the collection
[09:05:19] jenrzzz: has joined #RubyOnRails
[09:05:32] norc_: mikecmpbll: Ah. So what I originally called bizarre ends up being the correct way (I was just a bit off with the terminology there).
[09:05:47] norc_: What you said makes perfect sense.
[09:07:49] mojo-jojo: has joined #RubyOnRails
[09:08:08] polycaster: has joined #RubyOnRails
[09:08:34] The_Phoenix: has joined #RubyOnRails
[09:10:35] zpe: has joined #RubyOnRails
[09:11:17] ruurd: has joined #RubyOnRails
[09:11:31] norc_: Also, is there a way to have a transaction and cause a rollback without an exception?
[09:12:30] jenrzzz: has joined #RubyOnRails
[09:12:57] mikecmpbll: yep, raise ActiveRecord::Rollback
[09:18:13] wcalderipe: has joined #RubyOnRails
[09:18:18] zpe: has joined #RubyOnRails
[09:21:44] workmad3: has joined #RubyOnRails
[09:21:45] stamina: has joined #RubyOnRails
[09:23:46] rvanlieshout: and rescue that
[09:23:54] kitsuneyo: has joined #RubyOnRails
[09:25:29] mikecmpbll: nah the transaction handles it all
[09:28:40] nya: has joined #RubyOnRails
[09:29:54] pontiki: has joined #RubyOnRails
[09:29:56] Linuus: has joined #RubyOnRails
[09:30:07] krz: has joined #RubyOnRails
[09:31:49] annlewis: has joined #RubyOnRails
[09:31:51] pontiki: i'm trying to figure out something with rails generators: i'm using the haml-rails gem, but i want to replace their view templates with my own.
[09:32:53] pontiki: i think the problem is the path to my templates; i put them in lib/templates/haml/scaffold/templates/, but `rails g scaffold` is not picking them up
[09:33:08] The_Phoenix: has joined #RubyOnRails
[09:33:11] mbuf: has joined #RubyOnRails
[09:33:41] rvanlieshout: pontiki: how often would you need that? cause you can just replace the content of the generated view with what you need
[09:33:53] MartinElvar: has joined #RubyOnRails
[09:34:13] arup_r: has joined #RubyOnRails
[09:34:33] mbuf: I have a column in a table of type date, and I want to change it to datetime; should I update the values to include 00:00:00.000000 are if the time is not there, do they assume them to be 00:00:00.000000 in UTC?
[09:34:40] pontiki: i'm trying to figure out how it works, rvanlieshout
[09:35:53] SteenJobs: has joined #RubyOnRails
[09:37:18] zpe_: has joined #RubyOnRails
[09:37:22] DEA7TH: has joined #RubyOnRails
[09:37:23] MartinElvar: has joined #RubyOnRails
[09:38:58] mikecmpbll: pontiki: i think it'll have to be at lib/templates/haml/scaffold/*
[09:39:34] mikecmpbll: inferring from the lib/templates/erb/scaffold path for erb
[09:40:39] pontiki: mikecmpbll: thanks that's what does it!
[09:40:44] pontiki: i was just one layer too deep
[09:42:12] kitsuneyo: has joined #RubyOnRails
[09:50:40] pawnbox: has joined #RubyOnRails
[09:52:44] pawnbox: has joined #RubyOnRails
[09:54:20] jaybedubb: has joined #RubyOnRails
[10:00:07] nya: has joined #RubyOnRails
[10:00:16] zpe: has joined #RubyOnRails
[10:02:15] dhjondoh: has joined #RubyOnRails
[10:02:52] The_Phoenix: has joined #RubyOnRails
[10:04:42] Scripore: has joined #RubyOnRails
[10:05:20] bmalum: has joined #RubyOnRails
[10:08:01] jenrzzz: has joined #RubyOnRails
[10:08:04] Linuus: has joined #RubyOnRails
[10:08:51] blackhuey1: has joined #RubyOnRails
[10:11:21] stardiviner: has joined #RubyOnRails
[10:11:48] The_Phoenix: has joined #RubyOnRails
[10:20:26] rickmasta: has joined #RubyOnRails
[10:21:14] stannard: has joined #RubyOnRails
[10:25:33] darkpaladin: has joined #RubyOnRails
[10:27:34] pawnbox: has joined #RubyOnRails
[10:29:09] darkpaladin: has joined #RubyOnRails
[10:29:50] herbst: has joined #RubyOnRails
[10:30:10] allcentury: has joined #RubyOnRails
[10:32:30] pawnbox: has joined #RubyOnRails
[10:32:34] annlewis: has joined #RubyOnRails
[10:32:59] devops: has joined #RubyOnRails
[10:33:08] bobbobbins: has joined #RubyOnRails
[10:33:58] nettoweb: has joined #RubyOnRails
[10:34:19] mrbubbles: has joined #RubyOnRails
[10:35:03] absklb: has joined #RubyOnRails
[10:36:06] beauby: has joined #RubyOnRails
[10:36:12] absklb: i have users_controller in my app controllers. i have def nextmoduleurl in that. i am doing $.ajax({url: "/users/nextmoduleurl", success: function(result){ in my js. i have resources :users do
[10:36:13] absklb: 11 get :nextmoduleurl, on: :collection
[10:36:40] absklb: but i get error 500 internal server error while executing this in web page.
[10:36:41] doodlehaus: has joined #RubyOnRails
[10:36:47] ashrocket: has joined #RubyOnRails
[10:37:03] ashrocket: Hi, I???m looking for a recommendation for Pre-Interview Ruby on Rails platforms.
[10:37:07] ashrocket: Does anyone have any favorites?
[10:37:27] ashrocket: Bascially I just want an entry level Rails test that I don???t need to custom build for each candidate?
[10:38:31] jenrzzz: has joined #RubyOnRails
[10:38:34] craysiii: has joined #RubyOnRails
[10:39:06] arup_r: has joined #RubyOnRails
[10:39:20] youngbaks: has joined #RubyOnRails
[10:39:31] honzahov1: has joined #RubyOnRails
[10:40:37] srinidhi: has joined #RubyOnRails
[10:41:43] sanjayu: has joined #RubyOnRails
[10:42:53] bluelf: has joined #RubyOnRails
[10:44:37] tetraktys: has joined #RubyOnRails
[10:45:33] pawnbox: has joined #RubyOnRails
[10:45:47] cac: has joined #RubyOnRails
[10:51:01] jenrzzz: has joined #RubyOnRails
[10:51:10] rodfersou: has joined #RubyOnRails
[10:51:55] Linuus: has joined #RubyOnRails
[10:54:08] michael_mbp: has joined #RubyOnRails
[10:58:03] herbst: has joined #RubyOnRails
[11:00:41] juhoh: has joined #RubyOnRails
[11:00:51] EdwardIII: hey, in controllers, where does the model object name come from? https://gist.github.com/EdwardIII/a399d2bcd4f5c1cb8f0a
[11:01:11] EdwardIII: like in django i'd say 'from models import FormAttempt'
[11:01:23] juhoh: what kind of solutions are you guys using for notifying inactive user (based on their activity within the app)?
[11:01:28] EdwardIII: is this something to do with ruby module loading? or rails magic?
[11:01:56] renegadeandy: has joined #RubyOnRails
[11:01:57] tbuehlmann: EdwardIII, that's rails magic, the constant is loaded lazily in development when first accessed
[11:02:07] tbuehlmann: in production it's eager loaded
[11:02:09] renegadeandy: Hey guys, can you help with a css question using a rails form helper : https://gist.github.com/renegadeandy/50be91f4062894409e32
[11:02:26] EdwardIII: tbuehlmann: it's eager loaded so you get an exception on first load rather than later down the line?
[11:02:39] EdwardIII: tbuehlmann: if there's some doc i should be reading rather than asking just let me know heh
[11:03:13] tbuehlmann: not sure there is one. it's just that you don't need to require dependencies explicitly
[11:03:25] Palsson: has joined #RubyOnRails
[11:03:35] EdwardIII: i'm fairly curious about this
[11:03:47] tbuehlmann: there we go: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[11:04:10] roshanavand: has joined #RubyOnRails
[11:04:34] EdwardIII: cool thanks
[11:05:08] tbuehlmann: the stuff in app/ is autoloaded when accessed. if you want stuff from /lib being autoloaded as well, you'd need to configure that in config/application.rb (or another file that is being evaluated at startup)
[11:05:22] mostlybadfly: has joined #RubyOnRails
[11:05:28] EdwardIII: and if someone came to this project and they wanted to find that model they'd know how to do that... by convention? because in rails apps models are always in app/models/*.rb?
[11:05:52] tbuehlmann: if you know it's a model, then app/models is the place for it, right
[11:05:53] MaDErroR123: has joined #RubyOnRails
[11:06:50] EdwardIII: as a fresh developer dropping into someone elses code how would you know?
[11:07:14] tbuehlmann: you can't really know. I personally would let sublime text do the work and just search for a file with that name
[11:07:21] tbuehlmann: as files should have the lowercased class name
[11:08:24] guardianL: has joined #RubyOnRails
[11:08:37] EdwardIII: right ok so it's still a kind of "i should be able to find this by convention" type thing
[11:09:17] ashrocket: renegadeandy: What???s the actual question??
[11:09:48] norc_: EdwardIII: That is what the _entire_ Rails framework is about.
[11:09:59] renegadeandy: ashrocket: How can I apply css styles when using the options_from_collection_for_select form helper
[11:10:06] norc_: EdwardIII: Convention over configuration.
[11:10:09] pabvid: has joined #RubyOnRails
[11:10:22] dhjondoh: has joined #RubyOnRails
[11:10:25] tbuehlmann: if it's part of the application, that's no problem, yeah. if it's coming from a gem, you're screwed
[11:10:25] ashrocket: renegadeandy: rails forms or simple_form gem or formtastic? answer is different for each unfortunately
[11:10:35] renegadeandy: rails forms ashrocket
[11:10:37] tbuehlmann: that's why I actually prefer being explicit about requiring dependencies
[11:10:42] EdwardIII: tbuehlmann: hah right ok
[11:10:52] EdwardIII: i'm still getting a feel for the framework
[11:11:13] EdwardIII: i guess the probability of using a model from a framework is quite high? say if you're using spree for example?
[11:11:19] EdwardIII: s/framework/gem
[11:11:21] tbuehlmann: there are still some rare cases where you'd need to require a dependency inside rails, using require_dependency. but that's really rare
[11:11:58] norc_: Indeed. Most of the time there is some magical unicorn loader that makes your gem/library pop into exitistence.
[11:12:16] tbuehlmann: EdwardIII, I almost never had to use a model from a gem. but if you're using spree or other kinds of engines, that can be the case, yep
[11:12:28] arup_r: renegadeandy: You got the answer ?
[11:12:46] renegadeandy: arup_r: no, not yet
[11:13:01] renegadeandy: arup_r: can you help
[11:13:41] EdwardIII: tbuehlmann: yeah i'm quite interested in this. e.g. i do a lot of apps that need to have cms-like functionality
[11:13:54] arup_r: css styles to <option> tags ?
[11:14:03] EdwardIII: django-mptt and feincms were quite nice to that - very light but easy to extend, like a base for a cms
[11:14:07] hephaestus_rg: has joined #RubyOnRails
[11:14:15] renegadeandy: arup_r: when created using the options_from_collection_for_select helper
[11:14:28] tbuehlmann: EdwardIII, there are some in the rails ecosystem as well
[11:15:01] rushed: EdwardIII: if you're building a large number of CMS style template sites, Rails might not be the best choice
[11:15:30] ashrocket: renegadeandy: Unfortunately, options_from_collection only supports value and text methods. So you???ll need to either use a block instead of options_from_collection, or write your own method.
[11:15:38] EdwardIII: rushed: i'm designing heavily custom webapps for for different requirements which often require a cms-like component
[11:16:09] renegadeandy: ashrocket: surprisingly basic...
[11:16:14] ashrocket: http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-options_from_collection_for_select
[11:16:24] rushed: EdwardIII: if you say so :)
[11:16:24] ashrocket: Take a look at the source, it doesnt have any input for html attributes.
[11:16:42] ashrocket: but you can add a block instead of using options_from_collection_for_select (that???s my preference in this case)
[11:16:52] renegadeandy: ashrocket: got an example?
[11:16:59] renegadeandy: ashrocket: still not confident with blocks
[11:17:08] ashrocket: A block can be passed to select to customize how the options tags will be rendered. This is useful when the options tag has complex attributes.
[11:17:09] ashrocket: select(report, "campaign_ids") do
[11:17:10] ashrocket: available_campaigns.each do |c|
[11:17:11] ashrocket: content_tag(:option, c.name, value: c.id, data: { tags: c.tags.to_json })
[11:17:39] ashrocket: Take a look at the example, it???s not too complicated. Just grab your source for the options, do an EACH in the block and then drop the option in with content_tag.
[11:18:16] ashrocket: The alternative is a bit messier in my opinion, but here???s a post on rolling your own custom method for options_from_collection (you???d put this in the helper file for that controller, or ideally in the helper file for application)....
[11:18:22] ashrocket: http://thehungrycoder.com/ruby-on-rails/rails-options_from_collection_for_select-with-custom-attributes-for-each-option.html
[11:18:26] wethu: has joined #RubyOnRails
[11:18:34] wethu: has joined #RubyOnRails
[11:18:35] ashrocket: instead of adding data attrbutes, add class attributes
[11:18:40] ashrocket: again that???s kind of a lot of work
[11:18:56] ashrocket: and if you???re going to go that route, I???d suggest just upgrading your forms to formtastic or simple_form
[11:20:14] quazimodo: has joined #RubyOnRails
[11:21:26] atmosx: has joined #RubyOnRails
[11:23:30] jammanbo: has joined #RubyOnRails
[11:24:05] LiquidInsect: has joined #RubyOnRails
[11:24:22] EdwardIII: formtastic > scaffolding?
[11:24:29] mbuf: has left #RubyOnRails: ("Ex-Chat")
[11:24:34] chills42: has joined #RubyOnRails
[11:24:47] doodlehaus: has joined #RubyOnRails
[11:25:12] jenrzzz: has joined #RubyOnRails
[11:25:18] pawnbox: has joined #RubyOnRails
[11:27:32] jammanbo: Got a Dragonfly question if anyone can help me. I'm trying to create a file directly from some text; `an_object.file = Dragonfly::TempObject.new(some_string)`. It works and all, but does anyone know how to set the mime type and the name that the file gets downloaded as when you visit its URL?
[11:27:37] pawnbox: has joined #RubyOnRails
[11:28:02] EdwardIII: application_controller.rb is way smaller than i thought
[11:29:42] jkamenik: has joined #RubyOnRails
[11:29:56] tbuehlmann: EdwardIII, what did you expect?
[11:30:56] ashrocket: https://gist.github.com/ashrocket/9a3316578f36c89f4a93
[11:30:57] Icey: has joined #RubyOnRails
[11:31:00] ashrocket: renegadeandy: https://gist.github.com/ashrocket/9a3316578f36c89f4a93
[11:31:13] ashrocket: No guarantees, but this should bascially do what you need without changing the way you handle forms now
[11:32:02] ashrocket: EdwardIII: If you are knee deep in your project don???t switch to formtastic or simple_form, these are both GREAT gems that make build forms much easier and allow you to do much more complex things with forms,.
[11:32:14] ashrocket: but switching in the middle of a project is a pain
[11:33:09] ashrocket: Any Senior Ruby Developers who have hired other ruby developers, here???s a question for you: I???m looking for a recommendation for Pre-Interview Ruby on Rails platforms. - Favorites?
[11:33:34] annlewis: has joined #RubyOnRails
[11:33:36] workmad3: ashrocket: what is a 'pre-interview RoR platform'?
[11:33:48] EdwardIII: ashrocket: right, makes sense
[11:34:00] rushed: fizz buzz as a service?
[11:34:10] renegadeandy: ashrocket: made a couple of tweaks, looks good - thanks https://gist.github.com/renegadeandy/fc47e1e7717b489c439a
[11:34:34] workmad3: rushed: some people I work with created a BaaS system at a devfest recently... Boolean as a Service
[11:35:10] ashrocket: workmad3: An online rails test for candidates to take before you interview them
[11:35:38] ashrocket: I???m looking for a recommendation for Pre-Interview Ruby on Rails Skills Testing platforms. - Favorites?
[11:35:51] ashrocket: workmad3: modified request to include ALL the words needed :0
[11:35:52] workmad3: ashrocket: ah, ok, so a pre-screening to double-check that canditates can pass a RoR test
[11:36:02] ashrocket: workmad3: yup
[11:36:12] ashrocket: something easy, accurate, cheap and not too ugly
[11:36:20] workmad3: never bothered using one personally, and never had to do one for a job either
[11:36:34] ashrocket: Not looking to stress developers out with hard core skills tests
[11:36:49] ashrocket: just need a sanity check that they can code their way out of a paper bag with Rails
[11:36:55] workmad3: ashrocket: mostly because out of the 4 things you've picked, that sort of test is a case of "Pick 1"
[11:37:09] ashrocket: workmad3: lol
[11:37:28] ashrocket: workmad3: you know of an expensive one?
[11:37:33] ldnunes: has joined #RubyOnRails
[11:37:41] ashrocket: that is accurate and pretty, ?
[11:38:05] rushed: ashrocket: "what is your github profile"
[11:38:13] artto: has joined #RubyOnRails
[11:38:14] rushed: ashrocket: *as a service
[11:38:24] pawnbox: has joined #RubyOnRails
[11:39:14] ashrocket: rushed: yes that does work as a post sanity check
[11:39:39] ashrocket: I???m looking for somehting that the recruitment agency can use as a pass/fail to make sure we don???t get swampled in unqualified candidates
[11:40:11] ashrocket: we???ve seen a lot of ???i???ve used ruby before??? and they don???t even understand yield or block much less helpers and forms and Gemfile and routes
[11:40:19] workmad3: ashrocket: ah, you're using a recruitment agency... there's flaw one ;)
[11:40:34] ashrocket: and I don???t want developers spending hours looking through node.js projects looking for a decent Rails programmer
[11:40:54] ashrocket: workmad3: If you needed 30 developers in 6 months, you???d be using agencies too
[11:41:02] ashrocket: there is no way around it when you need to staff up quickly
[11:41:22] workmad3: ashrocket: if I needed 30 decent developers in 6 months, I'd probably give up and look for a different company
[11:41:38] michael_mbp: has joined #RubyOnRails
[11:43:00] workmad3: ashrocket: unless remote is ok... at which point I'd basically start canvassing for recommendations amongst people I know ;)
[11:44:02] workmad3: ashrocket: but I don't have a particularly high degree of confidence in either recruitment agencies, or the sorts of tests that agencies would be capable of running in order to screen candidates
[11:44:14] pawnbox: has joined #RubyOnRails
[11:44:29] workmad3: ashrocket: I also wouldn't trust recruitment agencies to not hire a single dev to get the answers to the test and then feed them to all candidates
[11:45:06] rushed: also suspicious: groups who need to add thirty developers in six months but don't know where to find them~
[11:45:38] s2013: has joined #RubyOnRails
[11:47:00] tbuehlmann: there should be some ex-twitter engineers on the market, grab them?
[11:48:30] pawnbox: has joined #RubyOnRails
[11:51:28] arup_r: renegadeandy: ashrocket code works, but more decent way to solve your solution is with the help of select_tag and http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/options_for_select helper
[11:52:01] stannard: has joined #RubyOnRails
[11:52:10] arup_r: options_for_select allows you to provide HTML attributes to pass for <option> tags
[11:52:48] arup_r: build a method inside the model and get ready the collection and then feed it to options_for_select with select tag
[11:53:11] arup_r: don't need to make it manually :D
[11:53:18] inoter: has joined #RubyOnRails
[11:53:29] rvanlieshout: the model should not return html
[11:53:48] yogeshrt: has joined #RubyOnRails
[11:53:51] arup_r: No it is not.. Well put them then inside the helpers
[11:53:57] rvanlieshout: in a decorator
[11:54:14] arBmind: has joined #RubyOnRails
[11:56:04] arup_r: rvanlieshout: building helpers specific to a model which can be reused is a bad practice? Just asking..
[11:56:26] rvanlieshout: not by defenition no
[11:56:30] syath: has joined #RubyOnRails
[11:57:51] arup_r: My own rails project didn't scale yet so that I can user any service object, decorator patterns.. etc :(
[11:59:14] renegadeandy: ashrocket: but why do i get an empty option tag when using this : https://gist.github.com/renegadeandy/f9439dff28c2ab3f833c --i wonder if its to do with the nil in the select tag
[11:59:29] jenrzzz: has joined #RubyOnRails
[12:00:02] Scripore: has joined #RubyOnRails
[12:00:23] artto: has joined #RubyOnRails
[12:00:35] wcalderipe: has joined #RubyOnRails
[12:02:03] ruurd: has joined #RubyOnRails
[12:02:25] Icey: has joined #RubyOnRails
[12:03:17] nya: has joined #RubyOnRails
[12:04:00] The_Phoenix: has joined #RubyOnRails
[12:04:33] honzahov1: has joined #RubyOnRails
[12:04:37] renegadeandy: ashrocket: im pretty sure its the nil, can you help?
[12:04:52] artto: has joined #RubyOnRails
[12:07:24] renegadeandy: Can anybody help me to remove this empty option tag created using the rails form for helpers https://gist.github.com/renegadeandy/f9439dff28c2ab3f833c I thikn its because of the nil in the select tag helper
[12:09:30] cac: has joined #RubyOnRails
[12:09:43] nyaa: has joined #RubyOnRails
[12:10:47] ashrocket: renegadeandy: I don???t see an empty one?
[12:10:57] doodlehaus: has joined #RubyOnRails
[12:11:34] nyaa: has joined #RubyOnRails
[12:15:32] renegadeandy: ashrocket: annoyingly when i copy paste from chrome it removes it...but its there
[12:16:24] bmalum: has joined #RubyOnRails
[12:16:32] ashrocket: oh yeah I see it
[12:17:26] rvanlieshout: what empty one?
[12:17:46] rvanlieshout: ah. there, try the include_blank flag for the select
[12:18:55] kitsuneyo: has joined #RubyOnRails
[12:18:58] srinidhi: has joined #RubyOnRails
[12:19:04] dici: has joined #RubyOnRails
[12:19:41] renegadeandy: ive tried include_blank:false
[12:19:44] renegadeandy: but it doesnt respect it
[12:20:05] rvanlieshout: tried that where?
[12:20:20] cac: has joined #RubyOnRails
[12:20:52] naftilos76: has joined #RubyOnRails
[12:21:04] rvanlieshout: as the options {} or the html_options {} ?
[12:22:08] annlewis: has joined #RubyOnRails
[12:23:18] cgfbee: has joined #RubyOnRails
[12:24:00] renegadeandy: <%=f.select :primary_category,nil,{include_blank:false}, {:class=> "newevent form-control input-select check-select", :required=>true} do %>
[12:24:11] renegadeandy: that makes no difference,a blank is still shown
[12:26:22] krisquigley: has joined #RubyOnRails
[12:26:35] jenrzzz: has joined #RubyOnRails
[12:27:37] annlewis: has joined #RubyOnRails
[12:28:31] jgt: has joined #RubyOnRails
[12:32:32] mrbubbles: has joined #RubyOnRails
[12:32:43] krisquigley: has joined #RubyOnRails
[12:34:12] mrbubbles: has joined #RubyOnRails
[12:34:23] The_Phoenix: has joined #RubyOnRails
[12:34:48] rubyonrailed: has joined #RubyOnRails
[12:36:40] gerep: has joined #RubyOnRails
[12:37:51] deception1: has joined #RubyOnRails
[12:37:52] JohnBat26: has joined #RubyOnRails
[12:39:39] yogeshrt: has joined #RubyOnRails
[12:41:41] absklb: i am doing rake routes | less and it just cleares current terminal and dont showw anything.
[12:41:46] dhjondoh: has joined #RubyOnRails
[12:41:54] absklb: oh. it just took long time. now its showing.
[12:42:17] deception1: hi, how good is rubycheck gem(quickcheck equivalent) and how popular is that within rails community ?
[12:42:29] rvanlieshout: what is a rubycheck gem
[12:43:00] wcalderipe: has joined #RubyOnRails
[12:43:38] deception1: it is a property based testing framework equivalent to haskell's quickcheck
[12:43:55] gerep: deception1: this page is a great place to look for gems: https://www.ruby-toolbox.com/search?utf8=%E2%9C%93&q=rubycheck
[12:44:30] deception1: gerep: thanks
[12:45:49] wcalderipe: has joined #RubyOnRails
[12:48:34] sankaber: has joined #RubyOnRails
[12:48:56] youngbaks: has joined #RubyOnRails
[12:49:07] adac: has joined #RubyOnRails
[12:49:35] jenrzzz: has joined #RubyOnRails
[12:53:45] tknz: has joined #RubyOnRails
[12:55:21] sevenseacat: has joined #RubyOnRails
[12:55:47] mojo-jojo: has joined #RubyOnRails
[12:57:09] The_Phoenix: has joined #RubyOnRails
[12:57:25] IFrank00: has joined #RubyOnRails
[12:58:42] DEA7TH: has joined #RubyOnRails
[12:59:32] ramortegui: has joined #RubyOnRails
[13:02:20] gerep: Shouldn't this be null: false by default? t.belongs_to :app, index: true, foreign_key: true
[13:02:44] rvanlieshout: gerep: whyso?
[13:03:17] gerep: rvanlieshout: because it is a foreign key, I'm not good with database but isn't a foreign key supposed to always be present?
[13:03:31] rvanlieshout: that doesn't imply a default
[13:04:07] gerep: so a foreign key can be present or not?
[13:04:16] gerep: I thought that it was always required
[13:04:31] gerep: rvanlieshout: ^^
[13:06:39] joshkovach: has joined #RubyOnRails
[13:07:27] rvanlieshout: no, the default is not related to what restrictions apply when you actually want to insert a record
[13:07:33] jenrzzz: has joined #RubyOnRails
[13:07:52] rvanlieshout: if you have a foreign key with a constraint you cannot insert a record without that fk
[13:07:59] rvanlieshout: regardless its default
[13:08:49] jaybedubb: has joined #RubyOnRails
[13:09:04] s2013: has joined #RubyOnRails
[13:09:16] rubyonrailed: has joined #RubyOnRails
[13:09:53] wcalderipe: has joined #RubyOnRails
[13:11:07] sivsushruth: has joined #RubyOnRails
[13:11:53] gerep: rvanlieshout: sorry but I think I made a mistake in my question, I didn't mean to say 'default' as a default value. What I tests is that without adding the null: false to my t.belongs_to :app, index: true, foreign_key: true it will save the record without the app_id
[13:12:18] rvanlieshout: that makes sense
[13:12:18] gerep: I had to update it to t.belongs_to :app, index: true, foreign_key: true null: false
[13:12:30] rvanlieshout: that only tells the db there is a foreign key
[13:12:33] rvanlieshout: that's not the constraint
[13:12:44] gerep: rvanlieshout: thanks
[13:12:44] rvanlieshout: and rails convention tells you to add that restriction to the model
[13:14:13] kitsuneyo: has joined #RubyOnRails
[13:14:26] acti0nman: has joined #RubyOnRails
[13:15:07] tetraktys: has joined #RubyOnRails
[13:15:30] rickmasta: has joined #RubyOnRails
[13:16:23] MartinEl_: has joined #RubyOnRails
[13:16:37] Criten_: has left #RubyOnRails: ()
[13:18:54] supergeek: has joined #RubyOnRails
[13:19:38] yogeshrt: has joined #RubyOnRails
[13:20:41] roshanavand: has joined #RubyOnRails
[13:20:48] sankaber: has joined #RubyOnRails
[13:20:58] chills42: has joined #RubyOnRails
[13:21:39] victortyau: has joined #RubyOnRails
[13:21:40] lporras: has joined #RubyOnRails
[13:23:28] doodlehaus: has joined #RubyOnRails
[13:24:03] roshanavand: has joined #RubyOnRails
[13:24:07] rubyonrailed: has joined #RubyOnRails
[13:24:21] jmignault: has joined #RubyOnRails
[13:26:18] MartinElvar: has joined #RubyOnRails
[13:27:49] renegadeandy: Can somebody please help : Why do I get an empty option tag here : https://gist.github.com/renegadeandy/f9439dff28c2ab3f833c
[13:28:51] gerep: renegadeandy: you mean those two "<option value=""></option>" ?
[13:29:03] gerep: at the beginning of your outpuy?
[13:29:54] renegadeandy: gerep: yeah the <option value=""></option> specifically. I think its because im passing nil as the second argument to the select helper
[13:30:33] xlogic: has joined #RubyOnRails
[13:30:48] bruno-: has joined #RubyOnRails
[13:31:36] bitkiller: has joined #RubyOnRails
[13:31:42] arkhej: has joined #RubyOnRails
[13:32:21] maxdoubt: has joined #RubyOnRails
[13:32:34] absklb: to return data to ajax i do return data right?
[13:32:40] umgrosscol: has joined #RubyOnRails
[13:32:45] gerep: renegadeandy: have you tried using what the API suggests? select("post", "person_id", Person.all.collect {|p| [ p.name, p.id ] }, {include_blank: 'None'})
[13:33:07] renegadeandy: gerep: im not sure how i can blend what i currently need into that, can you show me how you would do it according to my gist?
[13:33:23] renegadeandy: because I need to add those classes to each option as well which is why im doing it this way
[13:33:35] n1lo: has joined #RubyOnRails
[13:33:49] renegadeandy: gerep: I would appreciate you showing me the version according to the API
[13:34:57] Dopagod: has joined #RubyOnRails
[13:34:57] Dopagod: has joined #RubyOnRails
[13:37:04] gerep: renegadeandy: So it makes sense to generate it separately
[13:37:52] gerep: renegadeandy: by default f.select will not add a blank option so you don't need the include_blank => false
[13:38:19] renegadeandy: it seems to be doing it
[13:38:34] gerep: It is adding a blank option?
[13:38:38] renegadeandy: <%=f.select :primary_category,nil,{}, {:class=> "newevent form-control input-select check-select", :required=>true} do %> -- that is
[13:39:05] allcentury: has joined #RubyOnRails
[13:39:09] renegadeandy: gerep: see the nil, second param, that is causing the blank
[13:39:49] seuros: has joined #RubyOnRails
[13:40:04] centrx: has joined #RubyOnRails
[13:40:32] gerep: renegadeandy: why are you sending it as nil?
[13:40:43] renegadeandy: because the options are created in the block underneath it
[13:42:17] gerep: renegadeandy: I don't think that necessary, try this?
[13:42:18] gerep: <%=f.select :primary_category, {:class=> "newevent form-control input-select check-select", :required=>true} do %>
[13:42:27] gerep: oh! Sorry for those extra lines :)
[13:43:28] ruurd: has joined #RubyOnRails
[13:43:29] stannard: has joined #RubyOnRails
[13:43:40] darrencauthon: has joined #RubyOnRails
[13:44:10] renegadeandy: gerep: that removes the empty option, but my select has no class : <select name="event[primary_category]" id="event_primary_category"> <option class="newevent input-option" selected="" disabled="">Please select one...</option> <option value="1" class="newevent input-option">Music</option> <option value="2" class="newevent input-option">Singing</option> <option value="3" class="newevent input-o
[13:44:26] renegadeandy: thought i had selected just the one line
[13:45:11] gerep: renegadeandy: remove the :class from inside {}
[13:46:57] renegadeandy: gerep: really!?
[13:47:02] juhoh: has joined #RubyOnRails
[13:47:07] renegadeandy: gerep: <%=f.select :primary_category, {"newevent form-control input-select check-select", :required=>true} do %>
[13:49:34] Palsson: has joined #RubyOnRails
[13:49:53] Diabolik: if im editing 30k database records, what is faster and more efficient than .each?
[13:50:01] stannard: has joined #RubyOnRails
[13:50:44] skinofstars: has joined #RubyOnRails
[13:51:12] skinofstars: has left #RubyOnRails: ()
[13:51:56] axl_: has joined #RubyOnRails
[13:52:06] absklb: how to return data fromm function to ajax back?
[13:52:58] sunya7a: has joined #RubyOnRails
[13:54:50] mary5030: has joined #RubyOnRails
[13:55:39] mary5030: has joined #RubyOnRails
[13:56:08] bruno-: has joined #RubyOnRails
[13:56:12] supergeek: has joined #RubyOnRails
[13:58:31] batu: has joined #RubyOnRails
[13:58:46] renegadeandy: gerep: i dont understand waht you mean?, i need that class applied to the select tag
[13:59:17] youngbaks: has joined #RubyOnRails
[13:59:28] northfurr: has joined #RubyOnRails
[14:00:50] amortimer: has joined #RubyOnRails
[14:01:05] srinidhi: has joined #RubyOnRails
[14:01:20] amortimer: I???m super confused. Do tests need to be set up to inherit from a Module/Class?
[14:02:17] amortimer: Then don???t they just kind of float around until the get picked up by a module or class?
[14:04:51] amortimer: Like if I have an integration test for a route, assert_routing isn???t available if I have it wrapped in a MinitTest::Spec, but if I take it out, it passes. Where is the test if it isn???t in the Module? It seems eventually it is being handled by ActionDispatch::IntegrationTest.
[14:04:57] batu: hello people, I would like to be able to allow a visitor to my website to download my CV as a PDF. any idea on how to do that ? any gems ?
[14:05:25] tbuehlmann: batu, put it in your public directory, link to that, done?
[14:05:51] chouhoulis: has joined #RubyOnRails
[14:05:59] batu: that simple ?
[14:06:10] rubyonrailed: has joined #RubyOnRails
[14:06:43] tbuehlmann: files from the public directory are available to, well, the public
[14:07:05] tbuehlmann: (at least in most setups)
[14:07:45] ritic: has joined #RubyOnRails
[14:11:48] momomomomo: has joined #RubyOnRails
[14:11:50] simplyianm: has joined #RubyOnRails
[14:12:09] dopamean_: has joined #RubyOnRails
[14:12:52] seank_: has joined #RubyOnRails
[14:13:25] rromanch_: has joined #RubyOnRails
[14:14:02] MartinElvar: has joined #RubyOnRails
[14:14:25] chills42: has joined #RubyOnRails
[14:15:31] Dopagod: has joined #RubyOnRails
[14:15:54] s2013: has joined #RubyOnRails
[14:16:04] MartinElvar: has joined #RubyOnRails
[14:17:23] batu: when a user clicks on the link to the pdf in the public directory will the browser auto download it ?
[14:17:31] kitsuneyo: has joined #RubyOnRails
[14:18:35] tbuehlmann: batu, have you tried?
[14:19:46] Trynemjoel: has joined #RubyOnRails
[14:19:51] MaDErroR123: has joined #RubyOnRails
[14:19:52] maxdoubt: has joined #RubyOnRails
[14:19:58] renegadeandy: gerep: please help?
[14:20:33] adac: is it possible to start an 'initializer' right after the rails server has been successfully booted up?
[14:21:23] Scriptonaut: I have a "completed" field on one of my models. A user clicks a checkbox in my form to set the field. However, I also have a completed_by and a completed_at field, I would like to set these as well. Is there a way to write a method on the model named "completed" that will also set the completed_at to Time.now and the completed_by to current_user?
[14:21:37] tubbo: adac: that's kind-of what initializers are doing..
[14:21:46] tubbo: just not sure if it's at the spot you're thinking
[14:21:51] tubbo: adac: what problem are you trying to solve?
[14:22:18] sunya7a_: has joined #RubyOnRails
[14:22:43] yogeshrt: has joined #RubyOnRails
[14:24:28] zpe: has joined #RubyOnRails
[14:24:36] adac: tubbo, I'm trying to update nginx config (ip address for the upstream) once a new rails instance has started. And I wanted to trigger this rigth after the server has booted
[14:25:45] adac: *the rails server has booted
[14:25:54] renegadeandy: tubbo: can you explain why no style is applied to my select tag : https://gist.github.com/renegadeandy/f9439dff28c2ab3f833c
[14:26:16] neanias_: has left #RubyOnRails: ()
[14:27:38] qejk: has joined #RubyOnRails
[14:27:49] atomical: has joined #RubyOnRails
[14:28:05] krz: has joined #RubyOnRails
[14:29:37] northfurr: has joined #RubyOnRails
[14:30:45] hephaestus_rg: has joined #RubyOnRails
[14:32:52] hobodave: has joined #RubyOnRails
[14:34:04] tubbo: adac: i mean, you could just put that in an initializer.
[14:34:38] tubbo: renegadeandy: hmm, i've never seen f.select used in that way. have you heard of f.collection_select?
[14:34:38] pawnbox: has joined #RubyOnRails
[14:35:07] supergeek: has joined #RubyOnRails
[14:35:24] tubbo: renegadeandy: you also don't need the '{' and '}' around the options argument (the hash), fyi
[14:35:34] beauby: has joined #RubyOnRails
[14:35:37] tubbo: '{:class=>"newevent form-control input-select check-select", :required=>true}'
[14:36:14] kies^: has joined #RubyOnRails
[14:36:27] adac: tubbo, I'll try it out :-)
[14:36:47] Trynemjoel: has joined #RubyOnRails
[14:37:18] bmalum: has joined #RubyOnRails
[14:38:59] Scriptonaut: I have a setter method on my model (completed=), I need to write_attribute(:completed_by_id, current_user.id), however the current_user isn't available in the model. Is there a way I can make rails pass in the current_user when I update_attributes?
[14:39:02] yardenbar: has joined #RubyOnRails
[14:39:23] Scriptonaut: er, ActiveRecord not rails
[14:39:33] tubbo: Scriptonaut: what argument does completed= take?
[14:39:45] Scriptonaut: it takes "0" or "1" from a checkbox in the form
[14:39:52] supergeek: has joined #RubyOnRails
[14:39:55] Scriptonaut: updated_attributes takes a hash (strong_params)
[14:40:00] Scriptonaut: with that in there
[14:40:20] Scriptonaut: maybe there is a way for me to update the params if complete is set to "1"
[14:42:29] polishdub: has joined #RubyOnRails
[14:42:52] shmilan: has joined #RubyOnRails
[14:43:17] mrbubbles: has joined #RubyOnRails
[14:43:44] tubbo: Scriptonaut: i would just make it a little easier to read rather than being a setter method
[14:43:46] dopie: has joined #RubyOnRails
[14:44:13] Scriptonaut: tubbo: what exactly do you mean, like put additional fields in the form for completed_at and completed_by?
[14:44:50] tubbo: Scriptonaut: i was trying to find a good example but i couldn't :) anyway, it seems like these two attributes are somewhat interdependent but i'm not sure why they have to be.
[14:45:13] Scriptonaut: they are, when complete is set to true, I need to set when it was completed and by whom
[14:45:33] tubbo: Scriptonaut: like, let's say this just sets is_completed to true, and completed_by to some user...right? well, couldn't is_completed be inferred by checking whether a completed_by user was set?
[14:45:33] Scriptonaut: just give me the gist of what the right way to go is and I'll figure out the details (hopefully) :)
[14:45:41] leehambley: has joined #RubyOnRails
[14:45:50] Scriptonaut: yes, it totally could
[14:45:57] Scriptonaut: however, I think sometimes it's completed by nobody in particular
[14:46:03] tubbo: Scriptonaut: that doesn't make sense
[14:46:17] Scriptonaut: the system sometimes completes it
[14:46:23] srinidhi: has joined #RubyOnRails
[14:46:50] Meow-J: has joined #RubyOnRails
[14:47:25] okdas: has joined #RubyOnRails
[14:47:25] okdas: has joined #RubyOnRails
[14:47:47] podman: has joined #RubyOnRails
[14:48:26] juhoh: has joined #RubyOnRails
[14:48:53] ngscheur1: has joined #RubyOnRails
[14:49:30] sankaber: has joined #RubyOnRails
[14:50:05] bmalum: has joined #RubyOnRails
[14:52:13] Fire-Dragon-DoL: has joined #RubyOnRails
[14:53:33] Lytol: has joined #RubyOnRails
[14:53:45] maxdoubt: has joined #RubyOnRails
[14:53:54] Lytol: has joined #RubyOnRails
[14:55:09] mices: can someone recommend a guide to creating a contact page, i could do it from scratch but i wanna read
[14:55:12] The_Phoenix: has joined #RubyOnRails
[14:56:55] tubbo: Scriptonaut: completed_by could equal 'system'
[14:57:10] pawnbox: has joined #RubyOnRails
[14:57:12] tubbo: mices: i don't think any guides exist for something so trivial
[14:57:20] tubbo: just a static page...
[14:57:40] SeanLazer: has joined #RubyOnRails
[14:58:55] l_tonz: has joined #RubyOnRails
[15:00:06] tubbo: hey guys!
[15:00:08] tubbo: i got a question!
[15:00:09] tubbo: about capybara
[15:00:18] bmalum: has joined #RubyOnRails
[15:00:54] Octophore: has joined #RubyOnRails
[15:02:06] paolodoors: has joined #RubyOnRails
[15:04:08] tweeeaks: has joined #RubyOnRails
[15:04:33] tubbo: i'm trying to use the `choose` method in the capybara DSL to select a radio button, like choose 'payment_bank_transfer'
[15:05:39] tubbo: however, i can't seem to get it to actually select anything. furthermore, when i save_and_open_page, the content is definitely there. it doesn't error, it just doesn't do what i told it to do and then it fails on the next expectation.
[15:05:43] tubbo: major WTF
[15:06:19] sunya7a: has joined #RubyOnRails
[15:08:01] neanias: has joined #RubyOnRails
[15:08:30] bmalum_: has joined #RubyOnRails
[15:09:07] l_tonz: has joined #RubyOnRails
[15:10:45] MaDErroR123: has joined #RubyOnRails
[15:11:58] vipaca: has joined #RubyOnRails
[15:12:14] ruurd: has joined #RubyOnRails
[15:12:51] deception1: has joined #RubyOnRails
[15:13:51] The_Phoenix: has joined #RubyOnRails
[15:14:18] arup_r: has joined #RubyOnRails
[15:17:32] leehambley: has joined #RubyOnRails
[15:20:01] Lytol: has joined #RubyOnRails
[15:21:19] MaDErroR123: has joined #RubyOnRails
[15:21:59] momomomomo: has joined #RubyOnRails
[15:22:18] doodlehaus: has joined #RubyOnRails
[15:27:49] Cervajz: has joined #RubyOnRails
[15:30:55] blackmesa: has joined #RubyOnRails
[15:31:48] sonofdirt: has joined #RubyOnRails
[15:35:36] Limix: has joined #RubyOnRails
[15:36:25] michaeldeol: has joined #RubyOnRails
[15:37:02] artto: has joined #RubyOnRails
[15:37:14] roshanavand: has joined #RubyOnRails
[15:37:22] Cache_Money: has joined #RubyOnRails
[15:37:49] closer: has joined #RubyOnRails
[15:41:36] railsForDaiz: has joined #RubyOnRails
[15:41:40] bleda: has joined #RubyOnRails
[15:41:40] bleda: has joined #RubyOnRails
[15:42:21] nettoweb: has joined #RubyOnRails
[15:42:51] ruurd: has joined #RubyOnRails
[15:43:11] matt_d: has joined #RubyOnRails
[15:43:47] bendangelo: has joined #RubyOnRails
[15:43:48] loveablelobster: has joined #RubyOnRails
[15:43:52] EminenceHC: has joined #RubyOnRails
[15:46:52] wilcoxr: has joined #RubyOnRails
[15:47:11] reber: has joined #RubyOnRails
[15:47:29] wilcoxr: has left #RubyOnRails: ()
[15:49:24] The_Phoenix: has joined #RubyOnRails
[15:50:09] Or1on: has joined #RubyOnRails
[15:50:43] ruurd: has joined #RubyOnRails
[15:51:34] s2013: has joined #RubyOnRails
[15:52:43] rainerborene1: has joined #RubyOnRails
[15:53:42] mrbubbles: has joined #RubyOnRails
[15:53:57] MaDErroR123: has joined #RubyOnRails
[15:54:42] EminenceHC: has joined #RubyOnRails
[15:54:47] sanjayu: has joined #RubyOnRails
[15:58:02] TDJACR: has joined #RubyOnRails
[16:00:44] jgt: has joined #RubyOnRails
[16:00:56] toretore: has joined #RubyOnRails
[16:01:26] snockerton: has joined #RubyOnRails
[16:01:56] darrencauthon: has joined #RubyOnRails
[16:02:11] honzahov1: has joined #RubyOnRails
[16:05:38] mase-chatter: has joined #RubyOnRails
[16:06:04] wcalderipe: has joined #RubyOnRails
[16:06:45] yogeshrt: has joined #RubyOnRails
[16:08:12] smathy: has joined #RubyOnRails
[16:08:36] momomomomo: has joined #RubyOnRails
[16:10:07] riotjones: has joined #RubyOnRails
[16:10:34] ingusmat: has joined #RubyOnRails
[16:11:01] riotjones: has joined #RubyOnRails
[16:11:47] towski_: has joined #RubyOnRails
[16:11:55] riotjones: has joined #RubyOnRails
[16:12:25] justinmburrous: has joined #RubyOnRails
[16:12:37] eGGsha: has joined #RubyOnRails
[16:12:38] russt: has joined #RubyOnRails
[16:13:11] chopin: has joined #RubyOnRails
[16:13:15] naftilos76: has joined #RubyOnRails
[16:13:30] zpe: has joined #RubyOnRails
[16:14:48] slash_nick: tubbo: you're running headless aren't you? with selenium you might be able to throw binding.pry in there and mess around with the page through capybara
[16:15:11] tubbo: slash_nick: i can do that with save_and_open_page, but that's not the point.
[16:15:15] tubbo: slash_nick: the markup is there. i see it.
[16:15:29] tubbo: i am running capybara with poltergeist 1.6 and phantomjs 1.9.2
[16:15:47] slash_nick: i've run into problems with animations causing the element to be not found, but throwing binding.pry right before the capybara usage allowed it time to reveal...
[16:16:29] jameswork: has joined #RubyOnRails
[16:16:32] slash_nick: ... any animations in play for the element you're using?
[16:16:41] tubbo: slash_nick: there is, but they don't hide and show the element.
[16:16:42] slash_nick: like a $(".foo").show(200)
[16:16:46] tubbo: the element is still visible the whole time
[16:17:27] victortyau: has joined #RubyOnRails
[16:17:52] safety_cut: has joined #RubyOnRails
[16:17:59] robbyoconnor: has joined #RubyOnRails
[16:18:00] Cervajz__: has joined #RubyOnRails
[16:18:22] The_Phoenix: has joined #RubyOnRails
[16:18:35] yogeshrt: has joined #RubyOnRails
[16:19:08] bauerd: has joined #RubyOnRails
[16:19:17] slash_nick: tubbo: curious, css or js animations?
[16:20:00] hardtail: has joined #RubyOnRails
[16:24:14] Dopagod: has joined #RubyOnRails
[16:25:04] mices: if i'm just gonna send myself emails from a contact form on my site do i have to create a mailer?
[16:25:35] tubbo: mices: eys
[16:25:44] mices: can i just use action::mailer.deliver or something like that
[16:26:08] tubbo: mices: !mailers
[16:26:21] tubbo: mices: !mailer
[16:26:21] helpa: mices: http://guides.rubyonrails.org/action_mailer_basics.html
[16:26:25] corioliss: has joined #RubyOnRails
[16:26:33] mikecmpbll: is there any way to stop rails destroying the join records of a habtm association when one of the sides gets destroyed?
[16:26:58] mikecmpbll: the reason being, i have a bunch of associations which are subsets of other associations (e.g. habtm :foos, -> { where(...) })
[16:27:09] nfk|laptop: has joined #RubyOnRails
[16:27:22] mikecmpbll: and when i destroy one of them it generates a load of delete SQL commands for each association, exactly the same
[16:27:32] yogeshrt: has joined #RubyOnRails
[16:27:34] bmalum: has joined #RubyOnRails
[16:28:39] gerep: has joined #RubyOnRails
[16:32:09] The_Phoenix: has joined #RubyOnRails
[16:34:02] yogeshrt: has joined #RubyOnRails
[16:34:20] michaeldeol: has joined #RubyOnRails
[16:34:36] Fire-Dragon-DoL: has joined #RubyOnRails
[16:34:39] djbkd: has joined #RubyOnRails
[16:34:57] gerep: renegadeandy: there yet?
[16:35:02] gerep: renegadeandy: had to leave for lunch :D
[16:35:06] benlieb: has joined #RubyOnRails
[16:36:04] meoblast001: has joined #RubyOnRails
[16:38:07] kristofferR: has joined #RubyOnRails
[16:38:54] arup_r: has joined #RubyOnRails
[16:38:56] blackmesa: has joined #RubyOnRails
[16:39:35] mojo-jojo: has joined #RubyOnRails
[16:39:48] renegadeandy: gerep: hey im back :)
[16:40:17] wcalderipe: has joined #RubyOnRails
[16:40:28] robbyoconnor: has joined #RubyOnRails
[16:40:51] gerep: renegadeandy: you are setting you class inside a hash {} remove this class declaration from this hash, leave it outside
[16:41:15] meoblast001: has joined #RubyOnRails
[16:41:19] renegadeandy: can you show me?
[16:41:28] gerep: renegadeandy: something like this: <%=f.select :primary_category, :class=> "newevent form-control input-select check-select" do %>
[16:41:36] renegadeandy: gerep: gotcha
[16:42:03] tubbo: renegadeandy: glad to see you've taken my advice and are using collection_select
[16:42:14] siddart: has joined #RubyOnRails
[16:42:37] renegadeandy: tubbo: yeah definitely way way way easier
[16:44:03] theblang: has joined #RubyOnRails
[16:44:12] yogeshrt: has joined #RubyOnRails
[16:44:25] theblang: has joined #RubyOnRails
[16:45:10] meoblast001: has joined #RubyOnRails
[16:45:43] andatche: has joined #RubyOnRails
[16:48:41] kitsuneyo: has joined #RubyOnRails
[16:49:14] Maletor: has joined #RubyOnRails
[16:49:47] mices: so where would i put a static page?
[16:50:23] mices: i guess just app views
[16:50:25] deol: has joined #RubyOnRails
[16:52:37] gerep: mices: that's what I do, I have a controller for those static pages and a view for each action
[16:52:59] urbanmonk: has joined #RubyOnRails
[16:55:18] eikood: has joined #RubyOnRails
[16:58:32] rakm: has joined #RubyOnRails
[16:58:46] rwilcox: has joined #RubyOnRails
[17:00:00] ror15: has joined #RubyOnRails
[17:01:39] tubbo: high_voltage ftw
[17:01:46] baweaver: has joined #RubyOnRails
[17:03:09] krz: has joined #RubyOnRails
[17:06:07] Ergo: has joined #RubyOnRails
[17:06:53] nertzy2: has joined #RubyOnRails
[17:07:44] arup_r: renegadeandy: You finally used what I said you.. :) Thanks for that
[17:07:46] Shoutsid: has joined #RubyOnRails
[17:07:53] SteenJobs: has joined #RubyOnRails
[17:08:26] Motoservo: has joined #RubyOnRails
[17:09:07] renegadeandy: arup_r: yep :)
[17:09:14] ruurd: has joined #RubyOnRails
[17:09:38] ericjphillips: has joined #RubyOnRails
[17:10:24] bauerd: has joined #RubyOnRails
[17:10:45] rwilcox: has joined #RubyOnRails
[17:11:13] Fahrenhe17: has joined #RubyOnRails
[17:11:15] tubbo: renegadeandy: i'm curious...what are you using the styles on each <option> tag for?
[17:11:20] kalusn: has joined #RubyOnRails
[17:11:25] tubbo: i wasn't aware that those elements could be styled
[17:12:25] Fahrenhe17: Hello, guys! What resources do you recommend to study rails? Code academy does not work right now :c
[17:12:45] riotjones: has joined #RubyOnRails
[17:12:55] gerep: Fahrenhe17: https://www.railstutorial.org/
[17:12:57] tubbo: Fahrenhe17: !dw
[17:12:57] helpa: Fahrenhe17: 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.
[17:14:14] gerep: Fahrenhe17: that tutorial is really good, it will create a simple application from the ground up
[17:15:47] renegadeandy: tubbo: It turned out.....that they were going to be used for something...but it was removed, so it was all superfluous anyway :/
[17:15:47] Fahrenhe17: gerep: ty very much. seen this before and wanted to start from it, but now - i am absolutely sure
[17:16:11] gerep: Fahrenhe17: ;)
[17:16:53] MartinElvar: has joined #RubyOnRails
[17:16:56] renegadeandy: Hey guys. How can I present my users a list of timezones, that they pick from to pick the timezone they are in?
[17:17:09] renegadeandy: any helpers for that?
[17:17:12] EminenceHC: has joined #RubyOnRails
[17:17:33] devops: has joined #RubyOnRails
[17:17:36] yaymukund: has joined #RubyOnRails
[17:17:40] eikood: has joined #RubyOnRails
[17:18:39] tubbo: renegadeandy: i don't know, are you absolutely sure you're actually gonna need this? :P
[17:18:48] gerep: renegadeandy: http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/time_zone_select and http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/time_zone_options_for_select
[17:20:25] renegadeandy: tubbo: LOL! Yes! Although, i thikn it would be more consumable to have a select list which said pick your current time, rather than , pick your time zone. and i can infer timezone based upon the chosen time?
[17:20:48] pwnd_nfsw: has joined #RubyOnRails
[17:20:50] sarink: has joined #RubyOnRails
[17:21:10] rakm: has joined #RubyOnRails
[17:21:43] mrchris: has joined #RubyOnRails
[17:21:49] rhizome: http://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser
[17:21:56] mrchris: anyone have experience with using i18n for custom validation messages?
[17:22:01] tubbo: __chris: yes
[17:22:25] arup_r: When, I will click "Revoke", I want link_to do post the select email from the above dropdown, any idea how to pick it using link_to ?
[17:22:33] arup_r: https://gist.github.com/aruprakshit/cf3bedd66c7b96216afa
[17:22:36] tubbo: __chris: https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/en.yml#L99-L138
[17:22:46] arup_r: need an idea
[17:23:05] rhizome: arup_r: first off, don't do a POST with link_to
[17:23:08] renegadeandy: rhizome: would you trust the javascript version?
[17:23:10] arup_r: I am not feeling positive to wrap a single field inside a form
[17:23:20] mrchris: tubbo thanks. do i need to throw a custom exception or anything?
[17:23:21] tubbo: arup_r: JS
[17:23:26] arup_r: rhizome: ok I will use button_to
[17:23:32] arup_r: but how to hook?
[17:23:33] tubbo: __chris: dunno what you're talking about
[17:23:34] rhizome: renegadeandy: dunno, never used it. you can ask the user "does this look right?"
[17:23:52] rromanch_: has joined #RubyOnRails
[17:23:56] Maletor: If I change the seen_at time for a group of messages on a GET request is anybody going to get mad at me for violating REST?
[17:23:57] ruurd: has joined #RubyOnRails
[17:23:57] renegadeandy: rhizome: lol true...
[17:24:02] arup_r: tubbo: You meant vanilla JS? Or some ujs trick..?
[17:24:03] momomomomo: has joined #RubyOnRails
[17:24:08] tubbo: arup_r: oh yeah, if you're using that to actually POST shit or something, you probably want to submit a form.
[17:24:27] arup_r: but a single fied with in a form?
[17:24:57] abitdodgy: has joined #RubyOnRails
[17:24:59] tubbo: arup_r: does "Revoke" actually submit the form, or does it just change a value?
[17:25:04] arup_r: Evenif I use button_to, no idea how to pick the current select value from dropdwn
[17:25:10] disgrntld: has joined #RubyOnRails
[17:25:10] bmalum_: has joined #RubyOnRails
[17:25:45] arup_r: actually each link has many users assigned, but if I want I can delete a user from the link shred to the user
[17:25:56] sonofdirt: has joined #RubyOnRails
[17:26:15] arup_r: tubbo: No, I have not yet decided how to submit it.. so asked here..
[17:26:32] tubbo: arup_r: lol maybe you should figure that out first
[17:26:49] darrencauthon: has joined #RubyOnRails
[17:26:50] arup_r: is it good to wrap a field inside a form?
[17:27:32] arup_r: what ? ;)
[17:27:48] greengriminal: has joined #RubyOnRails
[17:27:56] arup_r: I am not able to decide, what will be good call.. :)
[17:28:44] darrencauthon: has joined #RubyOnRails
[17:29:09] EminenceHC: has joined #RubyOnRails
[17:29:34] tubbo: arup_r: if that 'Revoke' link does any actual background call to the server, it should be within a form
[17:29:43] eikood: has joined #RubyOnRails
[17:29:55] tubbo: arup_r: it seems like you have a select list and then a 'Revoke' button to actually submit the form.
[17:30:03] arup_r: yes it will be a backend stuff.
[17:30:03] tubbo: but they're not in a form
[17:30:09] arup_r: ok.. using form then
[17:30:16] tubbo: then you can use fancy UJS :)
[17:30:46] arup_r: actually for each row, that <td> will be inside a form.. so too many tiny forms.. hehehe
[17:31:13] arup_r: form inside a <td>
[17:33:32] renegadeandy: I have a timezone conundrum...i hate them. This is my current issue : https://gist.github.com/renegadeandy/46c5d31f3d4d2cac5d73
[17:33:49] Shoutsid: has joined #RubyOnRails
[17:35:09] safety_cut: has joined #RubyOnRails
[17:35:11] arup_r: maletor: Use patch/put
[17:35:24] Maletor: arup_r: i suppose.
[17:35:45] Maletor: that's not when they will have seen it though and that would depend on the client respecting that.
[17:36:10] Marco_: has joined #RubyOnRails
[17:36:55] n008f4g_: has joined #RubyOnRails
[17:37:04] ericjphillips: has joined #RubyOnRails
[17:37:54] zpe: has joined #RubyOnRails
[17:39:35] SteenJobs: has joined #RubyOnRails
[17:39:56] bobbobbins: has joined #RubyOnRails
[17:40:31] renegadeandy: anyone wanna offer any thoughts
[17:40:47] krisquigley: has joined #RubyOnRails
[17:42:33] diegoviola: has joined #RubyOnRails
[17:43:31] renegadeandy: ive worked it out
[17:44:23] bobbobbins: has joined #RubyOnRails
[17:44:53] urbanmonk: has joined #RubyOnRails
[17:45:31] jkmcrg: has joined #RubyOnRails
[17:45:55] agdr: has joined #RubyOnRails
[17:47:28] youngbaks: has joined #RubyOnRails
[17:47:40] Klumben: has joined #RubyOnRails
[17:48:10] sonofdirt: has joined #RubyOnRails
[17:48:46] sararegan: has joined #RubyOnRails
[17:50:25] cnk: has joined #RubyOnRails
[17:51:46] jenrzzz: has joined #RubyOnRails
[17:52:28] safety_cut: has joined #RubyOnRails
[17:53:08] Shoutsid: has joined #RubyOnRails
[17:54:18] simplyianm: has joined #RubyOnRails
[17:54:25] herbst: has joined #RubyOnRails
[17:56:06] simplyianm: has joined #RubyOnRails
[17:56:07] bruno-: has joined #RubyOnRails
[17:56:43] simplyianm: has joined #RubyOnRails
[17:59:13] sininen: has joined #RubyOnRails
[17:59:36] mikecmpbll: has joined #RubyOnRails
[17:59:52] petricore: has joined #RubyOnRails
[18:00:25] darrencauthon: has joined #RubyOnRails
[18:00:31] darrencauthon: has joined #RubyOnRails
[18:01:35] IFrank00: has joined #RubyOnRails
[18:02:12] rainerborene1: has joined #RubyOnRails
[18:02:18] hephaestus_rg: has joined #RubyOnRails
[18:03:03] mary5030: has joined #RubyOnRails
[18:03:39] victortyau: has joined #RubyOnRails
[18:04:04] avelldiroll: has joined #RubyOnRails
[18:07:51] victortyau: has joined #RubyOnRails
[18:10:42] solars: has joined #RubyOnRails
[18:11:33] chills42: has joined #RubyOnRails
[18:12:07] kidoz: has joined #RubyOnRails
[18:13:33] riotjones: has joined #RubyOnRails
[18:14:56] doodlehaus: has joined #RubyOnRails
[18:16:21] danman: has joined #RubyOnRails
[18:17:32] zorbash: has joined #RubyOnRails
[18:18:39] yaymukund: has joined #RubyOnRails
[18:21:19] srinidhi: has joined #RubyOnRails
[18:21:23] sankaber: has joined #RubyOnRails
[18:21:48] lea: has joined #RubyOnRails
[18:22:17] jameswork: has joined #RubyOnRails
[18:22:33] srashidi: has joined #RubyOnRails
[18:25:09] adac: has joined #RubyOnRails
[18:27:07] naftilos76: has joined #RubyOnRails
[18:27:17] Shoutsid: has joined #RubyOnRails
[18:28:36] joshsmith: has joined #RubyOnRails
[18:29:32] rromanch_: has joined #RubyOnRails
[18:30:13] ericjphillips: has joined #RubyOnRails
[18:36:02] Shoutsid: has joined #RubyOnRails
[18:36:07] yaymukund: has joined #RubyOnRails
[18:36:51] manfrin_: has joined #RubyOnRails
[18:37:50] simplyianm: has joined #RubyOnRails
[18:40:14] cac: has joined #RubyOnRails
[18:41:07] sankaber: has joined #RubyOnRails
[18:41:38] barhum2013: has joined #RubyOnRails
[18:42:22] cac: has joined #RubyOnRails
[18:42:55] Fahrenhe17: has left #RubyOnRails: ()
[18:43:28] bauerd: has joined #RubyOnRails
[18:44:23] madebymarkca: has joined #RubyOnRails
[18:52:16] simplesthing: has joined #RubyOnRails
[18:53:34] wa_r_ch_i__ld1: has joined #RubyOnRails
[18:54:51] wa_r_ch_i__ld1: hey all, i'm trying to store a collection of objects in redis as a list (sadd method) and when I retrieve them (smembers) I am getting back an array of the rails instance_id, not the collection
[18:54:58] wa_r_ch_i__ld1: how can I retrieve the collection?
[18:55:19] jsrn_: has joined #RubyOnRails
[18:55:35] wa_r_ch_i__ld1: this is only for some collections
[18:55:36] dikaio: has joined #RubyOnRails
[18:55:39] wa_r_ch_i__ld1: it seems strange
[18:55:40] jenrzzz: has joined #RubyOnRails
[18:55:44] chrisja: has joined #RubyOnRails
[18:56:35] tubbo: wa_r_ch_i__ld1: sadd method?
[18:56:41] tubbo: "students against drunk drivers"?
[18:56:53] wa_r_ch_i__ld1: @tubbo http://redis.io/commands/sadd
[18:57:49] smathy: wa_r_ch_i__ld1, !code
[18:57:49] helpa: wa_r_ch_i__ld1: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[18:57:51] diegoviola: has joined #RubyOnRails
[18:59:33] dionysus69: has joined #RubyOnRails
[19:00:07] rhizome: and is that really the best nick you could come up with
[19:01:56] shmilan: has joined #RubyOnRails
[19:02:07] tubbo: it's better than "rhizome"
[19:02:09] tubbo: i mean come on
[19:02:13] tubbo: what are you a rhombus
[19:02:29] user1138: has joined #RubyOnRails
[19:02:30] rhizome: not quite geometry!
[19:02:49] toretore: has joined #RubyOnRails
[19:03:01] tubbo: rhizome: i thought it was a protein but it turns out it's part of a plant.
[19:03:35] wa_r_ch_i__ld1: http://paste.ofcode.org/z2CgApa4uC8K2KgwwcYfme
[19:03:49] wa_r_ch_i__ld1: one of them will work, and return the correct rails object collection
[19:03:57] n008f4g_: has joined #RubyOnRails
[19:04:17] wa_r_ch_i__ld1: but then If i reload or mess with the redis model manually (i.e. REDIS.del("Plants"), REDIS.sadd("Plants", plants)) then it will only return an instance id
[19:06:16] sunya7a: has joined #RubyOnRails
[19:06:28] rhizome: and you want actual objects?
[19:06:51] VeryBewitching: has joined #RubyOnRails
[19:07:02] dionysus69: has joined #RubyOnRails
[19:07:08] Cervajz: has joined #RubyOnRails
[19:07:17] tubbo: wa_r_ch_i__ld1: probably not a great idea to keep re-assigning those local variables like that
[19:07:46] smathy: wa_r_ch_i__ld1, hey, you know how you're basically using redis as a cache?
[19:08:05] wa_r_ch_i__ld1: @smathy thats what im trying to do
[19:08:13] tubbo: ever hear of Rails.cache wa_r_ch_i__ld1?
[19:08:19] rafaelfranca: has joined #RubyOnRails
[19:08:20] meoblast001: has joined #RubyOnRails
[19:08:36] smathy: wa_r_ch_i__ld1, there's a redis cache store for Rails: https://github.com/redis-store/redis-rails
[19:08:56] a1fa: i got a problem. when processing #create, i get a NoMethodError for compliance_id . controller is "compliance", and id happens to be not the usual "id" field. it's supposed to be the "name", but they refer to it as id
[19:09:03] smathy: wa_r_ch_i__ld1, does all the de/serialization for you, much simpler than what you're doing.
[19:09:22] rhizome: weed websites on the uptick
[19:09:26] wa_r_ch_i__ld1: @smathy have you ever heard of gem redis-session-store?
[19:09:26] smathy: a1fa, !gist your controller.
[19:09:27] helpa: a1fa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:09:40] momomomomo: has joined #RubyOnRails
[19:09:44] a1fa: smathy: the #create method?
[19:09:55] simplyianm: has joined #RubyOnRails
[19:09:55] smathy: wa_r_ch_i__ld1, yes.
[19:10:03] wa_r_ch_i__ld1: @smathy are they the same thing?
[19:10:09] wa_r_ch_i__ld1: @smathy well trying the same problem
[19:10:17] smathy: a1fa, well, if that's where 100% of the code is happening, then yes. If you have any callbacks then I want to see those too.
[19:10:27] smathy: wa_r_ch_i__ld1, no, one's for the session, one's for the cache.
[19:11:28] tubbo: rhizome: that leafly life?
[19:11:48] wa_r_ch_i__ld1: @smathy thank you ;)
[19:12:09] a1fa: https://gist.github.com/anonymous/7e08baa2995b7b31bdf6
[19:12:24] Glyphik: has joined #RubyOnRails
[19:12:39] a1fa: i can also post the production log
[19:12:46] a1fa: or application log*
[19:12:50] a1fa: with input data
[19:14:17] gerep: a1fa: it doesn't tell much, show us more of your code, share your entire controller and also your routes
[19:14:49] smathy: wa_r_ch_i__ld1, you're welcome.
[19:14:58] hephaestus_rg: has joined #RubyOnRails
[19:15:30] cac: has joined #RubyOnRails
[19:15:36] a1fa: https://gist.github.com/anonymous/d17f72f0fd64e4d33504
[19:15:41] riotjones: has joined #RubyOnRails
[19:15:50] a1fa: gerep: for routes i only have resource: compliance
[19:15:50] smathy: a1fa, so, see how there's a call to `compliance_params` in there? So you're not showing me all the code.
[19:16:01] smathy: Oh stop. How can you still be doing those shitty gists.
[19:16:06] smathy: a1fa, !gist-usage
[19:16:06] helpa: a1fa: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[19:16:28] smathy: Not n00b enough.
[19:16:54] tubbo: lsone: you gotta be whitelisted so helpa doesn't get spammed out of existence
[19:16:58] riotjones: has joined #RubyOnRails
[19:17:04] lsone: All good, one time thing heh
[19:17:15] annlewis: has joined #RubyOnRails
[19:17:23] lsone: didn't realize i had been lurking for that long. lol
[19:17:30] dstarh: has joined #RubyOnRails
[19:18:10] atmosx: has joined #RubyOnRails
[19:18:30] a1fa: smathy: going to sign up for a git account
[19:20:21] qejk: has joined #RubyOnRails
[19:20:42] a1fa: the compliance_params is just params.require(:compliance).permit < which now i see is part of my problem
[19:21:07] guidohcosta: has joined #RubyOnRails
[19:22:08] pixelhandler: has joined #RubyOnRails
[19:23:13] Shoutsid: has joined #RubyOnRails
[19:24:08] cac: has joined #RubyOnRails
[19:25:03] barhum2013: has joined #RubyOnRails
[19:25:48] a1fa: well thought that was it, but its not
[19:25:56] Motoservo: has joined #RubyOnRails
[19:26:40] zpe: has joined #RubyOnRails
[19:28:25] gerep: a1fa: how is your compliance_params method?
[19:28:31] rhizome: tubbo i estimate there are huge opportunities in providing an upgrade path from whatever WP garbage they are all using, bigcommerce, etc.
[19:29:31] tubbo: rhizome: you have no idea how happy that would make my company if we could work on one of those
[19:29:35] a1fa: gerep: it 'looks' normal
[19:29:47] banister: has joined #RubyOnRails
[19:29:50] gerep: a1fa: can you share please?
[19:30:18] Macaveli: has joined #RubyOnRails
[19:30:18] SteenJobs: has joined #RubyOnRails
[19:30:23] mase-chatter: has joined #RubyOnRails
[19:30:28] honzahov1: has joined #RubyOnRails
[19:30:46] iamdevnul: so just curious, do any of you guys use VM???s in your development workflow or do you just install your stack to your workstation?
[19:30:54] Macaveli: Is it wise to supress this warning or? "WARNING: Nokogiri was built against LibXML version 2.9.2, but has dynamically loaded 2.9.0"
[19:30:55] lsone: the problem is the "if it isn't broke (completely down, servers up in flames, building falling down around them ) then they don't want to fix it
[19:30:58] Macaveli: Just ignore it
[19:31:00] rafaelfranca_: has joined #RubyOnRails
[19:31:02] a1fa: gerep: https://gist.github.com/anonymous/6da6015e2550e02498a9
[19:31:11] lsone: investment in a new platform moving away from the "WP garbage" is pretty high
[19:31:29] rhizome: yeah, and the standards appear pretty low
[19:31:42] lsone: ^ which means they want to invest even less.
[19:31:50] safety_cut: has joined #RubyOnRails
[19:31:55] lsone: most of these companies have no idea what kind of quality could be delivered.
[19:32:26] lsone: then you get your random freelancers/agencies that put a bad taste in their mouth.
[19:32:58] gerep: a1fa: it is correct, do you have any callbacks?
[19:33:35] dideler: has joined #RubyOnRails
[19:33:42] bonhoeffer: has joined #RubyOnRails
[19:33:48] rubyonrailed: has joined #RubyOnRails
[19:34:17] a1fa: gerep: not at the moment
[19:35:12] gerep: a1fa: what is weird is it trying to call compliance_id instead of id
[19:35:19] rubyonrailed: Can someone help me edit this so I can call `client.users`. I can do client['users'] but I want to be able to do it the other way.
[19:35:26] a1fa: gerep: i think i figured it out
[19:35:33] rubyonrailed: https://gist.github.com/anonymous/c94c6f583ee98e672513
[19:35:41] a1fa: gerep: in compliance model i had validates compliance_id
[19:35:55] gerep: a1fa: oh!!!
[19:36:04] gerep: a1fa: that column doesn't exist
[19:36:12] a1fa: gerep: and that fixed it.. but strange part is why the error didnt point to the model :(
[19:36:20] simplyianm: has joined #RubyOnRails
[19:36:52] gerep: a1fa: it pointed to the #create action because the first line was trying to create a new object and the compliance_id column doesn't exist
[19:37:06] gerep: a1fa: the problem was not in the model itself
[19:37:13] momomomomo: has joined #RubyOnRails
[19:37:21] gerep: a1fa: also, you don't need to validate the presence of ids
[19:37:32] gerep: at least, I think so :)
[19:37:43] gerep: specially when creating an object, you'll never have an id for it
[19:37:47] saneki_: has left #RubyOnRails: ()
[19:37:53] a1fa: i'm using the term id incorrectly.. this is actually a "name"
[19:38:17] cac: has joined #RubyOnRails
[19:38:18] a1fa: working on fixing that at the moment.. but there is alot of code where things are refered to as compliance_id, where in fact its a name
[19:39:55] nfk: has joined #RubyOnRails
[19:41:52] krisquigley: has joined #RubyOnRails
[19:42:03] Guest92503: has left #RubyOnRails: ()
[19:42:17] cac: has joined #RubyOnRails
[19:42:26] sunya7a: has joined #RubyOnRails
[19:45:19] USvER: has joined #RubyOnRails
[19:46:06] craysiii: is anyone working on an alternative to turbolinks?
[19:46:36] youngbaks: has joined #RubyOnRails
[19:46:41] workmad3: craysiii: you mean something like pjax?
[19:46:50] Palsson: has joined #RubyOnRails
[19:47:14] siddart: has joined #RubyOnRails
[19:48:21] craysiii: i guess yeah
[19:49:01] jamto11: has joined #RubyOnRails
[19:49:23] craysiii: ive just heard a lot about turbolinks the past week, good and bad, and im trying to decide what to do since im starting a new project.
[19:49:28] smathy: rubyonrailed, client = OpenStruct.new client
[19:51:01] rubyonrailed: smathy: Thanks
[19:51:05] smathy: rubyonrailed, you're welcome.
[19:51:10] User458764: has joined #RubyOnRails
[19:52:14] EminenceHC: has joined #RubyOnRails
[19:52:45] btreeinfinity: has joined #RubyOnRails
[19:53:09] michael_mbp: has joined #RubyOnRails
[19:53:23] yfeldblum: has joined #RubyOnRails
[19:53:32] nettoweb: has joined #RubyOnRails
[19:55:14] stannard: has joined #RubyOnRails
[19:56:01] workmad3: craysiii: first question - what sort of front end is this new project wanting?
[19:56:44] Cervajz: has joined #RubyOnRails
[19:56:50] craysiii: nothing fancy, just simple views, bootstrap
[19:57:43] workmad3: craysiii: if it's fairly bulk-standard rails, you may as well just leave turbolinks in, I guess
[19:57:46] Macaveli: config.serve_static_files should be set to TRUE on Production?
[19:57:51] workmad3: Macaveli: no
[19:57:55] mordocai: has joined #RubyOnRails
[19:58:08] momomomomo_: has joined #RubyOnRails
[19:58:19] Macaveli: alright only on dev workmad3
[19:58:23] workmad3: Macaveli: that sets up the rails server to serve files from the public/ directory, which is the job of your web server
[19:58:25] Macaveli: I had the order mixed up
[19:58:31] kaspergrubbe: Macaveli: You wan't Nginx, Apache or whatever you have in front to serve assets, not a Ruby process
[19:58:33] workmad3: Macaveli: dev and test are fine ;)
[19:59:02] workmad3: Macaveli: if you're doing full-stack testing with something like capybara & phantomjs, you want the test server to serve your assets after all
[19:59:47] Cache_Money: has joined #RubyOnRails
[19:59:59] Macaveli: alright thank you
[20:00:12] Macaveli: workmad3 you use pry for debugging?
[20:00:17] Macaveli: pry-remote more specific?
[20:01:04] Prkl8r: has joined #RubyOnRails
[20:01:05] workmad3: Macaveli: I use pry, I don't tend to bother setting up pry-remote
[20:01:27] Macaveli: workmad3 you run your apps with rails s and not with pow I assume?
[20:01:37] IFrank00: has joined #RubyOnRails
[20:01:58] workmad3: Macaveli: generally, yes
[20:02:21] djbkd: has joined #RubyOnRails
[20:03:15] Macaveli: I can't get pry-remote to work on Rails 4 -._
[20:03:30] Macaveli: I gave up after people were downvoting my stackoverflow post ...
[20:04:39] workmad3: Macaveli: did you try asking in #pry yet?
[20:04:48] safety_cut: has joined #RubyOnRails
[20:04:50] Macaveli: le me check
[20:06:51] barhum2013: has joined #RubyOnRails
[20:07:35] EminenceHC: has joined #RubyOnRails
[20:07:54] craysiii: should i run feature tests which involve an external api?
[20:08:15] craysiii: should i create*
[20:08:20] siddart: has joined #RubyOnRails
[20:08:36] bmurt: has joined #RubyOnRails
[20:10:22] Pupeno: has joined #RubyOnRails
[20:10:31] fryguy: you can if you want, you should take a look at webmock and/or vcr though
[20:10:40] chills42: has joined #RubyOnRails
[20:10:47] youngbaks: has joined #RubyOnRails
[20:10:56] wa_r_ch_i__ld1: @smathy by any chance do you know where i can find documentation for redis-rails?
[20:11:13] wa_r_ch_i__ld1: @smathy or does it just drop in any work with activerecord?
[20:11:28] wa_r_ch_i__ld1: @smathy i even looked at the gem's lib and it was like empty?
[20:13:16] shmilan: has joined #RubyOnRails
[20:13:19] smathy: wa_r_ch_i__ld1, I thought I linked you already: https://github.com/redis-store/redis-rails
[20:13:23] USvER: Hey, how can i capture output of the shell command that is constantly change. I mean command constatly updates it's output in shell, how can i capture this changes?
[20:13:57] USvER: It's updating a percentage completed
[20:14:02] wa_r_ch_i__ld1: @smathy i mean any documentation, i can't seem to get it working
[20:14:05] USvER: In place....
[20:14:23] smathy: wa_r_ch_i__ld1, redis-rails (like many of those *-rails gems) is really just a bunch of dependencies, and a README (some of the others have generators)
[20:14:23] wa_r_ch_i__ld1: and the linked to readme
[20:14:24] njero: has joined #RubyOnRails
[20:14:25] shmilan: can someone point me to a good, up-to-date resource for learning rspec?
[20:14:34] wa_r_ch_i__ld1: @smathy and the linked to readme is dead
[20:14:42] wa_r_ch_i__ld1: http://redis-store.org/redis-store
[20:14:57] smathy: wa_r_ch_i__ld1, no, the readme on github.
[20:15:24] smathy: wa_r_ch_i__ld1, not sure what else you need. You're not giving much info as to what problems you're having trying to get it working.
[20:16:05] wa_r_ch_i__ld1: @smathy, so here is some code http://paste.ofcode.org/z2CgApa4uC8K2KgwwcYfme
[20:16:31] wa_r_ch_i__ld1: ive i run the method the first time it will deliver the activerecord collection
[20:16:44] smathy: wa_r_ch_i__ld1, that's your original code, you're still not using Rails's cache API
[20:17:05] smathy: wa_r_ch_i__ld1, !caching
[20:17:05] helpa: wa_r_ch_i__ld1: Caching with Rails Guide - http://guides.rubyonrails.org/caching_with_rails.html - by Aditya Chadha
[20:17:25] wa_r_ch_i__ld1: @smathy oh , redis-rails overrides rails caching
[20:18:01] annlewis: has joined #RubyOnRails
[20:18:11] smathy: ACTION doesn't have the heart to tell him
[20:18:20] kalusn: has joined #RubyOnRails
[20:18:50] VeryBewitching: ACTION gives smathy a pint.
[20:20:47] hahuang65: has joined #RubyOnRails
[20:21:41] tubbo: wa_r_ch_i__ld1: that driver pattern son
[20:21:58] wa_r_ch_i__ld1: @tubbo haha how do you mean?
[20:22:24] jenrzzz: has joined #RubyOnRails
[20:22:29] cac: has joined #RubyOnRails
[20:23:22] sankaber: has joined #RubyOnRails
[20:24:47] tubbo: wa_r_ch_i__ld1: also known as the 'bridge pattern', https://en.wikipedia.org/wiki/Bridge_pattern
[20:25:22] tubbo: when you decouple an abstraction's interface from its implementation, in this case Rails provided a lightweight caching API and gave devs the ability to implement each part of that API
[20:25:32] tubbo: it's actually very similar to the strategy used for ActiveRecord and ActiveJob.
[20:25:58] wa_r_ch_i__ld1: is it def better to switch to rails' caching instead of trying to just use Redis straight like I was doing
[20:26:04] wa_r_ch_i__ld1: previously memcache was being used
[20:26:15] wa_r_ch_i__ld1: without using Rails' native cache
[20:26:30] atomical: is there a way i can force a left join on an association in an active record model?
[20:26:33] riotjones: has joined #RubyOnRails
[20:26:35] tubbo: wa_r_ch_i__ld1: i just think its easier...you can also switch between memcache and rails without needing to change any code
[20:26:39] tubbo: except config.cache_store
[20:26:45] MartinElvar: has joined #RubyOnRails
[20:26:47] Prkl8r: Hello all! Hopefully someone would be able to help me out. I'm doing the Odin thing and am having some problems. I'm trying to pass a combination of a hidden field (an event id) and a hash that includes all of the selected users. I keep getting a param is missing error. In looking at all of the docs, I can't find a good example of how I should be handling this. I'm pretty new so any help would be much appreciated.
[20:27:38] wa_r_ch_i__ld1: @tubbo memcache wasnt sing config.cache_store
[20:27:47] jgt: has joined #RubyOnRails
[20:27:53] wa_r_ch_i__ld1: @tubbo it was a roll your own with a plugin
[20:28:03] tubbo: wa_r_ch_i__ld1: that's pretty lame. you ever hear of dalli?
[20:28:14] wa_r_ch_i__ld1: @tubbo yeah, but just today! ;)
[20:28:15] tubbo: that's normally what people use as a rails cache store when they use memcache
[20:29:16] wa_r_ch_i__ld1: @tubbo could something like this maybe work without going through Rails' cache https://books.google.com/books?id=5EurTJrC8ZEC&pg=PA13&lpg=PA13&dq=add+rails+object+to+redis&source=bl&ots=BTEexSRLtb&sig=xQ8XLwPs0n_b7Qw0OziE_HE4xC8&hl=en&sa=X&ved=0CE8Q6AEwCDgKahUKEwjH1Pvhn8DIAhWJXR4KHd63AvM#v=onepage&q=add%20rails%20object%20to%20redis&f=false
[20:29:31] wa_r_ch_i__ld1: thats how i currently have redis setup
[20:31:04] wa_r_ch_i__ld1: difference with my situation and the book is I dont want a separate k,v for each record, i want the whole collection. and when i query the second time, it comes back as an instance var_id or string
[20:31:13] krisquigley: has joined #RubyOnRails
[20:31:37] Scriptonaut: How do I combine the results of two activerecord queries without turning the final result into an array?
[20:31:55] tubbo: wa_r_ch_i__ld1: i'm not saying it's not going to work, just saying its a really shitty solution to a problem that's already been solved
[20:31:59] Scriptonaut: I want Listing.viewers + Listing.team_members, but I want to still be able to call pluck(:person_id)
[20:32:20] matthewd: has joined #RubyOnRails
[20:32:28] tubbo: Scriptonaut: scopes are chainable
[20:32:43] chandlerbing: has joined #RubyOnRails
[20:32:57] Scriptonaut: ya, I don't want to get all the viewers that are also team members, I want all the viewers and all the team members in a list
[20:33:01] workmad3: Scriptonaut: you can also union them... `Listing.viewers.union(Listing.team_members)`
[20:33:01] Scriptonaut: I want the union
[20:33:11] tubbo: yeahhhh union
[20:33:19] Scriptonaut: I did a union with |, but it changed it to an array
[20:33:30] workmad3: Scriptonaut: that's because | is array union
[20:33:36] tubbo: wa_r_ch_i__ld1: i mean, you could also just execute raw SQL all over the place and not use ActiveRecord's ORM at all.
[20:33:39] workmad3: Scriptonaut: not overridden by AR ;)
[20:33:53] Scriptonaut: that gave me some kind of arel node object
[20:34:01] barhum2013: has joined #RubyOnRails
[20:34:25] EminenceHC: has joined #RubyOnRails
[20:34:30] wa_r_ch_i__ld1: @tubbo when you say the problem has been solved, you're saying use Rails' caching and if i want redis, redis-rails gem?
[20:34:57] Scriptonaut: do you guys know how I can do an activerecord union (and not get an Arel::Node back
[20:35:57] tubbo: wa_r_ch_i__ld1: no, i'm not telling you to do anything. i'm just saying that reinventing the wheel if you just want to cache data into redis is not the most productive use of your time.
[20:35:58] dionysus69: has joined #RubyOnRails
[20:36:26] tubbo: there are a lot of benefits to rails caching
[20:36:32] madebymarkca: has joined #RubyOnRails
[20:36:40] cac: has joined #RubyOnRails
[20:37:01] rakm_: has joined #RubyOnRails
[20:37:54] beingjohnm: looking at the heroku instructions and they assume you are running ruby 2.2.3 but rbenv only has 2.2.1 available...
[20:38:05] mrchris: What does the `on:` macro do in a Rails route?
[20:38:48] mrchris: I'm reading the docs over and over but its not clicking
[20:38:59] gerep: I need to run this code https://gist.github.com/gerep/24e759b3f014392767ad to generate 1.5 million records, locally, whats the best way of doing it? Should I use threads? If so, can someone help?
[20:39:20] based_pdev: has joined #RubyOnRails
[20:39:38] nyaa: has joined #RubyOnRails
[20:40:00] tubbo: gerep: how often?
[20:40:08] gerep: tubbo: just now
[20:40:15] gerep: tubbo: I need to test a feature
[20:40:19] tubbo: gerep: so just run it :)
[20:40:26] jamiejackson: has joined #RubyOnRails
[20:40:29] gerep: tubbo: it will take a long time, won't it?
[20:40:42] tubbo: gerep: yeah but you only need to run it once, right?
[20:40:42] gerep: 150000.times do
[20:40:45] tubbo: so who cares
[20:40:50] gerep: tubbo: hahah
[20:41:31] jamiejackson: hi folks. i'm still pretty inexperienced with rails, but i'm trying to do a 3 => 4.2 upgrade. one thing that's tripping me up is: https://gist.github.com/jamiejackson/7c6eef337611cefa98b9
[20:41:35] ericjphillips: has joined #RubyOnRails
[20:41:50] gerep: tubbo: I was thinking about separating it in 6 threads, Threads.new { 250.times do {} }
[20:41:52] cac: has joined #RubyOnRails
[20:42:09] gerep: tubbo: do you think it would help somehow?
[20:42:13] Pupeno: has joined #RubyOnRails
[20:42:39] jamiejackson: getting ArgumentError (wrong number of arguments (1 for 0)), and i think it's about the all() calls.
[20:42:54] jamiejackson: not sure what that conversion would be
[20:43:18] gerep: jamiejackson: it is calling @site_report_years.last and this variable is not defined anywhere in your method
[20:44:05] tubbo: gerep: i don't know, give it a shot...i mean you don't even know how long this is going to take
[20:44:13] tubbo: gerep: like it *could* only take 30 mins
[20:44:31] gerep: tubbo: you are correct, I'm overthinking hahah I'll try it now
[20:44:58] rakm: has joined #RubyOnRails
[20:45:04] tubbo: gerep: i'm actually curious to know whether splitting the work up into multiple Threads actually does anything useful...because there's this one project here where we sometimes have to make massive CSV exports that take hours to run on production.
[20:45:09] agdr: has joined #RubyOnRails
[20:45:42] gerep: tubbo: using multiple Threads?
[20:45:49] kalusn: has joined #RubyOnRails
[20:46:01] tubbo: gerep: parse error
[20:47:44] jenrzzz: has joined #RubyOnRails
[20:48:02] ericjphillips: has joined #RubyOnRails
[20:48:12] jamiejackson: gerep:thanks for looking. looks like @site_report_years is set in application_controller.rb (base class), so i don't think that's it
[20:48:52] matthewd: Scriptonaut: I happened to come across https://github.com/brianhempel/active_record_union the other day
[20:49:18] cac: has joined #RubyOnRails
[20:49:33] gerep: jamiejackson: you can place a debugger and check where the error is exactly
[20:49:34] jamiejackson: did older versions of rails's all() take arguments (and not new rails)?
[20:49:53] gerep: jamiejackson: you can try using .where()
[20:50:45] matthewd: jamiejackson: Yes... https://github.com/rails/activerecord-deprecated_finders/blob/master/lib/active_record/deprecated_finders/base.rb#L66-L68
[20:51:39] doctorly: has joined #RubyOnRails
[20:51:48] smathy: beingjohnm, 2.2.3 is available in rbenv, update your build: pushd ~/.rbenv/plugins/ruby-build && git pull && popd
[20:52:02] gerep: jamiejackson: you can try this? d = EntryRate.where(:year => @site_report_years.last).where(:state_id => sid)
[20:52:08] Scriptonaut: hehe, matthewd that's exactly what I needed
[20:52:20] jamiejackson: gerep:will try...
[20:52:37] arBmind: has joined #RubyOnRails
[20:53:25] beingjohnm: smathy: I did do the git pull but I'll try all of that.
[20:53:34] barhum2013: has joined #RubyOnRails
[20:53:37] Or1on: has joined #RubyOnRails
[20:54:00] t4nkD: has joined #RubyOnRails
[20:54:37] jamiejackson: gerep: i think that's the ticket, thanks. swapping out the rest of the all() instances
[20:54:40] beanHolez: has joined #RubyOnRails
[20:55:34] ericjphillips: has joined #RubyOnRails
[20:56:24] t4nkD: Anyone ever experience really dramatic slowdown in rails/rake command startups (server, console, etc) after packaging(vendoring) gems? Or have any advice on where to start looking perhaps? Everything is running in a docker container on ruby 2.2.2
[20:56:59] jamiejackson: gerep: i take it back, i think it's not quite behaving as expected. might just be a syntax difference of where. looking into it.
[20:57:23] t4nkD: Kind of thought that it was our boot2docker image, but, switching from VirtualBox to VMWare Fusion made a significant difference, fusion is *much* faster but still requires like 30 second load times...
[20:57:43] t4nkD: Weird thing is it's only with packaged gems...
[20:58:13] jamiejackson: gerep, i think it might be find(:all, ...) instead. where do you see "where," btw?
[20:58:38] gerep: jamiejackson: you are searching for all records and giving a condition
[20:58:43] hephaestus_rg: has joined #RubyOnRails
[20:59:22] tubbo: t4nkd: what do you mean "it's only with packaged gems"?
[20:59:37] t4nkD: The behavior only occurs when I package the projects gems
[21:00:24] wethu: has joined #RubyOnRails
[21:01:02] tubbo: t4nkd: but any `rails` command wouldn't work until you packaged the project's gems...so...how could you know that?
[21:01:27] t4nkD: Sorry, literally the bundle package command
[21:02:34] t4nkD: So by virtue of having all the gems locally, this occurs, and it seems to happen only if you're using boot2docker, our peers on Windows running a pure ubuntu desktop VM don't have this problem
[21:03:12] rhizome: prime PR territory
[21:03:24] t4nkD: I'm assuming it has something to do with the way their boot2docker distro is set up, but, I was hoping I could figure out if anyone can pick out system libraries or anything like that which might have an effect
[21:03:31] simplyianm: has joined #RubyOnRails
[21:03:47] bobbobbins: has joined #RubyOnRails
[21:03:56] beanHolez: I have a many-to-many association using a join model (has_many, through), connecting Users to a notification. A user can dismiss or accept a notification, and a timestamp is stored on the join model for each of those actions. I can then determine that a notification is active for a user if both the timestamps are nil. How can I create a scope so that I can find all active notifications, where they are returned based on criteria provided
[21:03:57] beanHolez: by the join model? My model setup: https://gist.github.com/bholzer/c58a897ae0d8c8bb938e
[21:04:09] jamiejackson: gerep, i meant i'm not sure where "where()" is documented.
[21:04:30] t4nkD: Never tried to run an strace before, got any advice rhi?
[21:04:34] t4nkD: rhizome: ^?
[21:04:41] Prkl8r: Anyone be willing to take a quick look at a params problem I'm having no luck with? Stackoverflow link: http://goo.gl/Nfdzgk
[21:05:25] rhizome: t4nkd: not particularly. i tend to try everything else first tho
[21:05:26] tubbo: t4nkd: yeah it might. i know i've personally had some issues with boot2docker, it's one of the reasons i really wish i could do all the things with ubuntu that i can do with OS X so i can just move already and take advantage of native container support
[21:05:55] t4nkD: I'm pretty much convinced I'm gonna get a sputnik after this year finishes
[21:05:55] mices: i tried putting an ordinary anchor in a view it didn't render it just displayed <a href=...
[21:05:56] tubbo: s/issues/slowness
[21:06:06] t4nkD: Seriously feel you on that sentiment though
[21:06:16] momomomomo: has joined #RubyOnRails
[21:06:32] mices: not within p or pre containers
[21:06:44] bonhoeffer: has joined #RubyOnRails
[21:07:03] beanHolez: mices: You need to mark the string as HTML safe
[21:07:14] rromanch_: has joined #RubyOnRails
[21:08:19] michaeldeol: has joined #RubyOnRails
[21:08:35] beanHolez: mices: Have you tried <%= raw @anchor_string %> ?
[21:09:23] benlieb: has joined #RubyOnRails
[21:09:28] hooper: has joined #RubyOnRails
[21:09:53] hooper: has joined #RubyOnRails
[21:10:19] hooper: has joined #RubyOnRails
[21:10:43] hooper: has joined #RubyOnRails
[21:11:10] hooper: has joined #RubyOnRails
[21:11:29] mices: ok i'll try thanks is that the way to mark it html safe?
[21:12:39] tubbo: mices: there are a few ways to do it
[21:12:47] tubbo: http://stackoverflow.com/questions/4251284/raw-vs-html-safe-vs-h-to-unescape-html
[21:13:14] beanHolez: mices: Yes, raw is a helper that just does `some_string.to_s.html_safe`
[21:13:34] mices: tubbo: ty
[21:13:46] gerep: jamiejackson: you mean this? http://apidock.com/rails/ActiveRecord/QueryMethods/where
[21:14:56] beanHolez: mices: As always, be careful with unescaping content that may be dynamic. It's a common XSS vector
[21:14:59] gerep: tubbo: almost 30 minutes and only 174,874 saved
[21:15:13] smathy: beanHolez, I don't understand how your comment in your gist: "Instead, every active notification for every user is returned when `user.notifications.active`" differs from your stated goal: "find all active notifications" ?
[21:15:21] agdr: has joined #RubyOnRails
[21:15:29] tubbo: gerep: it will probably take about 8 hours at that rate
[21:15:33] zpe: has joined #RubyOnRails
[21:15:40] gerep: tubbo: I'll try using threads
[21:15:45] tubbo: gerep: actually what i meant earlier was give it a shot with the threads and see if it does anything different
[21:15:57] gerep: tubbo: ah! That's what I'll do now
[21:16:58] northfurr: has joined #RubyOnRails
[21:17:15] beanHolez: smathy: Sorry, that was a bit ambiguous. When I call Notification.active, I'd like to get all active notifications. If I go through the user, however, I'd like to get those active notifications scoped to the user. As it stands, `user.notifications.active` gives me all active notifications for every user in the system. It should only return those associated to `user`
[21:18:11] smathy: Prkl8r, the commenter is right, you're not using `params.require` correctly.
[21:18:12] DoubleMalt: has joined #RubyOnRails
[21:18:21] smathy: Prkl8r, look at the docs he linked you to.
[21:18:50] annlewis: has joined #RubyOnRails
[21:20:20] smathy: beanHolez, paste the `rails console` showing you setting `user` and then calling `user.notifications.active`
[21:21:25] beanHolez: smathy: I have found that `user.notifications.merge(NotificationUser.active)` works exactly as expected, but it doesn't feel right coupling that inside the Notification class. Yeah, just a sec.
[21:21:42] jameswork: has joined #RubyOnRails
[21:21:49] bonhoeffer: has joined #RubyOnRails
[21:25:24] beanHolez: smathy: https://gist.github.com/bholzer/debb39885da2e378a29b
[21:25:59] matthewd: beanHolez: Note the extra join
[21:26:07] wpp: has joined #RubyOnRails
[21:26:14] Pupeno: has joined #RubyOnRails
[21:26:14] Pupeno: has joined #RubyOnRails
[21:27:24] riotjones: has joined #RubyOnRails
[21:27:34] beanHolez: matthewd: Indeed, my question is how to kill that off. I don't even have a `notification_users_notifications` table. It's causing the where on user_id to be ignored, it seems
[21:28:09] matthewd: It's there because the through association uses a join internally, but you're also adding a second one in your scope
[21:28:13] Prkl8r: @smathy I am a bit confused as to how to translate that doc into what I'm trying to do.
[21:29:09] Scripore: has joined #RubyOnRails
[21:29:11] matthewd: I don't think I know of a better way to do this than (class User) `has_many :active_notification_users, -> { active }; has_many :active_notifications, through: :active_notification_users` :/
[21:29:16] VeryBewitching: Prkl8r: What are you trying to do?
[21:30:23] smathy: beanHolez, not sure what to tell you, the SQL being generated (which I've just copied out into a comment on your gist) is correct, and will only produce records for that user_id.
[21:30:34] _wldcordeiro: has joined #RubyOnRails
[21:31:01] _wldcordeiro: has joined #RubyOnRails
[21:31:11] matthewd: beanHolez: Once you get through `user.notifications`, you have a relation that contains Notifications... there's no [supported] way to get back to the user, in order to find notifications active for *them* -- at best, you'd be able to filter to notifications active for *somebody*
[21:31:19] nanuko: has joined #RubyOnRails
[21:31:28] Prkl8r: So I am trying to create an invite table. My thought was to click on an event to add invitees and pass that event id. From there, generate a list of users (that' aren't the current user) and select those that are being invited. So I would create an array of all the users selected and combine that with the event id and then create the invitation objects that way.
[21:31:41] smathy: matthewd, actually, with the merge it will create the double-join, and do it correctly.
[21:31:48] matthewd: smathy: No, it won't
[21:32:09] VeryBewitching: Prkl8r: Just read the source you originally linked. params.require(:model).permit(:field_one, :field_two) in the simplest case.
[21:32:15] matthewd: smathy: There's no user_id constraint on notification_users_notifications
[21:32:54] nanuko: what???s the purpose of the test database? shouldn???t unit testing avoid side effects such as writing to the db?
[21:33:11] slash_nick: nanuko: aren't there other types of testing?
[21:33:26] matthewd: Oh, but we do actually end up with all the constraints on the one table... it's just the bonus join that's causing a problem
[21:33:27] nanuko: like integration?
[21:33:34] VeryBewitching: Prkl8r: If :model accepts nested attributes for an associated model: params.require(:model).permit(:field_one, :field_two, second_model: [:field_one_nested, :field_two_nested])
[21:33:35] slash_nick: nanuko: sure
[21:33:40] beanHolez: matthewd: Exactly. It looks like a method on the user or NotificationUser is going to be better than a named scope in this instance
[21:33:59] matthewd: beanHolez: So, if you removed your `joins` from the scope on Notification, your gist would work
[21:34:01] wpp: hi does someone know if actioncable is only going to support clients via javascript?
[21:34:02] nanuko: sweet, thanks!
[21:34:09] matthewd: ... but Notification.active wouldn't.
[21:34:18] smathy: matthewd, doesn't matter because there's one on notifications and the first JOIN already restricts the results to only the notification_users that are joined to those notifications.
[21:34:21] Shoutsid: has joined #RubyOnRails
[21:34:24] matthewd: Maybe that's okay for your purposes? Notification.active doesn't actually sound all that useful.
[21:34:29] wpp: or will there be native counterparts for android/ios?
[21:34:49] Prkl8r: Ah ok. I think I have some things to try out. Thanks
[21:34:54] Motoservo: has joined #RubyOnRails
[21:34:55] smathy: Anyway, beanHolez, matthewd, I just wrote up your code in my own demo app and ran the same queries and I've pasted my console output into your gist - just to demonstrate.
[21:34:58] smathy: https://gist.github.com/bholzer/debb39885da2e378a29b#gistcomment-1595273
[21:35:11] beanHolez: matthewd: yep, that was where I was getting caught up. Notification.actve may end up being useful from an administrative standpoint, but that's it.
[21:35:36] bruno-: has joined #RubyOnRails
[21:35:44] njero: beanHolez: are u using uuid for primary key?
[21:35:59] VeryBewitching: Prkl8r: Also, be aware that you can define a route to pass a parameter and you can continue to pass that along if you wish. Like get '/some/controller/action/:foo', to: 'some_controller#action'
[21:36:01] yfeldblum: has joined #RubyOnRails
[21:36:07] ellisTAA: has joined #RubyOnRails
[21:36:11] smathy: beanHolez, as you can see Notification(id: 4) only appears for the User.first.notifications.active and 1&2 only appear for User.last.notifications.active
[21:36:20] VeryBewitching: Prkl8r: In SomeController#action you'll have params[:foo]
[21:36:25] njero: beanHolez: hw did u do that? activeuuid?
[21:37:01] Prkl8r: Does that make more sense than try to pass it as a hidden tag?
[21:37:20] matthewd: smathy: You need some more NotificationUsers -- you only have one per Notification
[21:38:07] ellisTAA: has joined #RubyOnRails
[21:38:08] VeryBewitching: Prkl8r: That's situational really.
[21:38:10] ellisTAA: i???m uploading my app to aws, and i have an endpoint for my db, do i just throw that into the database.yml file under production? url: ???theendpointofmydb????
[21:38:14] matthewd: Create a user 3 with all 4 notifications, then try again
[21:38:23] northfurr: has joined #RubyOnRails
[21:38:26] NivenHuH: has joined #RubyOnRails
[21:38:37] VeryBewitching: Prkl8r: Once you get it working in the simplest sense you can devise a better way of doing it by refactoring if you wish.
[21:38:50] Prkl8r: Ah ok. Well, I have some things to go try and see if I can get this working! Thanks for your assistance.
[21:38:50] craysiii: 'devise' heh
[21:39:27] EminenceHC: has joined #RubyOnRails
[21:39:46] tubbo: wpp: as far as i can tell, there's nothing official out there regarding support for native push notifications on iOS or Android.
[21:39:48] beanHolez: n_e_o: Nope, just dealing with some legacy idiocy where out PK is Varchar(45)
[21:40:14] mices: i once sent someone an email and i got an auto reply from them with a link to click to complete sending of the email, i thought that was the greatest thing
[21:40:15] smathy: matthewd, will you concede yet? https://gist.github.com/bholzer/debb39885da2e378a29b#gistcomment-1595286
[21:40:30] smathy: beanHolez, the problem is that your query is not eliminating duplicates.
[21:40:38] wpp: has joined #RubyOnRails
[21:41:18] smathy: beanHolez, just add a .uniq to your active scope on Notification.
[21:41:50] moei: has joined #RubyOnRails
[21:42:03] njero: beanHolez: is that fine with other gems? also what abt index fragmentation in db?
[21:42:11] matthewd: smathy: We obviously have different definitions of "do it correctly" ??\_(???)_/??
[21:42:14] _wldcordeiro: has joined #RubyOnRails
[21:42:15] rhizome: mices: it's called greylisting
[21:42:35] tubbo: not sure how that benefits anything
[21:42:41] rhizome: or graylisting
[21:42:43] tubbo: (clicking a link to complete sending of an email)
[21:42:44] ijiijijjjijiij: has joined #RubyOnRails
[21:42:50] mices: prevents spam
[21:43:02] tubbo: i have my email addresses public and they don't get spammed that often
[21:43:22] neanderslob: has joined #RubyOnRails
[21:43:35] beanHolez: matthewd smathy: Kind of agreeing with matthewd a bit here, seems a but smelly that way. I'm thinking a method on User is going to be a little bit cleaner here
[21:43:35] tubbo: yeah, i mean there's a lot of spam but i don't see it
[21:43:55] smathy: matthewd, the truth is that the join has always been working fine.
[21:44:01] mices: i thought if you leave exposed to the public bots will pick it up and spam
[21:44:18] rromanch_: has joined #RubyOnRails
[21:44:30] matthewd: The extra join is producing (exponentially) extra rows; distincting them away is a shortcut to melting your DB server
[21:44:59] tubbo: mices: the question is, will those bots make it through the levels of spam filtering
[21:45:34] beanHolez: matthewd smathy: probably just gonna go with (on user model) `def active_notifications; self.notification_users.active.map(&:prompts); end`
[21:45:45] smathy: matthewd, so you're moving from "doesn't work" to "it's not efficient" ?
[21:45:51] mices: yea but i still have to read what was delivered spam or not
[21:45:56] mices: at least the subject
[21:45:58] tubbo: mices: i don't
[21:46:00] tubbo: i delete it
[21:46:02] matthewd: smathy: You added a `uniq`
[21:46:10] rhizome: i use RBLs on my own server and get 70% spam rejections, maybe 20 a day make it through
[21:46:15] smathy: matthewd, you said there was no way to do it for a given user.
[21:46:22] matthewd: Duplicate rows = doesn't work; uniq = not efficient
[21:46:24] ellisTAA: do i just throw my database endpoint into database.yml under production?
[21:46:50] matthewd: I thought I corrected myself on that earlier, when I realised all the conditions were ending up on the first relation
[21:47:02] smathy: matthewd, but the truth is that even the other non-distinct method WAS producing a correct list of results, constrained to that single user - just that there were duplicates because of the JOIN.
[21:47:23] smathy: matthewd, maybe I missed that, then we're good.
[21:47:31] yfeldblum: has joined #RubyOnRails
[21:47:37] ellisTAA: https://gist.github.com/ellismarte/e4105f444c57cc75e144
[21:48:01] gerep: tubbo: 20 minutes and 163,994
[21:48:02] smathy: beanHolez, just try both, see which is quicker.
[21:48:18] gerep: tubbo: with two threads, each one doing 250k.times
[21:48:25] tubbo: gerep: good shit!
[21:48:35] tubbo: i will have to remember that next time
[21:48:54] tubbo: gerep: though not as much of a speed improvement as i would have hoped..
[21:49:22] EminenceHC: has joined #RubyOnRails
[21:50:58] allcentury: has joined #RubyOnRails
[21:51:47] matthewd: smathy: Incidentally, I hate that we do that... the merge applies to a different relation, just because of the order that the joins were set up
[21:52:01] darrencauthon: has joined #RubyOnRails
[21:52:28] matthewd: But I haven't come up with an API that does it better :(
[21:52:30] jessemcgilallen: has joined #RubyOnRails
[21:53:28] beauby: has joined #RubyOnRails
[21:54:02] bonhoeffer: has joined #RubyOnRails
[21:54:13] jessemcgilallen: has left #RubyOnRails: ()
[21:54:16] USvER: has joined #RubyOnRails
[21:55:46] shinnya: has joined #RubyOnRails
[21:56:13] smathy: matthewd, I don't let it bother me, honestly you over-estimate how much DISTINCT hurts a query.
[21:57:27] _wldcordeiro: has joined #RubyOnRails
[21:57:32] inoter: has joined #RubyOnRails
[21:57:41] safety_cut: has joined #RubyOnRails
[21:58:23] zcreative: has joined #RubyOnRails
[21:58:29] jessemcgilallen: has joined #RubyOnRails
[21:58:45] zcreative: has joined #RubyOnRails
[21:59:02] zcreative_: has joined #RubyOnRails
[21:59:09] safety_c_: has joined #RubyOnRails
[22:00:25] northfurr: has joined #RubyOnRails
[22:01:19] theblang: has joined #RubyOnRails
[22:01:47] _wldcordeiro: has joined #RubyOnRails
[22:02:57] zcreative__: has joined #RubyOnRails
[22:04:13] Coldblackice: has joined #RubyOnRails
[22:04:31] hephaestus_rg: has joined #RubyOnRails
[22:06:58] Lightsword: has joined #RubyOnRails
[22:07:59] sonofdirt: has joined #RubyOnRails
[22:09:09] zcreative: has joined #RubyOnRails
[22:09:29] zcreative_: has joined #RubyOnRails
[22:09:47] zcreative_: has joined #RubyOnRails
[22:10:02] jenrzzz: has joined #RubyOnRails
[22:11:01] dionysus69: ... //= require slippry.min.js this should load the file which is in the assets/javascripts dir right?
[22:11:16] arthurnn: has joined #RubyOnRails
[22:11:59] zcreative_: has joined #RubyOnRails
[22:12:29] sankaber: has joined #RubyOnRails
[22:12:36] smathy: dionysus69, yes.
[22:13:12] smathy: (assuming you mean app/assets/javascripts )
[22:14:12] dionysus69: something is not firing having trouble with setting up slider
[22:14:16] smathy: dionysus69, and assuming you're talking about inside a manifest file.
[22:14:41] dionysus69: inside application.js i assume thats the manifest file :P
[22:15:21] beanHolez: matthewd smathy: Did a little benchmarking and playing around. I found that #uniq on the scope seems to work fine. However, I didn't like having the join and merge in that scope. Just seemed a bit messy. My solution was to add a method on the user that retrieves their active prompts. The difference in speed is negligible: `self.notification_users.active.joins(:notification).merge(Notification.active).map(&:notifications)`
[22:16:47] mary5030: has joined #RubyOnRails
[22:18:08] rickmasta: has joined #RubyOnRails
[22:19:04] smathy: beanHolez, not how I'd go, but if that works for you then all good.
[22:19:14] smathy: dionysus69, yes that is.
[22:19:26] cornerma1: has joined #RubyOnRails
[22:19:36] annlewis: has joined #RubyOnRails
[22:19:49] northfurr: has joined #RubyOnRails
[22:20:00] smathy: dionysus69, so at the top of your app/assets/javascripts/slippry.min.js - if you put an alert("foobar"); and then refresh the browser, you don't see that alert?
[22:20:21] dionysus69: smathy: ok worked now, as usual some stupid issue, the link had a typo inside and it came from a slider website... lol my luck
[22:20:44] smathy: dionysus69, :)
[22:20:49] beanHolez: smathy: One problem I was running into was that having merge there inside the scope prevented the scope from being useful anywhere else.
[22:20:54] dionysus69: it gets imported, the problem was the other file that gets imported from google apis
[22:21:27] beanHolez: Curious as to why a new user method seems like the wrong idea to you?
[22:22:39] ellisTAA: does anyone know how to migrate db in aws?
[22:24:10] beanHolez: EllisTAA: To another RDS instance, or outside of AWS entirely?
[22:24:19] simplyianm: has joined #RubyOnRails
[22:26:14] ellisTAA: beanHolez: to aws rds instance
[22:28:10] riotjones: has joined #RubyOnRails
[22:28:12] user1138_: has joined #RubyOnRails
[22:29:03] riotjones: has joined #RubyOnRails
[22:29:29] pydave6367: has joined #RubyOnRails
[22:29:29] smathy: beanHolez, well because right now you have an n+1 query there, and the resulting query is still doing a DISTINCT over an INNER and OUTER join - so actually the DISTINCT is now doing more work.
[22:30:26] smathy: beanHolez, even if you eliminate the n+1 by adding an .includes(:notification) in there, you still end up with a DISTINCT over an inner and outer join. The other solution was neater in code, and created both neater and faster SQL.
[22:31:16] smathy: beanHolez, plus you didn't have a bunch of notification code in your user model, each model was handling its own scopes/knowledge domain.
[22:31:24] smathy: SRP and all that.
[22:33:00] duderonomy: has joined #RubyOnRails
[22:33:22] beanHolez: smathy: Not really. I can remove n+1, and I'm not seeing a DISTINCT on the generated SQL. I'm not particularly happy about moving notification stuff to the user, but before, the notification was relying on notification_user scope, as well as it being necessary to go through an association for the scope to work.
[22:33:32] hahuang65: has joined #RubyOnRails
[22:33:40] neanderslob: has joined #RubyOnRails
[22:34:00] rromanch_: EllisTAA what type of migration, rails migration? or you want to migrate an existing hosted db to rds?
[22:34:12] ellisTAA: rromanch_: yes migration
[22:34:51] jameswork: has joined #RubyOnRails
[22:35:59] craysiii: opinions on draper gem?
[22:36:41] rromanch_: EllisTAA to run a rails migration, from what i remember when using rds, it should work as is. Setup your db.yml correctly and run your migration as you normally would
[22:36:53] beanHolez: smathy: Generated SQL: https://gist.github.com/bholzer/c58a897ae0d8c8bb938e#gistcomment-1595329
[22:37:38] bruno-: has joined #RubyOnRails
[22:38:35] doctorly: has joined #RubyOnRails
[22:40:01] duderonomy: has joined #RubyOnRails
[22:40:28] rgtk: has joined #RubyOnRails
[22:40:35] beanHolez: EllisTAA: Ah, I see. I misunderstood what it was you are trying to do. Yes, you will set up database.yml to point to your RDS instance. Then, when you run rake db:migrate, it should work just fine
[22:41:15] smathy: beanHolez, ok, you've lost me now with Notification#active - not sure where that came from. Anyway, I've explained as well as I can.
[22:41:45] Cervajz: has joined #RubyOnRails
[22:41:52] quazimodo: has joined #RubyOnRails
[22:43:05] ellisTAA: beanHolez: when i run rake db:migrate locally, it will create it on my production server?
[22:44:11] beanHolez: Sorry, I left out information that I thought irrelevant. There is an `active` attribute on the Notification model. I was ignoring it before. And sorry, but you indeed haven't. You claim there is a DISTINCT clause being generated, which I don't see. You claim there is an OUTER JOIN, which also isn't there. "Cleaner in code" is a little subjective, but those points are not.
[22:44:33] kalusn: has joined #RubyOnRails
[22:44:57] rromanch_: EllisTAA, yes if RAILS_ENV=production
[22:45:10] smathy: beanHolez, I was obviously guessing wrong at the code you hadn't shown me. So let's just say it's all subjective, we've reached the point of diminishing returns here.
[22:45:35] unholycrab: has joined #RubyOnRails
[22:45:36] rromanch_: and given your security groups have your cidr/ports open etc
[22:45:51] beanHolez: EllisTAA: It depends on what environment you are running in. You would likely have RDS configured under the production env in db.yml. If you were to run migrations under the production environment, those would indeed run on RDS
[22:46:38] wcalderipe: has joined #RubyOnRails
[22:46:56] beanHolez: smathy: Indeed. Thanks for your help
[22:47:20] gambl0re: has joined #RubyOnRails
[22:48:12] n1lo: has joined #RubyOnRails
[22:48:26] jameswork: has joined #RubyOnRails
[22:49:21] user1138__: has joined #RubyOnRails
[22:50:04] smathy: craysiii, assuming you're asking about it and not about the decorator pattern in general, then thumbsup - it's a decent gem for doing decorator pattern.
[22:51:23] chopin_: has joined #RubyOnRails
[22:51:53] hephaestus_rg: has joined #RubyOnRails
[22:52:08] beauby: has joined #RubyOnRails
[22:52:17] jameswork: has joined #RubyOnRails
[22:52:49] barhum2013: has joined #RubyOnRails
[22:53:24] ellisTAA: beanHolez: how do i define production as the default?
[22:53:39] beanHolez: EllisTAA: You don't
[22:53:53] beanHolez: Why do you want to?
[22:53:56] ellisTAA: beanHolez: how does my server know which db to run?
[22:54:04] ellisTAA: test, development, or production
[22:54:09] njero: has joined #RubyOnRails
[22:54:26] IFrank00: has joined #RubyOnRails
[22:54:33] beanHolez: Ah, I see. You need to set the RAILS_ENV environment variable on the server
[22:55:20] ellisTAA: beanHolez: how?
[22:55:42] Aeyrix: EllisTAA: Use Google, please.
[22:55:51] Aeyrix: I'm going to get into the habit of training people to Google for the simplest shit like this.
[22:56:25] rhizome: i do that by suggesting terms
[22:56:37] Aeyrix: rhizome: I tried that.
[22:56:40] Aeyrix: Now I just tell people outright.
[22:56:54] rhizome: well it's a thankless role, to be sure
[22:56:59] ellisTAA: Aeyrix: why even communicate then? if everything can just be googled
[22:57:07] workmad3: Aeyrix: !gg here you go ;)
[22:57:10] Aeyrix: EllisTAA: That's a logical fallacy and you know it.
[22:57:16] beanHolez: echo "RAILS_ENV=production" >> /etc/profile
[22:57:19] Aeyrix: Thanks workmad3 :)
[22:57:29] smathy: EllisTAA, we're happy to talk about Rails issues, but we have to draw a line otherwise the channel gets cluttered with unrelated things.
[22:57:30] rhizome: EllisTAA: most of the time beginners just don't know the terminology
[22:57:31] craysiii: yes smathy spot on, thanks
[22:57:45] smathy: EllisTAA, how to set an environment variable has nothing to do with Rails.
[22:57:56] smathy: EllisTAA, it'd be like asking questions about how to use your web browser.
[22:58:29] Aeyrix: smathy: emacs or vim? :^)
[22:58:31] smathy: EllisTAA, it may seem terse at times, but you've been around for long enough now that people start expecting you to know the difference between questions that are on and off topic.
[22:58:49] smathy: craysiii, np.
[22:58:55] smathy: Aeyrix, exactly.
[22:59:01] smathy: "How do I list the files in a directory?"
[22:59:04] shoutsid06: has joined #RubyOnRails
[22:59:12] siddart: has joined #RubyOnRails
[22:59:56] smathy: EllisTAA, also, although it seemed like it might have been actual advice, beanHolez's advice was a joke - don't do that.
[23:02:31] Hates_: has joined #RubyOnRails
[23:02:33] darrencauthon: has joined #RubyOnRails
[23:03:15] annlewis: has joined #RubyOnRails
[23:03:26] rakm_: has joined #RubyOnRails
[23:04:21] febuiles: has joined #RubyOnRails
[23:05:11] dnewkerk: has joined #RubyOnRails
[23:07:07] rakm: has joined #RubyOnRails
[23:07:23] jamto11: has joined #RubyOnRails
[23:07:58] Denarii: has joined #RubyOnRails
[23:08:27] quazimodo: has joined #RubyOnRails
[23:09:13] polycaster: has joined #RubyOnRails
[23:09:40] rhizome: i do something like that on one of my machines
[23:09:59] ellisTAA: any idea why i???d be getting a 502 error when i hit my website? i just uploaded to aws but i???m getting a 502 error, don???t see anything in the logs
[23:17:43] smathy: EllisTAA, 502 is from your httpd, you won't see anything in the Rails logs.
[23:17:51] pixelhandler: has joined #RubyOnRails
[23:18:24] Fire-Dragon-DoL: are there any way to "reflect on association" to check if it's going to be ordered?
[23:18:32] ellisTAA: smathy: when deploying a rails app, what else do i need to do besides define the url and port of my db?
[23:18:39] Fire-Dragon-DoL: sorry, reflect on RELATION, I already know you can reflect on association
[23:19:22] IFrank00: has joined #RubyOnRails
[23:19:29] smathy: EllisTAA, are you deploying to heroku?
[23:19:36] ellisTAA: smathy: aws
[23:19:46] smathy: EllisTAA, then, only about a hundred other things.
[23:19:47] Spami: has joined #RubyOnRails
[23:20:11] smathy: EllisTAA, I'm guessing that you're not very experienced at sysadmin of a production *nix server?
[23:20:38] ellisTAA: smathy: nope
[23:20:53] ellisTAA: smathy: hey i???m at aws and the dude helping me doesn???t event know so
[23:21:11] Aeyrix: the... who helping you?
[23:21:22] Aeyrix: AWS doesn't have dedicated support do they?
[23:21:29] ellisTAA: amazon web services loft
[23:22:56] VeryBewitching: Interesting, I didn't know about those lofts.
[23:23:03] Spami: So, I'm trying to use pessimistic locking
[23:23:15] Spami: and for some reason, when I lock a record, I still can update it
[23:23:23] Spami: I open 2 rails console
[23:23:31] smathy: Fire-Dragon-DoL, did you just try?
[23:23:41] ellisTAA: has left #RubyOnRails: ()
[23:23:48] Spami: lock a record with on console, and update it with the other one. Even tho it's already locked for update in the first console
[23:24:01] matthewd: Fire-Dragon-DoL: Nothing public. There's `order_values`, but it's internal API, with all the caveats that carries.
[23:25:03] ijiijijjjijiij: has joined #RubyOnRails
[23:26:26] smathy: EllisTAA, then sorry, I won't tell you. For the same reason that I wouldn't tell someone how to start a car if they didn't know how to drive.
[23:26:43] EminenceHC: has joined #RubyOnRails
[23:26:51] serialaxel: has joined #RubyOnRails
[23:26:53] ellisTAA: has joined #RubyOnRails
[23:27:12] Fire-Dragon-DoL: smathy: yes I tried and I found only the private API matthewd mentioned. Mhhh I need to test if a relation has been ordered, without resorting to check the values...
[23:27:41] smathy: Fire-Dragon-DoL, sorry, I didn't see your original comment about finding out about the order values.
[23:27:45] dmarr: has joined #RubyOnRails
[23:28:21] smathy: Fire-Dragon-DoL, to_sql.match(" ORDER BY ") ?
[23:28:39] Fire-Dragon-DoL: lol yes that was my guess too, I was trying to set a stub on relation, but that looks impossible <.
[23:29:00] shmilan: has joined #RubyOnRails
[23:29:06] northfurr: has joined #RubyOnRails
[23:29:28] matthewd: Fire-Dragon-DoL: You can do it... just have to be aware it could break in the future -- either by writing a test to ensure it works, or just having something reminds you to manually check it if the AR version changes
[23:29:38] dmarr: wondering if i can do something like this with comfortable_mexican_sofa: https://github.com/comfy/comfortable-mexican-sofa/issues/298#issuecomment-147844350
[23:29:40] sevenseacat: has joined #RubyOnRails
[23:29:49] matthewd: .. and don't report a bug if you find some edge case where it doesn't do what you expect :)
[23:29:55] riotjones: has joined #RubyOnRails
[23:29:55] fre: has joined #RubyOnRails
[23:30:55] Fire-Dragon-DoL: matthewd: yes, I'm thinking if using to_sql is better instead
[23:31:06] superlou: has joined #RubyOnRails
[23:31:46] fre: has joined #RubyOnRails
[23:32:12] matthewd: Oh, right, that's public, isn't it?
[23:32:19] bruno-: has joined #RubyOnRails
[23:32:37] matthewd: So yeah, that'll be a more supported solution... though it does carry theoretical risk of the string appearing elsewhere in the query
[23:33:56] Lightsword: has joined #RubyOnRails
[23:34:36] ellisTAA: so my problem was that i wasn???t defining my pw in secrets.yml
[23:38:26] EminenceHC: has joined #RubyOnRails
[23:38:46] jenrzzz: has joined #RubyOnRails
[23:38:55] smathy: The next 502 will be easy to solve then.
[23:43:24] Ropeney: has joined #RubyOnRails
[23:44:23] Guest123456666: has joined #RubyOnRails
[23:46:10] duderonomy: has joined #RubyOnRails
[23:46:27] paolodoors: has joined #RubyOnRails
[23:47:33] ff7f00: has joined #RubyOnRails
[23:47:56] serialaxel: has joined #RubyOnRails
[23:48:05] one_zero: has joined #RubyOnRails
[23:48:05] ff7f00: is there a rough ETA for the release of Rails 5.0?
[23:48:15] ff7f00: I believe the last time I checked it was slated for Fall 2015
[23:48:18] bmurt: has joined #RubyOnRails
[23:49:01] sevenseacat: yep. september 2015 :)
[23:49:19] craysiii: shit, everything im learning is useless!!
[23:49:46] sevenseacat: probably when these https://github.com/rails/rails/issues?q=is%3Aopen+is%3Aissue+milestone%3A5.0.0 get resolved
[23:50:50] ff7f00: sevenseacat: great, thanks for the info
[23:50:56] ff7f00: is there an official timeline posted somewhere?
[23:50:59] EminenceHC: has joined #RubyOnRails
[23:53:14] rakm: has joined #RubyOnRails
[23:54:31] blackhuey: has joined #RubyOnRails
[23:56:19] smathy: craysiii, you're not learning Phoenix yet?
[23:56:40] craysiii: lol, i'm doing bloc.io, kinda rails-centric :P
[23:58:17] umgrosscol: has joined #RubyOnRails
[23:58:59] Thomas-0725: has joined #RubyOnRails
[23:59:22] nym: has joined #RubyOnRails
[23:59:52] baweaver: has joined #RubyOnRails
[23:59:56] momomomomo: has joined #RubyOnRails