« Back to channel list

#RubyOnRails - 30 July 2015

« Back 1 day Forward 1 day »
[00:01:39] niiamon: has joined #RubyOnRails
[00:02:18] quazimod1: has joined #RubyOnRails
[00:02:56] workmad3: has joined #RubyOnRails
[00:03:48] chadwtaylor: has joined #RubyOnRails
[00:05:25] michael_mbp: has joined #RubyOnRails
[00:06:06] ledestin: has joined #RubyOnRails
[00:08:14] Arnie25: has joined #RubyOnRails
[00:08:35] theery: has joined #RubyOnRails
[00:09:46] JeramyRR: has left #RubyOnRails: ("Peace out!")
[00:15:33] artto: has joined #RubyOnRails
[00:15:41] bePolite: has joined #RubyOnRails
[00:18:10] lwu_: has joined #RubyOnRails
[00:20:17] annlewis: has joined #RubyOnRails
[00:20:41] Hates_: has joined #RubyOnRails
[00:20:53] Hates_: has joined #RubyOnRails
[00:25:29] GreatDanton: has joined #RubyOnRails
[00:26:06] lethjakman: has joined #RubyOnRails
[00:26:23] ishahnaz: has joined #RubyOnRails
[00:26:34] nettoweb: has joined #RubyOnRails
[00:27:43] GreatDanton: heya I need a bit of help with my app. I have multiple discussions(white papers) where you can post comments. For each comment i was able to get discussion id but now I cant display comments with the right id to the right discussions. https://gist.github.com/GreatDanton/e774ea77477e61331ac4
[00:29:23] Papierkorb: GreatDanton: broken HTML on line 5
[00:30:11] Papierkorb: GreatDanton: and can you elaborate on "I cant display comments with the right id to the right discussions." ?
[00:30:37] GreatDanton: okay I'll try
[00:30:52] GreatDanton: So in this app you are able to create discussion
[00:30:57] GreatDanton: each discussion got id
[00:31:10] GreatDanton: under each discussion I want to write comments
[00:31:12] nettoweb_: has joined #RubyOnRails
[00:31:17] earthquake: has joined #RubyOnRails
[00:31:20] quazimod1: morning all
[00:31:25] Papierkorb: quazimod1: hi
[00:31:44] DoctorMonocular: has joined #RubyOnRails
[00:31:56] GreatDanton: now I want to put the comments that were written under discussion with id1 to that discussion
[00:32:49] diegoviola: has joined #RubyOnRails
[00:32:51] PhantomSpank: has joined #RubyOnRails
[00:33:16] Papierkorb: So, where's now the issue? You don't know how to find the comments belonging to a discussion?
[00:33:21] juanpaucar: has joined #RubyOnRails
[00:33:33] GreatDanton: I was able to assign id to the comment
[00:33:39] GreatDanton: discussion id
[00:33:52] GreatDanton: in discussion controller there is @comments = Comment.all
[00:33:53] tjbiddle: has joined #RubyOnRails
[00:34:33] GreatDanton: that's the only thing that works so far
[00:34:35] Papierkorb: GreatDanton: Yeah that won't do what you want heh. Can you gist your Comment and Discussion models?
[00:35:01] x-light: has joined #RubyOnRails
[00:36:04] cosmicfires: has joined #RubyOnRails
[00:36:27] cosmicfires: does rails make app that work on smart phones?
[00:36:59] Papierkorb: cosmicfires: If you get the CSS right, sure.
[00:37:03] triangles: has joined #RubyOnRails
[00:37:30] Papierkorb: Will work without fancy CSS too, but probably look like shit.
[00:37:55] theery: has joined #RubyOnRails
[00:37:56] GreatDanton: Papierkorb, okay uploaded
[00:38:18] Papierkorb: GreatDanton: where?
[00:38:24] GreatDanton: https://gist.github.com/GreatDanton/e774ea77477e61331ac4
[00:38:31] GreatDanton: not sure why they are somewhere in the middle
[00:38:51] GreatDanton: discussionmodel.rb, comentmodel.rb
[00:39:01] Papierkorb: GreatDanton: Ah. Those look good.
[00:39:02] cosmicfires: it's a rush job
[00:39:37] Papierkorb: GreatDanton: To grab only the comments belonging to a @discussion, do @discussion.comments
[00:39:50] Papierkorb: GreatDanton: replace your Comment.all with that
[00:40:22] LeoDee: has joined #RubyOnRails
[00:40:24] GreatDanton: I think I tried that and it gave me an error. Brb will try again
[00:41:50] GreatDanton: yeah: NoMethodError in DiscussionsController#index
[00:41:57] GreatDanton: undefined method `comments' for nil:NilClass
[00:42:40] isthisreallife: has joined #RubyOnRails
[00:42:49] sankaber: has joined #RubyOnRails
[00:43:38] nikhgupta: has joined #RubyOnRails
[00:44:22] Papierkorb: GreatDanton: if you want to serve it all through #index 1) remove the @comments line 2) index.html.erb, line 101, make it look like: <%= render 'shared/indexComments', locals: { discussion: discussion } %>
[00:44:49] Papierkorb: GreatDanton: 3)in the referenced partial, replace the first line with this: <% discussion.comments.each do |comment| %>
[00:44:55] Papierkorb: GreatDanton: 4) Finish.
[00:45:06] bonhoeffer: has joined #RubyOnRails
[00:45:18] Moonlight-Angel: has joined #RubyOnRails
[00:46:07] Papierkorb: GreatDanton: Oh, and now I'd like to recommend to move the stuff which renders a discussion into a partial. This partial could get the discussion it renders through a local, just like above.
[00:47:08] hfp: has joined #RubyOnRails
[00:47:42] hfp_work: has joined #RubyOnRails
[00:49:08] cnk: has joined #RubyOnRails
[00:49:38] nya: has joined #RubyOnRails
[00:50:42] annlewis: has joined #RubyOnRails
[00:51:12] GreatDanton: Papierkorb, now it's a name Error
[00:51:20] GreatDanton: undefined local variable or method `discussion'
[00:51:46] Papierkorb: can you gist just the changed files?
[00:52:11] GreatDanton: add to files or new gist?
[00:52:14] nya: has joined #RubyOnRails
[00:52:22] Papierkorb: new gist, easier to see through
[00:53:47] doodlehaus: has joined #RubyOnRails
[00:54:13] GreatDanton: Papierkorb, https://gist.github.com/GreatDanton/514e96d57d97dd6289c3
[00:56:06] lampshades: has joined #RubyOnRails
[00:57:03] Papierkorb: GreatDanton: <%= render 'shared/indexComments', locals: { discussion: discussion } %>
[00:57:08] livecano: has joined #RubyOnRails
[00:57:14] Papierkorb: GreatDanton: <%= render partial: 'shared/indexComments', locals: { discussion: discussion } %>
[00:58:33] GreatDanton: Papierkorb, wow awesome
[00:58:48] Papierkorb: good to know it's a partial only feature
[00:59:06] cornerma1: has joined #RubyOnRails
[00:59:10] werelivinginthef: has joined #RubyOnRails
[00:59:40] Radar: render 'shared/indexComments', discussion: discussion
[00:59:42] Radar: That would work also
[01:00:12] GreatDanton: well I just started with rails, so I don't know all the features
[01:00:21] GreatDanton: what is this discussion: discussion?
[01:00:44] one_zero: has joined #RubyOnRails
[01:01:10] Papierkorb: GreatDanton: if you don't want to mess too much with </HTML> stuff, you can give HAML a shot. I'm a bit biased though, I never really used ERB as a friend of mine told me to "just use HAML" ..
[01:01:37] Papierkorb: Radar: is that documented?
[01:01:42] Radar: Papierkorb: It sure is.
[01:02:16] Aeyrix: I kind of want to make a StackOverflow clone with a few improvements towards making it a user-submitted knowledgebase.
[01:02:32] niiamon: has joined #RubyOnRails
[01:02:40] GreatDanton: oic it's on ruby guides
[01:02:42] Aeyrix: Namely, being able to put questions "on hold" until the user fleshes out a question properly.
[01:02:51] Papierkorb: Aeyrix: So, basically SO with a larger focus on the wiki part?
[01:03:03] Aeyrix: Papierkorb: A larger focus on replacing the comments on questions.
[01:03:18] Aeyrix: Comments on answers are fine - revisions and edits etc.
[01:03:23] Aeyrix: On questions, I don't see why that should exist.
[01:03:23] ivanskie: has joined #RubyOnRails
[01:03:36] Aeyrix: People shouldn't be commenting with "what have you tried?"
[01:03:49] Aeyrix: It should be templocked until the user asks their question in full.
[01:03:52] Papierkorb: To give immediate feedback what the question is lacking to be good?
[01:03:59] Aeyrix: [11:03:48] <Aeyrix> It should be templocked until the user asks their question in full.
[01:04:02] Aeyrix: That's immediate feedback.
[01:04:09] Papierkorb: New people have no clue what that even is
[01:04:26] Papierkorb: And without someone telling them, they won't learn
[01:04:33] Aeyrix: ... That's what the lock is for.
[01:05:04] Papierkorb: well that's what basically the comments on the question are
[01:05:12] Aeyrix: Eh, some.
[01:05:20] Aeyrix: I don't think that there should be any, to be honest.
[01:05:21] Aeyrix: It seems weird.
[01:05:55] Papierkorb: *cough* user CSS to hide it
[01:06:03] Aeyrix: I feel like you're missing the point entirely.
[01:06:06] Aeyrix: And by feel like, I mean you are.
[01:08:37] learner: has joined #RubyOnRails
[01:10:14] fighella: has joined #RubyOnRails
[01:11:31] towski_: has joined #RubyOnRails
[01:12:44] dopie: has joined #RubyOnRails
[01:14:38] leesharma: has joined #RubyOnRails
[01:16:13] drale2k: has joined #RubyOnRails
[01:16:17] artto: has joined #RubyOnRails
[01:16:59] tweeeaks: has joined #RubyOnRails
[01:17:44] mojojoel: has joined #RubyOnRails
[01:20:15] beauby_: has joined #RubyOnRails
[01:20:34] SteenJobs: has joined #RubyOnRails
[01:24:57] dideler: has joined #RubyOnRails
[01:25:01] rickmasta: has joined #RubyOnRails
[01:26:23] boombadaroomba: has joined #RubyOnRails
[01:26:54] cnk: has joined #RubyOnRails
[01:27:40] smathy: Aeyrix, who do you think would lock the Q?
[01:27:52] Aeyrix: same people who currently do all the modly shit
[01:27:58] Aeyrix: althought ime they're sometimes a bit off the mark
[01:28:02] Aeyrix: so probably not the current batch
[01:28:09] chadwtaylor: has joined #RubyOnRails
[01:28:21] smathy: Moderators do lock questions that are off topic now.
[01:28:26] smathy: ...but it takes a while for 5 to submit their lock vote.
[01:29:04] smathy: SO has a lot of users and a lot of moderators, so either you'd have to wait the same amount of time, or reduce the number of people to (probably) 1 to get it anywhere close to being immediate feedback.
[01:29:27] smathy: ...and if you reduced it to 1 then trolls and errors would kill new people's spirits.
[01:30:20] Gnut: has joined #RubyOnRails
[01:31:13] smathy: If your system is going to rely on volunteers (or even trained professionals) being accurate then you're gonna have a bad time.
[01:31:21] Aeyrix: you're putting more thought into this
[01:31:25] Aeyrix: than i did
[01:31:30] smathy: Thank you.
[01:31:32] Aeyrix: mine was a quick idea that i didn't bother fleshing out further
[01:31:36] Aeyrix: that wasn't a compliment
[01:31:38] Aeyrix: it was a statement
[01:32:03] smathy: I didn't take it as a compliment.
[01:32:09] Aeyrix: why on earth would you thank me then
[01:32:16] Aeyrix: either way
[01:32:30] Aeyrix: it was a quick idea spark after seeing the amount of seemingly-random questions locks
[01:32:33] smathy: For being honest about where you were at.
[01:32:47] smathy: ...so this conversation can end easily.
[01:33:04] werelivinginthef: has joined #RubyOnRails
[01:33:16] Aeyrix: i wonder if i can have a whitelist instead of an ignore list
[01:33:21] beauby_: has joined #RubyOnRails
[01:33:55] beauby: ACTION eats popcorn
[01:34:21] smathy: ACTION drinks IPA
[01:34:44] beauby: I meant I was eating popcorn while watching your amazing convo
[01:34:50] boombadaroomba: fucking stuck working after 4 IPAs.... life is hard
[01:35:11] christiandsg: has joined #RubyOnRails
[01:35:13] Aeyrix: beauby: o
[01:35:36] Aeyrix: beauby: any serious conversations i definitely don't have in places like freenode
[01:36:21] VeryBewitching: 85% of all human conversation is quite bland no matter what the medium.
[01:36:36] GeissT: has joined #RubyOnRails
[01:36:37] Aeyrix: speak for yourself :^)
[01:36:58] Creeves: has joined #RubyOnRails
[01:37:10] VeryBewitching: If you could interest me in a conversation, I'd be impressed.
[01:37:53] VeryBewitching: And that's not a knock against you, it's just experience with people talking.
[01:37:57] Aeyrix: You must be some regular /r/iamverysmart material.
[01:38:10] VeryBewitching: Hyper-pragmatic :D
[01:38:43] VeryBewitching: Most people talk to fill up silence, but say very little of consequence.
[01:41:09] beauby: That's so deep man
[01:41:54] bePolite: has joined #RubyOnRails
[01:42:32] Aeyrix: http://www.wired.com/2015/07/hackers-can-disable-sniper-rifleor-change-target/
[01:42:39] Aeyrix: someone has finally installed Gentoo on a gun.
[01:42:47] Creeves: Aeyrix: i binge read that subreddit so often
[01:43:13] Aeyrix: We have reached the tipping point, people. Americans can now have their second amendment rights in the form of GNU/Freedom.
[01:43:52] Aeyrix: Creeves: I don't. It makes me uncomfortable.
[01:44:02] dstarh: has joined #RubyOnRails
[01:44:09] Creeves: i find it hilarious
[01:44:14] Creeves: i knew a good few people like that in university
[01:44:34] user1138: has joined #RubyOnRails
[01:45:03] bonhoeffer: has joined #RubyOnRails
[01:45:51] smathy: boombadaroomba, I'm literally living in the office this week, but I like it so work and IPAs are good here.
[01:46:18] Creeves: you have an office bed?
[01:46:30] zeff: has joined #RubyOnRails
[01:47:10] smathy: No, I am staying in the office this week.
[01:47:49] smathy: ...well, maybe my answer was "yes" - not sure what an "office bed" is.
[01:48:03] Creeves: a bed in or connected to your office
[01:48:10] Veeza: has joined #RubyOnRails
[01:48:20] Creeves: a few of my friends parents with ritzy city jobs have office beds
[01:50:46] creature: has joined #RubyOnRails
[01:50:50] leesharma: has joined #RubyOnRails
[01:51:25] boombadaroomba: smathy, well, im going to grab a sculpin and drink it for you.
[01:52:02] Aeyrix: Creeves: fuq dat
[01:52:04] Aeyrix: i go the hell home
[01:52:06] Aeyrix: and sleep in my own bed
[01:52:18] skroon: has joined #RubyOnRails
[01:52:29] smathy: Yeah, so one of the guys brought in an air bed and I sleep on that in the "boardroom"
[01:52:42] smathy: boombadaroomba, I am drinking Sculpin right now.
[01:53:03] creature: Hello. I've recently upgraded a Rails 3 app to rails 4, and now any HTTP HEAD requests are resulting in an AbstractController::ActionNotFound. Does anyone have any idea why that would be?
[01:53:27] smathy: creature, something that you didn't do properly in the upgrade process.
[01:54:05] creature: smathy: No doubt! I was hoping for something that could narrow it down a little more. :)
[01:54:08] boombadaroomba: smathy, cheers! to san diego beer!
[01:54:39] smathy: boombadaroomba, yeah, I lived there for 6 years before moving to Wyoming two months ago.
[01:55:33] smathy: creature, create two fresh apps with the <from> and <to> versions of Rails, then do a recursive diff to see what to change.
[01:56:00] annlewis: has joined #RubyOnRails
[01:57:55] michael_mbp: has joined #RubyOnRails
[01:58:34] Veeza: has left #RubyOnRails: ()
[01:58:52] m0r0n: has joined #RubyOnRails
[02:00:16] ivanskie: has joined #RubyOnRails
[02:00:37] m0r0n: If I wanted a website to have 3 static pages, no need for DBs. Do I need to use 3 controllers? ex foo.com (application controller), foo.com/about (about controller), foo.com/projects (projects controller) ?
[02:01:30] beauby: m0r0n: you can host your pages directly in public/ if they are plain html
[02:01:32] VeryBewitching: m0r0n: You can use one controller with custom routes
[02:01:51] beauby: or you can just have one StaticPagesController that will handle custom routes
[02:02:02] m0r0n: beauby, I know that's the best way considering my application, but I want to play around in RoR
[02:02:14] Aeyrix: I honestly wouldn't use Rails for three static pages.
[02:02:15] VeryBewitching: get '/about', to: 'pages#about'
[02:03:07] m0r0n: Aeyrix, Eventually I plan on using it to collect data and send data to an arduino, but for now static
[02:03:31] niiamon: has joined #RubyOnRails
[02:03:41] VeryBewitching: m0r0n: Read http://guides.rubyonrails.org/routing.html it'll answer your questions
[02:03:42] Aeyrix: one controller though
[02:03:56] VeryBewitching: And as Aeyrix said, you only need one controller.
[02:04:59] zorak8: has joined #RubyOnRails
[02:05:08] m0r0n: VeryBewitching, That sounds like a better plan than three controllers. I'll take a look, thanks
[02:07:39] bronson: has joined #RubyOnRails
[02:08:13] Glyphik: has joined #RubyOnRails
[02:08:28] thatkid_: has joined #RubyOnRails
[02:08:34] rickmasta: has joined #RubyOnRails
[02:08:49] tejasmanohar_: has joined #RubyOnRails
[02:09:37] SteenJobs: has joined #RubyOnRails
[02:09:55] cnk: has joined #RubyOnRails
[02:10:06] GriffinHeart: has joined #RubyOnRails
[02:10:28] bePolite_: has joined #RubyOnRails
[02:10:38] nettoweb: has joined #RubyOnRails
[02:13:57] theery: has joined #RubyOnRails
[02:15:11] nahtnam: Im trying to follow this tutorial: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview, but the `first_or_create` doesnt seem to be working: https://gist.github.com/nahtnam/747812e89a1e0bfccda4#file-omniauth_callbacks_controller-rb-L9 <- Line 9 in my code ALWAYS runs, and the user is never created
[02:17:04] artto: has joined #RubyOnRails
[02:17:15] PhantomS_: has joined #RubyOnRails
[02:18:46] nahtnam: Can provide more code if you need
[02:19:04] Glyphik: has joined #RubyOnRails
[02:19:46] yfeldblum: has joined #RubyOnRails
[02:21:37] nettoweb_: has joined #RubyOnRails
[02:22:15] towski_: has joined #RubyOnRails
[02:23:38] nahtnam: This is the logs in rails s https://gist.github.com/nahtnam/34052157a848537fdc86
[02:25:07] bruno-: has joined #RubyOnRails
[02:25:48] riscky: has joined #RubyOnRails
[02:25:52] workmad3: has joined #RubyOnRails
[02:28:57] sevenseacat: has joined #RubyOnRails
[02:36:22] Aeyrix: https://gist.github.com/nahtnam/34052157a848537fdc86#file-gistfile1-txt-L10
[02:36:23] Aeyrix: User exists.
[02:36:36] nahtnam: Aeyrix: When I check my db it doesnt?
[02:36:47] Aeyrix: Your DB isn't lying.
[02:36:57] sevenseacat: whats the problem?
[02:37:02] Aeyrix: You've enforced a unique on your email column.
[02:37:02] erich: has joined #RubyOnRails
[02:37:17] nahtnam: Aeyrix: (0 rows) is what pg says
[02:37:36] sevenseacat: didn't check validation errors?
[02:37:40] Aeyrix: Your DB isn't going to make shit up tbh
[02:37:43] sevenseacat: ACTION gets popcorn
[02:37:49] Aeyrix: sevenseacat: https://gist.github.com/nahtnam/34052157a848537fdc86#file-gistfile1-txt-L10
[02:37:52] Aeyrix: https://gist.github.com/nahtnam/747812e89a1e0bfccda4#file-omniauth_callbacks_controller-rb-L9
[02:38:10] nahtnam: http://i.imgur.com/GqjutXD.png
[02:38:20] sevenseacat: yes, user is not persisted, hence redirect
[02:38:25] sevenseacat: check validation errors on said user? :)
[02:38:54] nahtnam: @sevenseacat Yeah, but at that point the user is created right?
[02:38:55] sevenseacat: also, lol at using first_or_create and then aborting if the user is persisted
[02:39:03] sevenseacat: not if theyre invalid.
[02:39:05] Aeyrix: sevenseacat: I was gonna get to that. :^)
[02:39:08] Aeyrix: nahtnam: What OS?
[02:39:14] nahtnam: Ubuntu 14.04
[02:39:25] Aeyrix: Run `rails console`
[02:39:27] boombadaroomba: smathy, hope you like wyoming! Cheers brother!
[02:39:28] Aeyrix: `User.all`
[02:39:28] nahtnam: sevenseacat: Any way I can find out what the validation error is?
[02:39:39] Aeyrix: sevenseacat: Isn't the error the email non-unique?
[02:39:41] Aeyrix: Line 10 in that log.
[02:39:43] sevenseacat: nahtnam: check @user.errors ?
[02:39:47] Aeyrix: Right before the rollback.
[02:39:53] livecano: has joined #RubyOnRails
[02:39:54] sevenseacat: thats just a validation
[02:40:01] Aeyrix: > rollbacks are fucking shit
[02:40:24] nahtnam: https://gist.github.com/nahtnam/57552ce26a0a511dad87
[02:40:29] nahtnam: Thats the error I get when i run rails consolke
[02:41:07] nahtnam: It went away
[02:41:15] Aeyrix: nahtnam: Where your redirect is
[02:41:21] Aeyrix: redirect_to root_url
[02:41:34] Aeyrix: <sevenseacat> nahtnam: check @user.errors ?
[02:41:40] nahtnam: https://gist.github.com/nahtnam/cd0513d2149a0b4ca894
[02:41:43] Aeyrix: Put @user.errors above / in place of / using some debugging shit idk
[02:41:55] Aeyrix: [ shrugging intensifies ]
[02:42:03] Aeyrix: ACTION goes back to #installgentoo
[02:43:20] nahtnam: abort @user.errors.to_s = #<ActiveModel::Errors:0x0000000274dbf8>
[02:43:24] nahtnam: Should I inspect it?
[02:43:45] nahtnam: Password is too short
[02:43:52] sevenseacat: why would you use to_s
[02:44:15] bulldawgden: has joined #RubyOnRails
[02:44:53] Aeyrix: sevenseacat: You got there in the end, it's okay.
[02:46:23] allcentury: has joined #RubyOnRails
[02:46:36] nahtnam: sevenseacat: because it was giving me an error saying that error no explicit conversion of ___ to string
[02:46:51] sevenseacat: because you were aborting with it, whatever that does
[02:47:07] Aeyrix: Returns a 500 to the httpd and stops executing.
[02:47:21] nahtnam: ^ And prints/returns whatever you put
[02:47:24] nahtnam: in the abort
[02:47:36] sevenseacat: why would you ever use that in a web app
[02:47:43] Aeyrix: Debugging mostly.
[02:47:51] sevenseacat: thats what we have debuggers for
[02:47:51] Aeyrix: Ghetto debugging.
[02:47:55] Aeyrix: Yeah but tbh
[02:47:59] Aeyrix: sometimes that's faster.
[02:48:04] nahtnam: ^ Thats the first thing that came up when I googled it
[02:48:09] nahtnam: im used to php's die
[02:48:12] Aeyrix: For very simple things, I can understand using it.
[02:48:14] sevenseacat: faster than typing "console" in your code to open a console in your browser?
[02:48:21] sevenseacat: so you can actually do *real* debugging?
[02:48:37] nahtnam: well that means I have to end my rails server
[02:48:37] Aeyrix: If I just want it to quit out with the contents of a vairable
[02:48:38] sevenseacat: now you're just telling porkies
[02:48:40] Aeyrix: yes, it is faster.
[02:48:47] Aeyrix: > vairiable
[02:48:49] Aeyrix: variable *
[02:48:55] sevenseacat: except then you run into shit like 'oh no its not a string'
[02:49:02] tubbo: what's a porky?
[02:49:07] Aeyrix: Yes but I'm not a casual so I don't run into those situations.
[02:49:10] Aeyrix: tubbo: lie
[02:49:21] nahtnam: sevenseacat: Then .to_s
[02:49:23] sevenseacat: rhyming slang - pork pie = lie
[02:49:32] Aeyrix: wew cockney
[02:49:33] sevenseacat: nahtnam: except you lost the actual error messages when you did that
[02:49:42] nahtnam: no? I got the error
[02:49:49] nahtnam: The password wasnt long enough
[02:49:54] sevenseacat: "<ActiveModel::Errors:0x0000000274dbf8>"
[02:50:00] sevenseacat: yep, the errors are there alright
[02:50:09] SteenJobs: has joined #RubyOnRails
[02:50:14] sevenseacat: oh what do I care, I'll just ignore this shit
[02:50:14] Aeyrix: I feel like this is an unnecessary meta discussion tbh.
[02:50:25] sevenseacat: the next 50000 times nahtnam comes here with similar questions
[02:50:37] Aeyrix: console master race, but abort is good for q&d.
[02:51:12] leesharma: has joined #RubyOnRails
[02:51:20] Aeyrix: Oh man Authy has an API, and it's free.
[02:51:23] Aeyrix: I'm so happy about this.
[02:51:27] nahtnam: Its been a month since the last time I was here
[02:51:27] Aeyrix: TOTP in all my apps comin up.
[02:51:40] Aeyrix: nahtnam: That's like six seconds in sevenseacat time.
[02:51:45] Aeyrix: She remembers all.
[02:52:31] nahtnam: Im having much more trouble with ember than I am with rails
[02:52:41] Aeyrix: That's because you're using ember.
[02:53:12] nahtnam: Well I <3 it so far
[02:53:16] tubbo: ember rules
[02:53:39] Aeyrix: > using a javascript framework
[02:53:46] nahtnam: tubbo's got it right
[02:53:47] Aeyrix: God I bet you people use Docker too.
[02:53:49] Aeyrix: You're all filthy.
[02:53:59] nahtnam: Docker for life
[02:54:02] tubbo: haven't had the opportunity yet
[02:54:04] Aeyrix: you say that now
[02:54:06] Aeyrix: but it will be for life
[02:54:13] Aeyrix: because they lock you in to bullshit walled garden semi-working crap
[02:54:17] nahtnam: rails + ember + docker = discourse
[02:54:31] nahtnam: My site is going to be public
[02:54:36] tubbo: eh, docker is whatever. containers are really what's important
[02:54:38] nahtnam: so I need to have a public api
[02:54:55] nahtnam: Best way to test an api is to build a js app around it
[02:54:59] nahtnam: At least IMO
[02:55:03] Aeyrix: > mfw this
[02:55:11] sevenseacat: Aeyrix: you may share my popcorn.
[02:55:13] Aeyrix: I have an image for this.
[02:55:18] Aeyrix: https://i.imgur.com/Rw7U4Xi.jpg
[02:55:34] nahtnam: Im sorry but I enjoy ember
[02:55:36] nahtnam: and docker
[02:55:41] Aeyrix: Actually this: https://i.imgur.com/TniTFLl.jpg
[02:56:07] nahtnam: and ubuntu
[02:56:11] nahtnam: and bitcoin
[02:56:19] nahtnam: The list goes on
[02:56:20] sevenseacat: good for you :)
[02:56:28] theery: has joined #RubyOnRails
[02:56:44] annlewis: has joined #RubyOnRails
[02:56:49] Aeyrix: You must work for a startup.
[02:56:56] Aeyrix: Are you paid in equity or real money?
[02:57:10] nahtnam: Aeyrix: Yes I work at a startup and im an intern
[02:57:21] nahtnam: and I get paid in $$$
[02:57:28] nahtnam: which i convert to btc
[02:57:31] tubbo: dolla dolla billz
[02:57:55] Aeyrix: https://i.imgur.com/khKi5Ct.jpg
[02:58:13] tubbo: Aeyrix: which javascript framework are you trying this week?
[02:58:19] Aeyrix: tubbo: None.
[02:58:23] tubbo: just vanilla jS?
[02:58:27] Aeyrix: I refuse to use any of them because I write web apps that actually fucking work.
[02:58:57] tubbo: hey man, my website works and it was written in ember
[02:59:49] Aeyrix: http://www.mtv.com/news/photos/j/ja_rule_set_visit_070712/ja_rule_04.jpg
[02:59:53] quazimod1: has joined #RubyOnRails
[03:00:03] tubbo: lol you and the rapper pics
[03:00:24] Aeyrix: I have dozens.
[03:00:40] Aeyrix: Just like you have dozens of bugs! :^)
[03:01:29] tubbo: so do you just not use js at all?
[03:01:39] tubbo: or do you use the normal stuff...jquery and all that?
[03:01:44] Aeyrix: I use it where it's sensible.
[03:01:47] Aeyrix: Most animation I do with CSS3.
[03:02:09] fighella: has joined #RubyOnRails
[03:02:17] christiandsg: has joined #RubyOnRails
[03:02:57] tubbo: oh yeah definitely, ember doesn't help with that.
[03:03:18] tubbo: everything ember provides you (or any one of these frameworks really) you can accomplish with a collection of small libraries
[03:03:23] h7br1x: has joined #RubyOnRails
[03:03:25] tubbo: just like rails, actually
[03:03:53] nettoweb: has joined #RubyOnRails
[03:03:55] niiamon: has joined #RubyOnRails
[03:04:06] niiamon_: has joined #RubyOnRails
[03:04:25] jobewan: has joined #RubyOnRails
[03:04:45] iamse7en: has joined #RubyOnRails
[03:05:58] VeryBewitching: I try to only use JS to interact with the DOM to update 1 to 2 elements per interaction, if at all possible.
[03:06:38] bonhoeffer: has joined #RubyOnRails
[03:06:41] frzn: has joined #RubyOnRails
[03:06:41] frzn: has joined #RubyOnRails
[03:06:52] Aeyrix: nahtnam: https://twitter.com/WilliamTurton/status/626588396161495040
[03:07:06] tubbo: admittedly i've only used ember on my own projects, for fun. as far as actual work is concerned, definitely using rails and rendering on the server.
[03:07:08] tubbo: more control that way
[03:07:29] tubbo: at least my code is running on *one* interpreter, not dozens
[03:07:37] nahtnam: Aeyrix: Good to know there are 2 people out there who dont like change/future
[03:07:59] Aeyrix: nahtnam: lmao
[03:08:27] tubbo: my blog is written in ember: http://github.com/tubbo/blog
[03:08:37] tubbo: you know, for funsies
[03:08:49] Aeyrix: Mine's in Sinatra. I write a blog post in markdown and save it, and that's it.
[03:08:51] Aeyrix: No DB required.
[03:09:25] tubbo: yep, i'm using ember-data but i actually compile the articles to JSON when the app is built
[03:09:34] sevenseacat: my blog is in jekyll, because I'm lazy.
[03:09:35] tubbo: and i upload the JSON files along with the app JS and index.html
[03:09:48] tubbo: it's all yaml front matter anyway
[03:10:22] baweaver: has joined #RubyOnRails
[03:10:29] tubbo: sevenseacat: yeah you should really write more you bum ;)
[03:10:40] Aeyrix: Probably too busy doing actual work.
[03:10:52] Aeyrix: No time to blog about the future.
[03:10:56] nahtnam: tubbo: I like your style... https://github.com/counterstrikeio/counterstrikeio.github.com/blob/develop/public/posts.json
[03:10:57] Aeyrix: Is there a language based on Bitcoin yet?
[03:10:58] nahtnam: Same here :P
[03:11:00] tubbo: dude the future...is now....
[03:11:09] tubbo: thesingularity.com.fuck
[03:11:50] nahtnam: Result: https://counterstrike.io/#/blog
[03:11:50] nickenchuggets: has joined #RubyOnRails
[03:11:57] tubbo: nahtnam: are you writing posts.json out yourself?
[03:12:00] braincrash: has joined #RubyOnRails
[03:12:01] Aeyrix: You have a octothorpe
[03:12:06] Aeyrix: in your index uri
[03:12:10] Aeyrix: i don't even know what to say to you
[03:12:13] Aeyrix: this makes me so upset
[03:12:14] nahtnam: octothrope?
[03:12:42] nahtnam: tubbo: Yep. I used something like dillinger to write it and then use atom to replace all line breaks with \n
[03:13:09] Aeyrix: Efficiency at its finest.
[03:13:25] tubbo: this here is the source of my compiler code https://github.com/tubbo/blog/tree/master/src
[03:13:44] tubbo: Template is a little hairy but other than that i think it's OK
[03:13:46] VeryBewitching: nahtnam: You a CS player?
[03:13:54] nahtnam: VeryBewitching: Yes
[03:14:12] Aeyrix: Except I don't play GO.
[03:14:17] VeryBewitching: <-- TMP specialist in Source
[03:14:18] kies^: has joined #RubyOnRails
[03:14:20] Aeyrix: CS:GrOss.
[03:14:27] tubbo: your blog definitely looks better than my blog nahtnam
[03:14:37] Aeyrix: Reporting in: http://elliot.pro/
[03:15:03] nahtnam: tubbo: Meh. I made it in a a couple of hours just to motivate myself to work on the real project :P
[03:15:11] nahtnam: I personally prefer your site over mine
[03:15:26] Aeyrix: Mine's in Sinatra so it's musical.
[03:15:38] nahtnam: Only thing that annoys me about it tubbo is the code blocks have a brown background
[03:15:42] nahtnam: gray is so much better
[03:16:13] nahtnam: Aeyrix: But then you have to host it
[03:16:28] Aeyrix: nahtnam: My side project is a server hosting venture.
[03:16:35] Aeyrix: So, you know
[03:16:36] tubbo: nahtnam: you're using materialize?
[03:16:36] nahtnam: Aeyrix: Ahhhh nice
[03:16:39] nahtnam: tubbo: Yep
[03:16:43] tubbo: how is that?
[03:16:52] nahtnam: Like bootstrap but looks a lot better
[03:17:03] nahtnam: People think you spent hours on your site
[03:17:10] nahtnam: but you only spent like 5 minutes
[03:17:17] nahtnam: Aeyrix: Isnt it expensive?
[03:17:22] nahtnam: The hosting industry
[03:17:26] tubbo: yeah, and it's in sass
[03:17:32] Aeyrix: nahtnam: Depends if you're offering quality or garbage.
[03:17:38] Aeyrix: I built all of the tooling for clients from the ground up.
[03:17:45] Aeyrix: So I don't pay any licensing fees for it, and it's not shit.
[03:17:59] artto: has joined #RubyOnRails
[03:18:02] nahtnam: tubbo: I dont use the sass part of it. Its fine without modifications :P
[03:18:09] nahtnam: Aeyrix: Nice. Like digital ocean?
[03:18:22] Aeyrix: I guess you could say that.
[03:18:27] Aeyrix: Except, you know, actually profitable.
[03:18:30] Aeyrix: (They aren't)
[03:18:50] tubbo: the two main reasons why i stopped using ruby for my blog was because i wanted to host it on S3, and i wanted to learn ember :)
[03:19:11] VeryBewitching: Aeyrix: Horde much?
[03:19:15] nahtnam: Exactly but replace s3 with github
[03:19:16] Aeyrix: Come again?
[03:19:29] sevenseacat: yeah github hosts my blog
[03:19:58] tubbo: github can't own my content!! *shakes fist*
[03:20:18] VeryBewitching: Google mirrors the internet, just sayin'
[03:20:59] nahtnam: VeryBewitching: What is a TMP specialist?
[03:21:16] VeryBewitching: nahtnam: CT weapon, TMP, low-end SMG
[03:21:18] Arnie25: has joined #RubyOnRails
[03:21:24] nahtnam: Thats source?
[03:21:32] VeryBewitching: I used to kill half a team each map
[03:21:35] Aeyrix: more like
[03:21:48] Aeyrix: > TF2 master FPS
[03:21:49] tubbo: gogogogogogogogogogogooggoogogogogogogog
[03:21:49] nahtnam: Aeyrix: Why do you hate it so much? Its not GrOss
[03:21:51] VeryBewitching: GO is not really CS
[03:21:58] nahtnam: Ewww TF2. Yuck
[03:21:59] Aeyrix: tbh i quit cs
[03:22:00] Aeyrix: i play tf2 now
[03:22:03] Aeyrix: due to being easier
[03:22:06] Aeyrix: and way, way more fun
[03:22:08] sevenseacat: TF2 is awesome.
[03:22:09] VeryBewitching: Borderlands 2 is my current enjoyment.
[03:22:09] Aeyrix: > rocket jumping
[03:22:15] nahtnam: Easier, sure, fun, no.
[03:22:16] nandx64: has joined #RubyOnRails
[03:22:21] Aeyrix: > tf2 isn't fun
[03:22:29] Aeyrix: > i convert my dollars to a volatile imaginary currency
[03:22:37] sevenseacat: it can be not fun on shitty maps with shitty teams
[03:22:40] Aeyrix: absolutely
[03:22:42] sevenseacat: but most of the time its awesome.
[03:22:44] Aeyrix: i play with a group of mates though
[03:22:47] VeryBewitching: TF2 is quite fun. L4D2 is also awesome. :D
[03:22:59] Aeyrix: we're all ex-competitive so we have p good game sense
[03:23:01] nahtnam: Im a competitive kind of guy
[03:23:07] nahtnam: Therefore, csgo
[03:23:17] Aeyrix: sevenseacat: bad teams that just don't try make me pretty upset
[03:23:22] VeryBewitching: I was on a CAL team about 10 years ago for Source.
[03:23:26] Aeyrix: like, why play a team-based game if all you want to do is fuck about? :(
[03:23:32] neanderslob_: has joined #RubyOnRails
[03:23:59] Aeyrix: I have a lot of hours on TF2: http://steamcommunity.com/id/aeyrix
[03:24:05] niiamon: has joined #RubyOnRails
[03:24:07] Aeyrix: Double that, for my old account which I sold.
[03:24:24] Aeyrix: > Groups: OpenGriefing
[03:24:40] Nuck: I'm trying to switch one of our messier (and *larger*) tables to STI and having trouble doing the migrations safely/speedily. Any tips on speedily adding a column to 21 million rows?
[03:24:49] Nuck: Postgres, mind you
[03:24:51] tubbo: lol TF2 is definitely easier
[03:24:51] tubbo: counter-strike is where the real men play tho...
[03:24:51] tubbo: so they can die in a blaze of GLORY
[03:24:51] tubbo: i love the demoman in team fortress
[03:24:54] nahtnam: Aeyrix: About half that for csgo on my site
[03:24:54] nahtnam: http://steamcommunity.com/id/nahtnam
[03:25:01] nahtnam: tubbo: Me too
[03:25:04] Aeyrix: get good get playing
[03:25:08] iamse7en: i have a t.decimal attribute, want to convert a string to decimal (not float). how do I do that?
[03:25:10] nahtnam: Demo man is fav
[03:25:12] nahtnam: when I do play
[03:25:19] Aeyrix: soldier current flavour
[03:25:23] nahtnam: Backstabbing people...
[03:25:29] Nuck: Even better: is it possible via hackery to make STI work with an enum column backing it
[03:25:42] Aeyrix: nuck: you're not in for a good time tbh
[03:25:45] Aeyrix: sevenseacat: engineers are either
[03:25:48] Nuck: Because legit 21 million rows
[03:25:50] Aeyrix: or infuriating
[03:25:53] Aeyrix: nuck: yeo
[03:26:05] Nuck: Aeyrix: I'm aware, but it's kind of necessary to maintain sanity
[03:26:07] Aeyrix: sevenseacat: engineers on the other team that are good with positioning are the worst thing
[03:26:12] rickmasta: has joined #RubyOnRails
[03:26:16] Nuck: We have a 500 LOC class for the table right now
[03:26:31] Aeyrix: uhhhhhhhh
[03:26:37] Nuck: Dealing with 5 different types that behave slightly differently but share basically all fields
[03:26:48] Nuck: Yeah, I know. That's why STI
[03:27:03] arooni-mobile: has joined #RubyOnRails
[03:27:25] nahtnam: Aeyrix: Has tf2 changed in the past year?
[03:27:32] nahtnam: I havent played in a while
[03:27:32] Nuck: Doing a dry run on my dev server right now and it's taking forever
[03:27:34] nahtnam: I might take it up
[03:27:35] Aeyrix: Balance changes a-plenty.
[03:27:41] Aeyrix: It turned into TF:GO tbh
[03:27:46] Aeyrix: but I love it, because there's still the casual aspect.
[03:27:50] Aeyrix: Weapon skins, cases, etc.
[03:27:51] sevenseacat: I haven't played TF2 in a long time sadly
[03:27:59] Aeyrix: I have a mad bespoke loadout so the skins don't affect me.
[03:28:00] VeryBewitching: http://steamcommunity.com/id/etriaph/games/?tab=all <-- hours on record don't look accurate, anyone know how Valve determines this?
[03:28:00] Aeyrix: sevenseacat: why
[03:28:10] dented42: has joined #RubyOnRails
[03:28:10] Aeyrix: ACTION VeryBewitching: Time not in main menu
[03:28:15] Aeyrix: VeryBewitching: Time not in main menu
[03:28:19] Nuck: Thinking I might have to do this as a longer-term migration ??? first make writes go to both and start slowly adding the value into old rows in background
[03:28:23] Nuck: ACTION sobs
[03:28:28] Aeyrix: nuck: imo
[03:28:30] Aeyrix: new table with columns
[03:28:32] Aeyrix: psql dump
[03:28:33] Nuck: I don't assume SSDs will save me will they
[03:28:34] Aeyrix: psql restore to new table
[03:28:37] Aeyrix: yeah they will
[03:28:42] erich: has joined #RubyOnRails
[03:28:43] Nuck: Our servers have SSDs
[03:28:45] Nuck: All of 'em
[03:28:48] Aeyrix: trying to migrate a column
[03:28:50] Aeyrix: like you're trying to do
[03:28:52] Aeyrix: will probably kill you
[03:29:05] nahtnam: VeryBewitching: LOLOL. 400 hours of csgo. Next most played thing is insurgency for 1 hr
[03:29:30] Nuck: Aeyrix: Yeah but adding a column won't be slower than taking a dump because Postgres can do an empty column addition near-instantly
[03:29:37] Aeyrix: sevenseacat: just jump into a valve serv
[03:29:42] Aeyrix: i tried to start a community server with nocrits
[03:29:51] Aeyrix: nuck: you want it empty?
[03:30:03] Nuck: At first, then I can do some `update_all` calls to fill it in
[03:30:03] VeryBewitching: nahtnam: I should have at least 2000 hours of CS:Source
[03:30:05] Aeyrix: nuck: the reason for my suggestion was so that if something fucks up
[03:30:11] Aeyrix: you're still most of the way there
[03:30:16] nahtnam: VeryBewitching: HS. Rank?
[03:30:23] Aeyrix: and you have a dedicated backup of that table as well as a full db backup
[03:30:28] Aeyrix: so you don't even need to restore a backup
[03:30:30] Aeyrix: just, retry
[03:30:38] Aeyrix: because it's a disposable table until the data's moved
[03:30:42] Nuck: I'm thinking the two-step where we start making writes to the STI column simultaneously with the current enum column
[03:30:50] Aeyrix: either works i guess
[03:30:52] Nuck: And then start adding the STI column in background with narrow locks
[03:30:52] Aeyrix: there's no faster way
[03:30:59] charliesome: has joined #RubyOnRails
[03:31:02] Nuck: It's not fast, but it's safe and it's zero-downtime
[03:31:11] Nuck: I can handle an hour of downtime, it's one element of our site
[03:31:14] Aeyrix: sorry, no faster sensible way *
[03:31:20] VeryBewitching: nahtnam: I'm not sure what that question was. :D
[03:31:25] Nuck: But at 21 million rows I can't predict the timeframe
[03:31:26] nandx64: has joined #RubyOnRails
[03:31:28] nahtnam: VeryBewitching: What rank are you in csgo?
[03:31:36] nahtnam: 21million bitcoins
[03:31:41] VeryBewitching: nahtnam: Oh, I bought it and didn't really like it.
[03:31:51] nahtnam: VeryBewitching: Oh. kk.
[03:32:00] VeryBewitching: nahtnam: The way the guns fired is really akward imo
[03:32:09] nahtnam: When did you last play/
[03:32:19] VeryBewitching: More than a year probably.
[03:32:38] nahtnam: Actually no
[03:32:41] nahtnam: Wait for source 2
[03:32:46] pwnd_nsfw: Source 2 should be nice
[03:33:02] pwnd_nsfw: guns in go just take time to get used to
[03:33:13] Aeyrix: tf2 source 2
[03:33:20] VeryBewitching: I'm happy with how well Valve games play on Linux.
[03:33:43] Aeyrix: Shame it's been canned for
[03:33:50] nahtnam: VeryBewitching: Yes. Thats the one reason I got into csgo
[03:34:35] VeryBewitching: You guys can add me on Steam, if I happen to be playing, feel free to join.
[03:34:55] VeryBewitching: 'etriaph' on steam.
[03:35:01] karmapolice: anyone tried private pub?
[03:35:05] Aeyrix: probably too much latency
[03:35:09] Aeyrix: i'm in aus
[03:35:13] nahtnam: pub or pug?
[03:35:26] nahtnam: I just tried launching csgo
[03:35:31] nahtnam: and its asking me to reinstall it
[03:35:48] VeryBewitching: On that note, more Don't Starve.
[03:36:50] skkeeper: has joined #RubyOnRails
[03:36:51] Stuffness: has joined #RubyOnRails
[03:37:45] charliesome: has joined #RubyOnRails
[03:38:57] pwnd_nsfw: fc_order.instance_variable_set("@#{_k}", _v) if fc_order.respond_to?(_k)
[03:39:00] pwnd_nsfw: decides to break and idk why
[03:39:13] pwnd_nsfw: puts "#{_k} -> #{_v}" if fc_order.respond_to?(_k) outputs everything fine without issues however.
[03:39:21] pwnd_nsfw: NoMethodError (undefined method `key?' for nil:NilClass):
[03:40:17] Radar: pwnd_nsfw: no stacktrace?
[03:40:34] pwnd_nsfw: That's all it outputs.
[03:40:51] pwnd_nsfw: Ok, there's a stack trace. referrrs to that line.
[03:41:28] erich: has joined #RubyOnRails
[03:42:46] pwnd_nsfw: The class is hardly null...
[03:42:50] tjbiddle: Anyone have tips on how to deploy environment variables to a machine? I have my rails app starting through an upstart service.
[03:43:29] nandx64: has joined #RubyOnRails
[03:43:34] michael_mbp: has joined #RubyOnRails
[03:44:22] Radar: pwnd_nsfw: steps to reproduce plz
[03:44:36] Aeyrix: !everyrule
[03:44:52] Radar: preeeety much
[03:45:00] Aeyrix: Nobody reads 'em
[03:45:12] Aeyrix: tbh maybe the bot should notice new people
[03:45:33] quazimod1: I have a situation that I've not had before
[03:45:40] pwnd_nsfw: It's a bit proprietary... I'm trying to parse data from an xml feed.
[03:45:58] Aeyrix: pwnd_nsfw: So you can't share the code?
[03:46:00] quazimod1: I have a set of data that is in db/seeds.rb and I basically need that exact seed data for almost all of my tests
[03:46:07] nahtnam: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview If you scroll down to class Users::OmniauthCallbacksController I am using the code (if @user.persisted?). I noticed that the if statement was always true no matter what
[03:46:12] pwnd_nsfw: "steps to reproduce" is beyond code, but sure I could
[03:46:28] Aeyrix: pwnd_nsfw: Code is the first step to reproduce.
[03:46:34] x-light: has joined #RubyOnRails
[03:46:38] Aeyrix: Can't reproduce the act of drinking without water.
[03:46:50] pwnd_nsfw: orange juice though
[03:48:18] pwnd_nsfw: https://gist.github.com/SirUncleCid/90bfac26504205ff4d88
[03:48:30] niiamon: has joined #RubyOnRails
[03:48:33] pwnd_nsfw: At least I used gist and not pastebin hue
[03:49:53] nandx64: has joined #RubyOnRails
[03:53:13] erichu: has joined #RubyOnRails
[03:53:23] dyulax93: has joined #RubyOnRails
[03:53:26] nahtnam: Ummm when I do if `first_or_create` and do @user.persisted? It always return true
[03:53:34] nahtnam: Even if it was just created
[03:54:58] pwnd_nsfw: create persists the data though, amirite
[03:55:07] sysx1000: has joined #RubyOnRails
[03:55:13] nahtnam: http://stackoverflow.com/questions/11485132/how-to-determine-if-an-object-was-first-or-created
[03:56:35] pwnd_nsfw: found your answer then?
[03:57:32] annlewis: has joined #RubyOnRails
[03:57:32] nahtnam: But it doenst work
[03:57:55] nofxx: has joined #RubyOnRails
[03:58:21] pwnd_nsfw: what does new_record? produce?
[03:59:09] sysx1000: Hello. I have newbie question. I have some @instance_variables in my controller class instance. Will these variables being included into template context, if I call for example 'show' method of controller? If so, if there any way to filter them away?
[03:59:41] willywos: has joined #RubyOnRails
[04:00:02] Scripore: has joined #RubyOnRails
[04:02:39] nickenchuggets: has joined #RubyOnRails
[04:02:43] theery: has joined #RubyOnRails
[04:03:04] SteenJobs: has joined #RubyOnRails
[04:03:55] nahtnam: ^ I think so, and just remove the @ if you dont want to (not sure)
[04:04:18] niiamon: has joined #RubyOnRails
[04:04:56] julienk: has joined #RubyOnRails
[04:06:47] konsolebox: has joined #RubyOnRails
[04:08:23] ivanskie: has joined #RubyOnRails
[04:08:29] ellisTAA: has joined #RubyOnRails
[04:08:43] ellisTAA: anyone know why my js file isn???t working? https://github.com/ellismarte/wwwhich-color/blob/master/app/views/themes/index.html.erb#L8
[04:09:52] pwnd_nsfw: EllisTAA, not using the assets pipline
[04:10:04] rickmasta: has joined #RubyOnRails
[04:10:30] ellisTAA: pwnd_nsfw: do i just put that file in the vendor folder?
[04:10:52] pwnd_nsfw: app/assets/javascripts
[04:10:54] pwnd_nsfw: you have that right
[04:11:00] pwnd_nsfw: but you can't just link it like that
[04:11:09] ellisTAA: oh shit really? what do u have to do
[04:11:23] werelivinginthef: has joined #RubyOnRails
[04:11:27] pwnd_nsfw: http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/javascript_include_tag
[04:11:32] ellisTAA: thanks i appreciate it
[04:12:32] pwnd_nsfw: alternatively, in the default application.###.html file has code that imports javacript files based on the application.js file
[04:12:39] fighella: has joined #RubyOnRails
[04:13:02] pwnd_nsfw: http://guides.rubyonrails.org/asset_pipeline.html Some more to read up on.
[04:13:28] nahtnam: rubyspec == rspec?
[04:13:33] pwnd_nsfw: EllisTAA, same goes for images and the like. You'd have to use image_tag 'filename' instead of just linking
[04:14:06] niiamon: has joined #RubyOnRails
[04:14:08] JoshuaPaling: has joined #RubyOnRails
[04:14:22] nahtnam: Which is better?
[04:14:31] pwnd_nsfw: I don't think rubyspec is supported anymore
[04:14:37] workmad3: has joined #RubyOnRails
[04:14:42] tubbo: rubyspec is a spec for the ruby language, not for you
[04:14:47] pwnd_nsfw: either way, it's a tool, and the one you know how to use better sometimes is the better bet.
[04:14:51] tubbo: rspec is a testing framework
[04:15:59] nahtnam: Oh. I thought rubyspec was also a testing framework
[04:16:10] tubbo: rubyspec is written in rspec though :)
[04:16:46] tubbo: or wait actually https://github.com/ruby/mspec
[04:18:23] nahtnam: so for testing there is rpsec and mspec?
[04:18:33] artto: has joined #RubyOnRails
[04:18:56] Nuck: There's also MiniTest::Spec
[04:19:08] Nuck: There's a gajillion tools to pick from
[04:19:12] Nuck: Just choose one and roll with it
[04:19:16] mojojoel: has joined #RubyOnRails
[04:19:19] tubbo: nahtnam: you pretty much just have to worry about minitest and rspec. mspec is just for rubyspec.
[04:19:25] Grundell: has joined #RubyOnRails
[04:19:26] Xiti: has joined #RubyOnRails
[04:19:39] nahtnam: tubbo: So which one do you use?
[04:19:54] tubbo: i use rspec mostly
[04:20:10] tubbo: minitest is looking more attractive now that parallel testing will be baked into rails 5 though
[04:20:13] Nuck: I'm personally a MiniTest guy
[04:21:07] niiamon: has joined #RubyOnRails
[04:22:02] quazimod1: I'm having troubel with rspec needing to fetch data from my db
[04:22:31] ellisTAA: the website said to do this, but this isn???t working: https://github.com/ellismarte/wwwhich-color/blob/master/app/views/themes/index.html.erb#L9
[04:23:04] erich: has joined #RubyOnRails
[04:23:08] quazimod1: https://gist.github.com/siassaj/91b5929a0de9af87f4aa
[04:23:28] quazimod1: line 13 hits the database, so even if i build out a Vehicle and pass it into this class, it'll still try to hit the DB
[04:23:41] quazimod1: what's the gooda solution ?
[04:24:15] niiamon: has joined #RubyOnRails
[04:24:20] mwlang: quazimod1: how do you pass the pre-built instance in?
[04:24:28] quazimod1: as an argument
[04:24:45] quazimod1: vehicle has many capital values, all built via factory girl using build strategy
[04:24:54] quazimod1: but... find_by_service ruins it
[04:25:04] mwlang: quazimod1: how so?
[04:25:10] quazimod1: hits database
[04:25:46] quazimod1: this class needs to know nothing about the db, it just so happens that it needs data that happens to live in the db
[04:25:53] dyulax: has joined #RubyOnRails
[04:26:03] h7br1x: has joined #RubyOnRails
[04:26:19] niiamon: has joined #RubyOnRails
[04:26:34] mwlang: the factories are for either easily instantiating models with known good values to which you then proceed to use to construct your tests???.or they???re also use to build up data saved to the database to which you then set up tests to test the querying logic of your code, in this case the find_by_service.
[04:27:12] quazimod1: I know what factories are for zzzz my architecture perhaps sucks?
[04:27:19] quazimod1: does Finance need to call find_by_service?
[04:27:21] mwlang: quazimod1: if you don???t want this class to know about the database, then build it strctly to take an instantiated object via the args params you have going there.
[04:28:55] jdayvie: has joined #RubyOnRails
[04:30:00] niiamon: has joined #RubyOnRails
[04:30:38] lethjakman: has joined #RubyOnRails
[04:30:50] mwlang: quazimod1: In a scenario like you describe, I would typically just move the querying smarts to the class that???s supposed to know how to find it???s own values
[04:31:36] Gnut: has joined #RubyOnRails
[04:31:43] baweaver: has joined #RubyOnRails
[04:32:17] quazimod1: I'm just being bitchy
[04:34:03] mwlang: quazimod1: https://gist.github.com/mwlang/39879095c4958c338662 for example???.then in my code where I need a specific account type, I call AccountType.business to get a business account instance and check that an account_type on the model using this class with some_model_instance.account_type.business?
[04:35:23] mwlang: since account types get used over and over, I cache the first query to avoid hitting the DB all the time (some caching is also handled by Rails, too, but I also use these classes in non-Rails settings).
[04:35:56] jdayvie: Good Evening Everyone =) Hope all is well! I seem to be having an issue with creating simple replies onto a discussion/thread. Right now the user_id returns correctly but the discussion_id remains nil and I'm having an issue flag a line in my code (https://gist.github.com/Jdayvie/1fa6ee219c6050723b34#file-user-rb-L55-L57) - Highlighted there in cas
[04:35:56] jdayvie: e anyone can take a peak =) Thank you!
[04:36:07] jdayvie: https://gist.github.com/Jdayvie/1fa6ee219c6050723b34#file-user-rb-L55-L57
[04:37:50] lxsameer: has joined #RubyOnRails
[04:39:26] sp1rs1: has joined #RubyOnRails
[04:40:49] ellisTAA: has joined #RubyOnRails
[04:41:35] n00bDev: has joined #RubyOnRails
[04:42:44] DoctorMonocular: has joined #RubyOnRails
[04:43:50] nickenchuggets: has joined #RubyOnRails
[04:44:55] srinidhi: has joined #RubyOnRails
[04:45:17] EminenceHC: has joined #RubyOnRails
[04:45:51] nandx64: has joined #RubyOnRails
[04:46:53] acti0nman: has joined #RubyOnRails
[04:46:56] niiamon: has joined #RubyOnRails
[04:47:28] triangles: has joined #RubyOnRails
[04:50:31] Mendenhall: has joined #RubyOnRails
[04:50:49] theery: has joined #RubyOnRails
[04:51:03] armyriad: has joined #RubyOnRails
[04:51:57] christiandsg: has joined #RubyOnRails
[04:53:18] armyriad: has joined #RubyOnRails
[04:54:16] learner: has joined #RubyOnRails
[04:54:35] GriffinHeart: has joined #RubyOnRails
[04:54:53] sarink: has joined #RubyOnRails
[04:55:53] jdayvie: If anyone is available to help guide me in the right direction. Been driving myself crazy over finishing up simple replies to a discussion.
[04:56:03] tjbiddle: has joined #RubyOnRails
[04:56:05] sameerynho: has joined #RubyOnRails
[04:56:28] iamse7en: has joined #RubyOnRails
[04:58:17] annlewis: has joined #RubyOnRails
[05:00:42] piotrj: has joined #RubyOnRails
[05:01:13] srinidhi: has joined #RubyOnRails
[05:04:49] niiamon: has joined #RubyOnRails
[05:05:38] ayonkhan: has joined #RubyOnRails
[05:06:17] arooni-mobile: has joined #RubyOnRails
[05:08:00] charliesome: has joined #RubyOnRails
[05:08:16] codeshah: has joined #RubyOnRails
[05:09:17] nya: has joined #RubyOnRails
[05:10:08] rickmasta: has joined #RubyOnRails
[05:10:32] jriese: has joined #RubyOnRails
[05:11:07] nofxx: has joined #RubyOnRails
[05:19:16] artto: has joined #RubyOnRails
[05:20:23] nya: has joined #RubyOnRails
[05:21:44] niiamon: has joined #RubyOnRails
[05:21:57] theery: has joined #RubyOnRails
[05:24:12] Radar: jdayvie: It should be params[:discussion_id] i think
[05:24:27] Radar: jdayvie: I'd know better if I could see your routes.
[05:24:44] jdayvie: Let me add them for you but they are resourceful =)
[05:25:02] lurch_: has joined #RubyOnRails
[05:25:50] theery: has joined #RubyOnRails
[05:26:40] clayton1: has joined #RubyOnRails
[05:26:46] jdayvie: https://gist.github.com/Jdayvie/1fa6ee219c6050723b34
[05:26:48] jdayvie: Updated =)
[05:28:40] Radar: Yup, params[:discussion_id]
[05:28:44] Radar: params[:id] will be the id for the post
[05:30:17] jdayvie: Hmm, okay let me try and change that line you were referring to (thank you for taking the time to help by the way!).
[05:30:34] ur5us: has joined #RubyOnRails
[05:31:14] lethjakman: has joined #RubyOnRails
[05:32:34] jdayvie: Now I am having an issue with another line - undefined method `post' for #<Discussion:0x007fba395b3290> on the create block...
[05:32:38] michael_mbp: has joined #RubyOnRails
[05:35:35] arooni-mobile__: has joined #RubyOnRails
[05:35:56] jdayvie: The discussion_id is still not saving properly.
[05:35:59] learner: has joined #RubyOnRails
[05:36:09] jdayvie: Wait, never mind.
[05:36:15] GriffinHeart: has joined #RubyOnRails
[05:36:17] arooni-mobile__: has left #RubyOnRails: ()
[05:36:22] jdayvie: It is working now but now it is just this issue with the block...
[05:36:32] tjbiddle: has joined #RubyOnRails
[05:36:56] elton: has joined #RubyOnRails
[05:37:45] Radar: jdayvie: Can you cut the gist down to just the relevant parts please?
[05:37:54] jdayvie: Sure thing
[05:38:00] Radar: 1) the create block 2) the error + stacktrace
[05:38:11] niiamon: has joined #RubyOnRails
[05:39:02] tagrudev: has joined #RubyOnRails
[05:39:43] badmadrad: has joined #RubyOnRails
[05:40:00] jdayvie: stacktrace?
[05:40:54] riotjones: has joined #RubyOnRails
[05:41:47] jdayvie: https://gist.github.com/Jdayvie/1fa6ee219c6050723b34 I updated the gist.
[05:42:20] rvanlieshout: add the model
[05:42:43] nandx64: has joined #RubyOnRails
[05:42:50] anti-freeze: has joined #RubyOnRails
[05:42:56] jdayvie: Radar: Just added stack trace =)
[05:43:23] Radar: jdayvie: You can leave off the do |post| and the end and it will work the same.
[05:43:29] Radar: @post.user = current_user
[05:43:46] Radar: And why isn't it @discussion.posts.build?
[05:43:53] Radar: rvanlieshout's right to request the model
[05:43:55] Radar: !gist-usage also
[05:43:55] helpa: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[05:44:11] jdayvie: Hah, that is what I had errr. Which Model and I will add it =) Post?
[05:44:23] nandx64: has joined #RubyOnRails
[05:44:26] poli: has joined #RubyOnRails
[05:44:44] rvanlieshout: you're assuming discussion has a 'post' so we want to see where that is defined
[05:45:03] SteenJobs: has joined #RubyOnRails
[05:45:12] jdayvie: Not a problem =)
[05:45:56] jdayvie: Discussion model has been added.
[05:46:17] rvanlieshout: also read the gist-usage thing
[05:46:39] rvanlieshout: and a discussion has many posts
[05:46:43] rvanlieshout: so it's a posts.create
[05:46:45] rvanlieshout: not post.create
[05:47:21] jdayvie: Thank you for that link. Will read it certainly! =)
[05:47:53] icosa1: has joined #RubyOnRails
[05:48:02] jdayvie: I think that was the gem of an answer =P
[05:48:11] h7br1x: has joined #RubyOnRails
[05:48:20] jdayvie: Let me make some adjustments real quick to see =P
[05:48:54] EminenceHC: has joined #RubyOnRails
[05:49:31] nandx64: has joined #RubyOnRails
[05:49:36] clayton2: has joined #RubyOnRails
[05:52:11] elton: has joined #RubyOnRails
[05:52:23] jdayvie: Hmm, that does work and made an adjustment to the view but now it just seems like a simple variable problem. It is not acknowledging the column of the users table.
[05:52:31] jdayvie: I added the users variable but hmmm...
[05:53:14] rvanlieshout: where have you seen that .create accepts a block like that?
[05:53:36] rvanlieshout: create_param.merge(user: current_user)
[05:53:46] jdayvie: Just checked rails console and still have discussion_id nil.
[05:54:08] nandx64: has joined #RubyOnRails
[05:54:37] jdayvie: Honestly, that block was suggested by another individual looking to help. I had what Radar suggested @post.user = current_user
[05:54:58] rvanlieshout: post = @discussion.posts.build(...)
[05:55:00] rvanlieshout: post.user = current_user
[05:55:46] quazimod1: has joined #RubyOnRails
[05:55:57] quazimod2: has joined #RubyOnRails
[05:55:58] elton: has joined #RubyOnRails
[05:56:05] nandx64: has joined #RubyOnRails
[05:56:08] jdayvie: create_param.merge(user: current_user) ... That does into the build?
[05:56:11] jdayvie: @post = @discussion.posts.build(create_param.merge(user: current_user) )
[05:57:01] quazimod1: has joined #RubyOnRails
[05:57:12] n00bDev: has joined #RubyOnRails
[05:58:34] metus_violarium: has joined #RubyOnRails
[05:58:40] nandx64_: has joined #RubyOnRails
[05:59:04] annlewis: has joined #RubyOnRails
[05:59:18] jdayvie: No that is not it. Hmm, let me see...
[05:59:53] vere: has joined #RubyOnRails
[06:00:05] fighella: has joined #RubyOnRails
[06:00:09] yardenbar: has joined #RubyOnRails
[06:00:36] sevenseacat: has joined #RubyOnRails
[06:01:46] roolo: has joined #RubyOnRails
[06:02:46] riotjones: has joined #RubyOnRails
[06:03:01] chrissonar: has joined #RubyOnRails
[06:03:05] rvanlieshout: well.. you should keep it readable
[06:03:18] rvanlieshout: so don't mind adding a few extra lines
[06:03:19] workmad3: has joined #RubyOnRails
[06:03:43] rghose: has joined #RubyOnRails
[06:04:45] elton: has joined #RubyOnRails
[06:05:04] piotrj: has joined #RubyOnRails
[06:05:52] rvanlieshout: use the post = @discussion.posts.build(create_param)
[06:05:56] rvanlieshout: post.user = current_user
[06:06:01] rvanlieshout: and if post.save
[06:06:58] jdayvie: undefined local variable or method `create_param' for #<PostsController:0x007f941b3c1a48>
[06:07:02] jdayvie: Causes that error
[06:07:04] rvanlieshout: create_params
[06:07:09] jdayvie: Its defined below.
[06:07:19] jdayvie: I just edited that trying to adjust the code=P
[06:08:17] jdayvie: That still causes the .first_name error.
[06:08:24] elton: has joined #RubyOnRails
[06:08:40] jdayvie: Not accepting the column of the user.
[06:09:01] jdayvie: I tried to add the .merge(user: current_user) you mentioned.
[06:09:24] arup_r: has joined #RubyOnRails
[06:09:30] rvanlieshout: what fist_name error?
[06:10:09] jdayvie: first_name is within the user table and it is not recognizing that from my view.
[06:10:19] jdayvie: <%= @post.user.first_name %>
[06:10:19] schaerli: has joined #RubyOnRails
[06:11:39] jdayvie: Similar to showing the user of the discussion, I did @discussion.user.first_name and it would show but not for this.
[06:12:10] elton: has left #RubyOnRails: ()
[06:12:14] sevenseacat: walking in halfway through, does this problem have any associated code?
[06:12:27] elton: has joined #RubyOnRails
[06:12:36] brianpWins: has joined #RubyOnRails
[06:12:55] quazimod1: anyone know how i could take a page and present it as a png or (eventually the goal) a ppt slide
[06:13:27] jdayvie: Hey Seven =) Yes, three models. All standard has_many, belongs_to but I have has_many :posts, through => :discussion on the user model.
[06:13:34] sevenseacat: quazimod1: cmd+shift+4? >_>
[06:13:56] rvanlieshout: jdayvie: what error does that trigger?
[06:14:04] elton: i think he means programatically?
[06:14:05] sevenseacat: jdayvie: honestly, that doesnt tell me anything
[06:14:15] jdayvie: Let me gist it all =)
[06:14:43] quazimod1: sevenseacat: lol programattically
[06:14:53] quazimod1: also i don't use a mac
[06:15:00] htmldrum: has joined #RubyOnRails
[06:15:15] sevenseacat: you may want to look into how capybara-screenshot takes screenshots then, thats the only tool I know of that does it
[06:15:31] jdayvie: https://gist.github.com/Jdayvie/1fa6ee219c6050723b34
[06:15:56] jdayvie: I apologize for the order but will read up on that page once this issue is fixed =P
[06:16:07] sevenseacat: jdayvie: https://gist.github.com/Jdayvie/1fa6ee219c6050723b34#file-user-rb-L36 is an error - @discussion does not have a post method
[06:16:30] elton: there probably is a gem that does it if you are using ruby
[06:17:08] sevenseacat: also, do you even have a user logged in when you run this action?
[06:17:26] jas02: has joined #RubyOnRails
[06:18:02] jdayvie: sevenseacat - I updated the create action I currently have.
[06:18:20] jdayvie: Yes, I am authenticating the user.
[06:18:38] sevenseacat: also, showing a create action is irrelevant when the error is coming from a show view
[06:18:49] krz: has joined #RubyOnRails
[06:19:04] jdayvie: Oh I thought you highlighted the create method, sorry.
[06:19:34] elton: you should puts everything current_user.inspect
[06:19:46] sevenseacat: i did, because it had an error in it.
[06:20:01] sevenseacat: however, the error is unrelated to this problem.
[06:20:04] elton: you have no method first_name for
[06:20:09] Grundell: has joined #RubyOnRails
[06:20:11] n00bDev: has joined #RubyOnRails
[06:20:34] elton: your model?
[06:20:36] sevenseacat: does the post you're showing, have a user attached?
[06:20:44] sevenseacat: elton: no, there is no user assigned to the post
[06:20:49] jdayvie: *shakes head* Getting confused =P
[06:21:00] jdayvie: Yes, the user_id is attached to the post.
[06:21:07] sevenseacat: thats natural, because you're looking in the wrong places for solutions
[06:21:17] sevenseacat: what user ID is attached to that post?
[06:21:43] sinkensabe: has joined #RubyOnRails
[06:21:52] jdayvie: The id itself is 16
[06:22:05] sevenseacat: and do you have a user with ID 16?
[06:22:15] jdayvie: I'm sorry Seven. I do appreciate it very much for your time and patience =P
[06:22:30] sevenseacat: there's something you're not telling here then
[06:22:39] zeitue: has joined #RubyOnRails
[06:22:56] sevenseacat: can you gist the full logs, along with these records that supposedly exist
[06:23:19] jdayvie: You want all models, controllers, etc.?
[06:23:30] jdayvie: Sure thing, let me put it together for you.
[06:23:35] sevenseacat: no, I want the full log of you hitting this show action
[06:23:37] sevenseacat: I dont want any code
[06:23:49] sevenseacat: I want the logs, and I want you showing me in the console that these records exist
[06:24:01] sevenseacat: because I believe you're looking at the wrong data
[06:24:22] hahuang65: has joined #RubyOnRails
[06:24:32] fifi-v: has joined #RubyOnRails
[06:24:39] jdayvie: Okay, let me put it together from what I am gathering.
[06:25:03] shock_one: has joined #RubyOnRails
[06:25:14] GriffinHeart: has joined #RubyOnRails
[06:25:19] jdayvie: https://gist.github.com/Jdayvie/bca921b1ab7ec658762d
[06:25:33] jdayvie: Thats the error log on the show, the post.all, post.find and user.all information.
[06:26:26] fifi-v: Hi all, so I have a worker with `include Sidekiq::Worker`, I have defined `perform` in it, but calling MyWorker.perform raises `NoMethodError`, it seems only "perform_async" works. I'm just trying to debug the perform method, any idea?
[06:26:41] bruno-: has joined #RubyOnRails
[06:26:44] sevenseacat: ok, so you're looking at all of the posts in a discussion
[06:26:52] sevenseacat: one of those posts doesn't have a user associated with it
[06:26:59] rvanlieshout: jdayvie: your post doesn't have a user
[06:27:03] jdayvie: One of the early ones probably?
[06:27:10] rvanlieshout: so the 'non user' doesn't have a first_name
[06:27:20] jdayvie: They did not in the beginning but now they do? Post.find(12) was my newest one.
[06:27:20] rvanlieshout: could be. @post.user.try(:first_name)
[06:27:24] sevenseacat: jdayvie: you tell us, you're the one with the data in front of you
[06:27:57] jdayvie: Yes, it has the user id and discussion id now.
[06:28:00] jdayvie: Let me show you the last post.
[06:28:14] sevenseacat: the last post is irrelevant if thats not the one causing the error
[06:28:46] nightsh: has joined #RubyOnRails
[06:29:01] sevenseacat: I also think it's quite odd that you use @post on one line and then post on the next line
[06:29:29] jdayvie: The ones without a user_id are other discussions though.
[06:29:48] jdayvie: When I am trying to view a discussion, it is a newer one but let me try to create a new discussion and new post.
[06:30:26] jdayvie: Created new discussion, new post and still same issue.
[06:30:51] AnoHito: has joined #RubyOnRails
[06:30:51] sevenseacat: okay, now show us the logs for the issue now.
[06:30:55] jdayvie: Post id: 17, user_id: 16, discussion_id: 26 | New post id.
[06:31:03] jdayvie: It's the same I believe but let me update it.
[06:31:24] sevenseacat: so maybe the problem comes down to your use of @post
[06:31:32] jdayvie: gist updated.
[06:31:57] jdayvie: I tried post.user and it said post was undefined
[06:31:58] sevenseacat: where are you defining @post ?
[06:32:03] sevenseacat: but you use it on the very next line
[06:32:07] sevenseacat: how cn it be undefined
[06:32:33] jdayvie: This is on the discussion show method, so there I have (@post = current_user.posts.build)
[06:32:53] sevenseacat: so there we go
[06:32:56] Guest38847: has joined #RubyOnRails
[06:32:59] sevenseacat: why are you trying to show that post's user
[06:33:07] sevenseacat: when you're iterating over posts
[06:33:40] shock_one: has joined #RubyOnRails
[06:34:00] jdayvie: It should be showing all associated with that discussion.
[06:34:08] jdayvie: @posts really too
[06:34:10] nandx64: has joined #RubyOnRails
[06:34:23] safeforge: has joined #RubyOnRails
[06:36:12] niiamon: has joined #RubyOnRails
[06:37:42] christiandsg: has joined #RubyOnRails
[06:38:26] sp1rs1: has joined #RubyOnRails
[06:39:33] tvw: has joined #RubyOnRails
[06:40:52] niiamon: has joined #RubyOnRails
[06:41:55] jdayvie: Well now I feel silly to ask but I am confused how I would set the @posts variable to pull the discussion and user.
[06:43:00] sysx1000: Is there any way to raise an exception, which later will be caught by Rails and processed as 404? E.g. I have found no record by giving criterias, so I want to respond with 404
[06:43:19] sysx1000: something like raise 404NotFound, or whatever
[06:44:11] kimegede: has joined #RubyOnRails
[06:44:25] mojojoel: has joined #RubyOnRails
[06:44:32] niiamon1: has joined #RubyOnRails
[06:45:52] jdayvie: Oh wait a second, let me try a different route.
[06:47:09] h7br1x: has joined #RubyOnRails
[06:48:03] eGGsha: has joined #RubyOnRails
[06:48:38] jdayvie: Well I just want to say thank you to Sevenseacat, rvanlieshout and Radar and taking the time and patience to help me =) I apologize for my lack of knowledge but really appreciate it! Will learn and understand it more.
[06:48:39] werelivinginthef: has joined #RubyOnRails
[06:48:50] niiamon: has joined #RubyOnRails
[06:49:12] jdayvie: Ill get this last bit together I am sure =P You guys really did plenty to get me in the right direction =D
[06:49:24] jdayvie: I hope you all have great evenings (or morning, depending on your time of day!) =)
[06:51:19] aganov: has joined #RubyOnRails
[06:52:45] chinmay_dd: has joined #RubyOnRails
[06:54:27] graft: has joined #RubyOnRails
[06:54:48] jrz: has joined #RubyOnRails
[06:56:00] mojojoel: has joined #RubyOnRails
[06:56:07] arBmind: has joined #RubyOnRails
[06:56:28] craysiii: has joined #RubyOnRails
[06:57:49] nandx64: has joined #RubyOnRails
[06:58:59] strixd: has joined #RubyOnRails
[06:59:22] seank_: has joined #RubyOnRails
[06:59:50] annlewis: has joined #RubyOnRails
[06:59:58] strixd: has joined #RubyOnRails
[07:00:31] drale2k: has joined #RubyOnRails
[07:00:49] strixd: has joined #RubyOnRails
[07:03:23] schaerli: has joined #RubyOnRails
[07:03:43] tjbiddle: Anyone know how I can end a capistrano task early without getting an exception? exit and return are nogo
[07:04:18] towski_: has joined #RubyOnRails
[07:06:48] niiamon: has joined #RubyOnRails
[07:07:55] piotrj: has joined #RubyOnRails
[07:08:26] wethu: has joined #RubyOnRails
[07:09:33] ishahnaz: has joined #RubyOnRails
[07:09:56] norc: has joined #RubyOnRails
[07:10:43] norc: Hi. Given a path /foo/1001+1002/bar - can I define a route that automatically parses the parameter to foo into two seperate variables like "beginning" and "ending" ?
[07:11:10] norc: (In my case the resource is always identified by two seperate numbers)
[07:12:30] code1o6: has joined #RubyOnRails
[07:13:02] norc: Or should I simply use something like this: constraints: { id: /\d+\.\d+/ } (and then just split the parameter in my controller)
[07:15:59] graft: has joined #RubyOnRails
[07:15:59] graft: has joined #RubyOnRails
[07:16:23] dvb_ua: has joined #RubyOnRails
[07:16:24] schaerli: has joined #RubyOnRails
[07:16:27] PhantomSpank: has joined #RubyOnRails
[07:17:28] inoter: has joined #RubyOnRails
[07:19:20] sysx1000: Which arguments ActionController instance action method actually receive? All I see in the source code is *args, but what exactly? params, request, response, what else?
[07:20:22] lethjakman: has joined #RubyOnRails
[07:20:25] julienk: has joined #RubyOnRails
[07:20:46] artto: has joined #RubyOnRails
[07:20:57] nandx64: has joined #RubyOnRails
[07:22:56] michael_mbp: has joined #RubyOnRails
[07:23:06] ishahnaz: has joined #RubyOnRails
[07:23:07] andrew9184: has joined #RubyOnRails
[07:23:27] rakm: has joined #RubyOnRails
[07:23:31] neanderslob: has joined #RubyOnRails
[07:23:39] Ropeney: has joined #RubyOnRails
[07:24:11] poli: has joined #RubyOnRails
[07:24:43] niiamon: has joined #RubyOnRails
[07:27:36] niiamon1: has joined #RubyOnRails
[07:28:07] rikkipitt: has joined #RubyOnRails
[07:29:12] poli: has joined #RubyOnRails
[07:29:18] schaerli: has joined #RubyOnRails
[07:29:32] fighella: has joined #RubyOnRails
[07:30:19] schaerli: has joined #RubyOnRails
[07:33:54] terpo: has joined #RubyOnRails
[07:34:14] poli: has joined #RubyOnRails
[07:35:57] TinkerTyper: has joined #RubyOnRails
[07:36:41] livathinos: has joined #RubyOnRails
[07:37:01] Trynemjoel: has joined #RubyOnRails
[07:39:12] Sylario: has joined #RubyOnRails
[07:39:29] poli: has joined #RubyOnRails
[07:40:29] Grundell: has joined #RubyOnRails
[07:41:43] chipotle: has joined #RubyOnRails
[07:41:51] duncannz: has joined #RubyOnRails
[07:42:09] {756d6f}: has joined #RubyOnRails
[07:43:00] nandx64: has joined #RubyOnRails
[07:44:10] Palsson: has joined #RubyOnRails
[07:45:01] niiamon: has joined #RubyOnRails
[07:45:49] tjbiddle_: has joined #RubyOnRails
[07:46:09] mytrile: has joined #RubyOnRails
[07:47:23] mytrile: Hey guys, If I use active_record_store for session_store do I need to encrypt session_id in the cookie ?
[07:49:28] poli: has joined #RubyOnRails
[07:50:17] op84: has joined #RubyOnRails
[07:51:23] htmldrum: has joined #RubyOnRails
[07:51:24] op84: hey there - i moved my app to an engine now i was wondering how to handle all the db stuff??? as far as i have noticed is that i have to move the migrations to my engine and just leave the schema in my app - is that the correct way to do it?
[07:52:03] workmad3: has joined #RubyOnRails
[07:52:34] darutoko: has joined #RubyOnRails
[07:53:51] alienaut: has joined #RubyOnRails
[07:56:33] marr: has joined #RubyOnRails
[07:57:48] zpe: has joined #RubyOnRails
[08:00:37] annlewis: has joined #RubyOnRails
[08:01:58] niiamon: has joined #RubyOnRails
[08:03:16] axl_: has joined #RubyOnRails
[08:03:50] niiamon1: has joined #RubyOnRails
[08:03:52] jsrn_: has joined #RubyOnRails
[08:04:37] alienaut: i have datetime column for my model. how can i compare it with now by using active record
[08:05:22] elaptics: alienaut: compare how? something like: foo.my_date_column < Time.current
[08:06:03] drale2k: has joined #RubyOnRails
[08:07:14] n008f4g_: has joined #RubyOnRails
[08:08:14] alienaut: OMG! You can compare time using little than or greater than symbol? is this SQL or active record trick?
[08:08:22] tjbiddle: has joined #RubyOnRails
[08:08:25] michael_mbp: has joined #RubyOnRails
[08:09:26] rvanlieshout: armyriad: it depends on where you execute that
[08:10:04] terpo: has joined #RubyOnRails
[08:10:22] niiamon: has joined #RubyOnRails
[08:10:29] h7br1x: has joined #RubyOnRails
[08:10:52] bronson: has joined #RubyOnRails
[08:11:33] elaptics: alienaut: it's just ruby
[08:12:01] elaptics: alienaut: Date.new(2015,7,30) > Date.new(2015,81)
[08:12:21] elaptics: except use valid dates :( Date.new(2015,8,1)
[08:13:40] alienaut: humm by the way my scope just like ' where("is_visible = TRUE OR (from_datetime <= ? AND to_datetime >= ?)", DateTime.current, DateTime.current) '
[08:13:55] alienaut: and it worked for me
[08:14:57] rvanlieshout: alienaut: then it's sql who is comparing that
[08:15:04] niiamon: has joined #RubyOnRails
[08:15:38] mikecmpbll: has joined #RubyOnRails
[08:15:43] Coldblackice: has joined #RubyOnRails
[08:19:47] nandx64: has joined #RubyOnRails
[08:19:59] neanderslob: has joined #RubyOnRails
[08:21:08] bePolite_: has left #RubyOnRails: ()
[08:21:47] artto: has joined #RubyOnRails
[08:22:17] eGGsha: has joined #RubyOnRails
[08:22:17] alienaut: elaptics, rvanliesout thanks!
[08:23:52] blackhuey: has joined #RubyOnRails
[08:26:00] arup_r: I am trying to craete dynamic link using link_to ,, but it seems not working.. No idea although. Can you help me ? https://gist.github.com/aruprakshit/2d6bde825b2efa59c501
[08:26:25] christiandsg: has joined #RubyOnRails
[08:26:33] arup_r: I tried produce the error in the console,, as it is the error I am getting in my view only
[08:27:22] sevenseacat: that code doesnt match the error
[08:27:27] sevenseacat: the code doesnt call link_to, but the error does
[08:27:33] sevenseacat: oh wait, there it is
[08:28:16] JEEB: has joined #RubyOnRails
[08:28:23] djbkd_: has joined #RubyOnRails
[08:28:41] mikecmpbll: what error are you getting? ..
[08:29:00] arup_r: mikecmpbll: https://gist.github.com/aruprakshit/2d6bde825b2efa59c501#file-error-L8
[08:29:05] sevenseacat: why dont you just gist the problem as it happens in your view? you dont have routes available in irb like that
[08:29:07] mikecmpbll: that's on the console
[08:29:20] mikecmpbll: the error is specific to the console i'm pretty sure
[08:29:39] arup_r: sevenseacat: due to this error in view I am getting wrong error
[08:29:53] JEEB: hi, I'm using rails 4.2.x atm with ActiveRecord, and I'd like to know if I should be getting transaction-related stuff in my log? I am currently getting the general SQL queries in my log, but I don't seem to notice any START TRANSACTION etc
[08:30:00] arup_r: I mean wrong Url
[08:31:01] JEEB: I am just trying to make sure that a fix I'm writing atm which consists of wrapping some things with a transaction is actually working or not
[08:31:19] universa1: JEEB: are you using a database which supports transactions?
[08:31:21] sevenseacat: without seeing the logs, how can we know...?
[08:31:30] JEEB: universa1: MySQL
[08:31:37] JEEB: which should IMHO support transactions
[08:32:15] arup_r: sevenseacat: one min.. I am trying to copy the log
[08:32:29] universa1: JEEB: i haven't used mysql in years, but didn't only innodb have transactions?
[08:32:54] JEEB: hmm, I will have to check my DB type and double-check that one
[08:33:43] JEEB: at least https://dev.mysql.com/doc/refman/5.5/en/commit.html doesn't seem to mention it
[08:34:17] nandx64: has joined #RubyOnRails
[08:34:20] mikecmpbll: innodb has transactions, yeh
[08:34:30] mikecmpbll: table level anyways
[08:35:24] universa1: JEEB: wikipedia says myisam doesn't have transaction support
[08:35:55] dici: has joined #RubyOnRails
[08:36:07] JEEB: interesting, the doc page only mentions that "WITH CONSISTENT SNAPSHOT" is what only innodb can do, but that might be true as I might just be looking at the wrong page regarding that information
[08:36:18] JEEB: but yes, that would explain
[08:36:30] universa1: JEEB: switch to postgres *cough*
[08:36:39] mikecmpbll: yeah, postgres gives you transactional ddl too
[08:37:02] JEEB: yeah, I generally prefer postgres as well
[08:37:07] mikecmpbll: ACTION espouses postgres while using mysql
[08:37:17] JEEB: I'll have to see what I can do
[08:37:39] JEEB: thanks guys
[08:39:01] schaerli: has joined #RubyOnRails
[08:41:11] Guest38847: has joined #RubyOnRails
[08:42:03] DEA7TH: has joined #RubyOnRails
[08:42:10] elaptics: mikecmpbll: I feel for you - I'm working on a rails 2.3 app using mysql :(
[08:42:34] mikecmpbll: elaptics: two .. point .. three. ok you win.
[08:44:52] blackmesa: has joined #RubyOnRails
[08:45:08] elaptics: mikecmpbll: did I mention there's no tests? Apart from the one's we're now adding
[08:45:20] camilasan: has joined #RubyOnRails
[08:45:43] arup_r: I fixed it.. It was a lot of views.. so I was not able to show how to make a gist.. So thought lets try by myself.. But the think is what I doubted, that was not the problem.. `link_to` is working as expected.. it was data issue..
[08:46:15] mikecmpbll: arup_r: that woulda been obvious had you provided the right debugging information
[08:46:16] JEEB: funky, my development box at least has InnoDB
[08:46:20] mikecmpbll: rather than an irrelivant error from the console.
[08:46:23] JEEB: so it should have transactions
[08:46:31] mikecmpbll: (p.s. i can never spell irrelevant)
[08:46:45] JEEB: ACTION goes check out the production for good measure
[08:47:20] umo20: has joined #RubyOnRails
[08:48:11] mikecmpbll: JEEB: yeah, mysql2 & rails will create InnoDB by default, frankly i wouldn't even know how to change the storage engine
[08:48:15] JEEB: yeah, seems like inno everywhere... which should have transactions...
[08:48:30] DEA7TH_: has joined #RubyOnRails
[08:48:31] arup_r: mikecmpbll: no I am not.. because my assumption was wrong
[08:48:40] JEEB: so now back to seeing why I only see the general SQL queries yet don't see START TRANSACTION anywhere
[08:48:44] mikecmpbll: arup_r: don't assume
[08:49:08] sameerynho: has joined #RubyOnRails
[08:49:41] elaptics: what's the thing about that? Don't assume because you make an ass out of u and me?
[08:49:45] djbkd: has joined #RubyOnRails
[08:49:57] mikecmpbll: haha, that's the one yeah.
[08:50:19] mikecmpbll: but more specifically, don't assume because your assumptions are probably wrong and you will convolute what's actually a simple problem with your crappy assumptios.
[08:54:44] brotspinne: has joined #RubyOnRails
[08:56:33] brotspinne: hello. I'm using some_model.some_collection = [...]. the guide doc is here http://guides.rubyonrails.org/v4.2.1/association_basics.html#methods-added-by-has-many-collection-objects but I need to know what "deleting" means for elements which are not in the new array. is it destroying them? will it run callbacks? where can I find the api doc for it? thanks!
[08:56:35] xcesariox: has joined #RubyOnRails
[08:57:57] arup_r: mikecmpbll: many people said me that "don't assume!" .. but it became my habbit... I need ti get out of it
[08:58:24] mikecmpbll: arup_r: yes :) it's not the assuming itself, it shows that you're trying to think about the problem
[08:58:34] mikecmpbll: but when you bring the problem here, discard the assumptions from your debugging
[08:58:45] mikecmpbll: and pair it back to the bare problem.
[08:59:45] annlewis: has joined #RubyOnRails
[08:59:52] JEEB: so, uh... is there any way to make the rails logging more verbose or should I start enabling mysql's query log and see if I can make sure the transaction is happening?
[09:00:14] mikecmpbll: JEEB: iirc transactions get logged with other sql, in development
[09:00:34] sevenseacat: has joined #RubyOnRails
[09:01:07] JEEB: yeah, that's what I'm running atm... which would mean that for whatever reason the transaction isn't happening :/
[09:01:18] DoubleMalt: has joined #RubyOnRails
[09:01:24] mikecmpbll: JEEB: code? :)
[09:01:40] workmad3: has joined #RubyOnRails
[09:02:13] blankammo: has joined #RubyOnRails
[09:05:33] PhantomSpank: has joined #RubyOnRails
[09:05:51] JEEB: basically something along the lines of http://up-cat.net/p/1357f45d
[09:05:57] schaerli: has joined #RubyOnRails
[09:06:48] drale2k: has joined #RubyOnRails
[09:07:27] mikecmpbll: JEEB: you'll get BEGIN and COMMIT/ROLLBACK in your log
[09:07:39] mikecmpbll: just open up the rails console and take a look.
[09:07:52] Skizu: has joined #RubyOnRails
[09:08:46] JEEB: mikecmpbll: now I see :)
[09:08:56] JEEB: I was just expecting them in the SQL way
[09:09:01] Skizu: When creating a new model instance can I hook in and create associations to other models (some require no params but are always there)
[09:09:07] lethjakman: has joined #RubyOnRails
[09:09:27] JEEB: as in, I was grepping for START TRANSACTION and TRANSACTION
[09:10:08] elia: has joined #RubyOnRails
[09:10:33] mikecmpbll: i think begin/commit is sql
[09:10:42] mikecmpbll: i dunno anything about this stuff tbh.
[09:10:45] JEEB: yeah, it is
[09:10:57] JEEB: "BEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for initiating a transaction. START TRANSACTION is standard SQL syntax and is the recommended way to start an ad-hoc transaction."
[09:11:07] mikecmpbll: right, gotcha.
[09:11:07] JEEB: (re: mysql 5.5 docs)
[09:11:44] JEEB: but yeah, I will guess this thing should now be atomic since I see a BEGIN as it starts, then I see the data being added and finally I see a COMMIT
[09:11:51] JEEB: so there should one state without all that data
[09:12:02] JEEB: and another where all that data is available to all connections
[09:13:31] mikecmpbll: JEEB: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L436-L438
[09:13:34] mikecmpbll: create a PR if you want :p
[09:14:27] JEEB: mikecmpbll: maybe if I have the time :D
[09:14:36] JEEB: it is an alias so it will keep working until it's removed, though
[09:14:39] JEEB: so it's not strictly incorrect
[09:14:49] startupality: has joined #RubyOnRails
[09:14:56] JEEB: and when/if it gets removed everyone's code will loudly complain, basically
[09:15:08] mikecmpbll: yeah, it might be for backward compatibility with older mysql versions, presently /shrugs
[09:15:37] JEEB: could be, no idea
[09:16:04] mikecmpbll: mind you START TRANSACTION is in the 5.0 docs so :/
[09:16:05] schaerli: has joined #RubyOnRails
[09:16:43] JEEB: anyways, now that I've actually made sure my change does what it's supposed to, it's time to go through the usual phases :) thanks once again
[09:17:52] arup_r: has joined #RubyOnRails
[09:20:30] agent_white: has joined #RubyOnRails
[09:20:54] agent_white: Evenin' folks
[09:21:50] czerasz: has joined #RubyOnRails
[09:22:02] arBmind: has joined #RubyOnRails
[09:22:18] artto: has joined #RubyOnRails
[09:22:55] mikecmpbll: ello agent_white
[09:23:02] eGGsha: has joined #RubyOnRails
[09:23:10] AnoHito: has joined #RubyOnRails
[09:26:31] melter: has joined #RubyOnRails
[09:29:45] toomus: has joined #RubyOnRails
[09:31:36] blackmesa: has joined #RubyOnRails
[09:32:13] Skizu: has left #RubyOnRails: ()
[09:32:21] poli_: has joined #RubyOnRails
[09:33:19] nofxx: has joined #RubyOnRails
[09:33:44] nofxx: has joined #RubyOnRails
[09:37:17] amcoder: has joined #RubyOnRails
[09:37:35] charliesome: has joined #RubyOnRails
[09:39:22] htmldrum: has joined #RubyOnRails
[09:39:28] wpp: has joined #RubyOnRails
[09:40:25] nandx64: has joined #RubyOnRails
[09:40:35] hololeap: has joined #RubyOnRails
[09:41:59] pmsl: has joined #RubyOnRails
[09:42:08] quazimod1: has joined #RubyOnRails
[09:42:29] pmsl: has left #RubyOnRails: ()
[09:42:39] sp1rs: has joined #RubyOnRails
[09:42:56] mxrguspxrt: has joined #RubyOnRails
[09:43:05] wpp: Hi I have a problem where my .js.erb file is rendered but the javascript code is not being executed here is a https://gist.github.com/wpp/0255f4b40a46258f95c1
[09:43:16] bruno-: has joined #RubyOnRails
[09:43:27] wpp: I've already tried layout: false option in the controller but no luck
[09:43:52] wpp: I can see the correct response in chromes network tab
[09:44:19] rvanlieshout: does the browsers web console shows the xhr?
[09:44:21] rvanlieshout: and prope response
[09:44:37] wpp: yeah type is xhr and when I copy/paste the response works as expected
[09:44:52] wpp: do I have to add something to link other than remote: true?
[09:46:04] wpp: AAAAHHH
[09:46:14] rvanlieshout: but does the console actually show you that it performed the xhr?
[09:46:57] wpp: yeah did and does, the problem was I had render ... after the alert(1) which has a syntax error only having alert(1) in the js.erb works fine
[09:47:05] Lightsword: has joined #RubyOnRails
[09:48:01] wpp: I have to keep in mind that I have to .append('<%= %>'); instead of .append(<%= %>);
[09:49:07] tsujp: has joined #RubyOnRails
[09:49:34] michaell_: has joined #RubyOnRails
[09:51:11] srinidhi: has joined #RubyOnRails
[09:51:52] rakm: anyone use rbenv? i just installed for the first time and can't seem to install bundler. i think it's a unix permissions problem, but not sure
[09:52:04] helpa: rakm: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[09:52:05] rakm: getting "Insecure operation - exist? (SecurityError)"
[09:52:20] rakm: on `gem install bundler`
[09:52:28] rakm: sorry, bad question asking. i should know better
[09:53:18] rakm: i have the rbenv install directory owned by the `rbenv` group and my user is added to this unix group
[09:53:59] rvanlieshout: does it come with a trace?
[09:54:43] rakm: rvanlieshout yeah, but it's not very useful http://pastie.org/10319762
[09:55:02] rakm: (to me, at least)
[09:56:50] elia: has joined #RubyOnRails
[09:56:56] rvanlieshout: you could try to edit that confif_file.rb and see what path it's trying to use
[09:56:59] rvanlieshout: then check permissions on that path
[09:57:11] rubyonrails464: has joined #RubyOnRails
[09:58:05] mrbubbles: if i???m calling function(a,b,c).round(2) and the rsult of function is either a number or nil, how do I stop from getting an error if it???s nil?
[09:58:24] mrbubbles: i could do a big old if / else but there must be asexy way
[09:58:42] DEA7TH_: has joined #RubyOnRails
[09:58:48] rakm: hmm rvanlieshout, it is looking for "/usr/local/rbenv/versions/2.1.1/etc/gemrc", which doesn't exist..
[09:59:35] rvanlieshout: and if you go backup from there?
[10:07:06] stamina: has joined #RubyOnRails
[10:07:17] prgmmr_: has joined #RubyOnRails
[10:07:42] eGGsha: has joined #RubyOnRails
[10:07:46] drale2k: has joined #RubyOnRails
[10:08:43] annlewis: has joined #RubyOnRails
[10:10:15] mnms_: sprockets are responsible for converting haml view to html, yes ?
[10:10:44] sevenseacat: sprockets is for the asset pipeline
[10:10:58] JoshuaPaling: has joined #RubyOnRails
[10:11:23] mnms_: thanks, so which gem is responsible for it ? haml-rails ?
[10:11:54] sevenseacat: provides the template handler for rails, and then it depends on haml which does the actual conversion
[10:13:46] mnms_: so sprockets detects file, they see "haml" handler, ask "haml-rails" to make conversion ?
[10:14:02] sevenseacat: sprockets has nothing to do with rendering templates.
[10:14:25] mnms_: I mean I said that haml-rails make conversion
[10:15:02] inoter: has joined #RubyOnRails
[10:15:10] christiandsg: has joined #RubyOnRails
[10:16:22] bePolite: has joined #RubyOnRails
[10:17:14] workmad3: has joined #RubyOnRails
[10:18:09] mnms_: it's doesnt like that the sprockets search for assets in load_path and use processors and in this case they will use haml processor ?
[10:18:23] mnms_: from haml-rails gem
[10:18:56] chinmay_dd: has joined #RubyOnRails
[10:19:03] DylanJ: mnms_: https://github.com/indirect/haml-rails/blob/master/lib/haml-rails.rb here you go
[10:20:05] dexter91x: has joined #RubyOnRails
[10:20:27] rickmasta: has joined #RubyOnRails
[10:21:37] prgmmr_: has joined #RubyOnRails
[10:21:38] nandx64_: has joined #RubyOnRails
[10:22:58] artto: has joined #RubyOnRails
[10:25:23] piotrj: has joined #RubyOnRails
[10:25:31] vrdhn: has joined #RubyOnRails
[10:26:51] rubyonrails464: has left #RubyOnRails: ()
[10:27:07] armyriad: has joined #RubyOnRails
[10:28:01] irctc707: has joined #RubyOnRails
[10:28:25] nandx64_: has joined #RubyOnRails
[10:29:25] mathie: has joined #RubyOnRails
[10:32:21] nandx64: has joined #RubyOnRails
[10:32:29] brotspinne: has joined #RubyOnRails
[10:33:20] schaerli: has joined #RubyOnRails
[10:33:34] irctc707: hello im suck currently on a probably simple problem, anyone can help?
[10:33:40] allcentury: has joined #RubyOnRails
[10:34:01] brotspinne: does somebody know where I can find the api doc for collection=? http://guides.rubyonrails.org/v4.2.1/association_basics.html#methods-added-by-has-many-collection-objects
[10:34:28] brotspinne: irctc707: don't ask to ask :)
[10:35:06] mnms_: sevenseacat: I see register_engine method in engine.rb in Sprockets, so sprockets basically use registered engine to convert haml file to html
[10:35:46] irctc707: okay so i tried to get this gem installed which obviously i bundled installed it, but after i put my api keys in and etc, i get this "undefined local variable or method `client' for #<#<Class:0x007f9b11a9ef58>:0x007f9b13403de0>" and this is what im trying to implement https://github.com/adelevie/parse-ruby-client
[10:36:25] brotspinne: irctc707: we would need the code which throws the exception and the full error message with code lines
[10:37:18] irctc707: http://pastie.org/10319835
[10:37:34] irctc707: the error occurs on the first line
[10:37:58] brotspinne: irctc707: looks like an erb template. is this correct? I assume that "client" is not defined anywhere and you would need to define it first
[10:38:42] irctc707: but wont it be defined because i have it defined in a "parse_ruby_client.rb" file
[10:39:02] mnms_: DylanJ: thx
[10:39:23] tsujp: has joined #RubyOnRails
[10:39:26] brotspinne: irctc707: no "client" is a local variable there. it depends on how you render your template
[10:40:39] irctc707: i mean, in the rb file im talking about where its defined, i have it equal to my API keys. so am i doing something wrong?
[10:41:32] irctc707: ill show you the file.
[10:41:52] Guest38847: has joined #RubyOnRails
[10:42:22] irctc707: http://pastie.org/10319840
[10:43:09] brotspinne: irctc707: where or how do you render the template from the first code?
[10:43:49] irctc707: what do you mean by that? im new to this
[10:43:56] bruno-: has joined #RubyOnRails
[10:44:28] lethjakman: has joined #RubyOnRails
[10:45:20] brotspinne: irctc707: it looks like you try to implement something rather complex and you still need to learn the basics
[10:45:38] sasa: has joined #RubyOnRails
[10:45:55] irctc707: what should i do?
[10:46:36] niiamon: has joined #RubyOnRails
[10:47:11] pontiki: step back and learn some more ruby
[10:48:52] nandx64: has joined #RubyOnRails
[10:49:49] irctc707: what does rendering templates have to do with a gem configuration issue?
[10:50:26] nandx64: has joined #RubyOnRails
[10:53:27] dexter91x: has joined #RubyOnRails
[10:54:12] PhantomSpank: has joined #RubyOnRails
[10:55:17] rodfersou: has joined #RubyOnRails
[10:56:35] universa1: irctc707: it looks like you've a problem with understanding the scoping of variables in ruby.
[10:57:05] universa1: irctc707: the code shown in the readme might not be directly applicable to a rails setup.
[10:57:51] irctc707: from what i understand, you need to create a initializer file, with that code in there.
[10:58:04] universa1: irctc707: you need to adopt the code.
[10:58:12] universa1: irctc707: because a 1 to 1 copy will not work
[10:58:27] universa1: and that is because variable scoping is important.
[10:58:46] irctc707: what do you recommend i do to make it work then?
[10:59:09] universa1: irctc707: learn about variable scoping and understand the solution yourself.
[10:59:41] sinkensabe: has joined #RubyOnRails
[11:00:26] tsujp: has joined #RubyOnRails
[11:01:49] startupality: has joined #RubyOnRails
[11:01:57] universa1: irctc707: http://stackoverflow.com/questions/11495098/difference-between-various-variables-scopes-in-ruby -- as a starting point for things to read about.
[11:04:14] PhantomSpank: has joined #RubyOnRails
[11:04:18] towski_: has joined #RubyOnRails
[11:04:55] cajone: has joined #RubyOnRails
[11:05:31] bruno-: has joined #RubyOnRails
[11:06:20] srinidhi: has joined #RubyOnRails
[11:06:33] chills42: has joined #RubyOnRails
[11:06:46] niiamon: has joined #RubyOnRails
[11:07:12] chills42: has joined #RubyOnRails
[11:09:29] annlewis: has joined #RubyOnRails
[11:15:15] mostlybadfly: has joined #RubyOnRails
[11:15:46] nandx64: has joined #RubyOnRails
[11:16:54] eGGsha: has joined #RubyOnRails
[11:18:11] niiamon1: has joined #RubyOnRails
[11:22:06] mnms_: someone try to use highlightjs with haml ?
[11:22:22] mnms_: I cannot remove indents
[11:23:06] xKraty: has joined #RubyOnRails
[11:23:14] mnms_: basically first indent
[11:23:15] fighella: has joined #RubyOnRails
[11:23:43] artto: has joined #RubyOnRails
[11:23:52] universa1: mnms_: do not use = to insert the content
[11:24:14] universa1: mnms_: haml has another operator, to not indent the inserted text in the output html.
[11:24:23] mnms_: I use preserve
[11:25:03] mnms_: and its almost fine but first line has not needed indent
[11:26:09] universa1: mnms_: try ~ some_content instead of = some_content
[11:26:41] mnms_: universa1: I have plain text there
[11:27:59] mnms_: universa1: https://gist.github.com/anonymous/e30dce49d6a64aea69df
[11:28:15] doodlehaus: has joined #RubyOnRails
[11:28:46] brendan-: has joined #RubyOnRails
[11:29:59] h7br1x: has joined #RubyOnRails
[11:30:24] allcentury: has joined #RubyOnRails
[11:31:24] qejk: has joined #RubyOnRails
[11:31:35] frzn: has joined #RubyOnRails
[11:31:36] frzn: has joined #RubyOnRails
[11:34:58] niiamon: has joined #RubyOnRails
[11:35:47] drale2k: has joined #RubyOnRails
[11:36:46] ldnunes: has joined #RubyOnRails
[11:36:46] arup_r: has joined #RubyOnRails
[11:38:07] niiamon1: has joined #RubyOnRails
[11:39:05] sp1rs1: has joined #RubyOnRails
[11:40:56] DEA7TH: has joined #RubyOnRails
[11:45:07] lethjakman: has joined #RubyOnRails
[11:45:54] nightsh: has joined #RubyOnRails
[11:46:20] npx: has joined #RubyOnRails
[11:46:26] npx: I'm using ruby 2.2.2 via macports, gem install bundler doesn't put the `bundle` executable anywhere in my path... wtf guize
[11:47:10] workmad3: npx: sounds like the macports ruby script doesn't set your environment up correctly
[11:47:15] niiamon: has joined #RubyOnRails
[11:47:27] Silox|: has joined #RubyOnRails
[11:48:16] terpo: has joined #RubyOnRails
[11:49:31] niiamon: has joined #RubyOnRails
[11:53:00] alexfu: has joined #RubyOnRails
[11:53:33] alexfu: I'm trying to write a request spec and I'm getting this error: undefined local variable or method `last_response'
[11:54:05] alexfu: cant quite figure out where last_response is being used
[11:54:10] alexfu: or how to resolve it
[11:54:28] niiamon: has joined #RubyOnRails
[11:55:21] niiamon1: has joined #RubyOnRails
[11:55:37] alfie_max15: has joined #RubyOnRails
[11:56:07] alfie_max15: how can i do something like: validates :amount, numericality: { greater_than: 0 }
[11:56:18] alfie_max15: but here :amount is float
[11:59:58] brotspinne: has joined #RubyOnRails
[12:00:37] Arnie25: has joined #RubyOnRails
[12:01:20] tagrudev: anyone using https://github.com/JangoSteve/remotipart ?
[12:01:44] tagrudev: I am having a problem binding ajax:success when uploading an image
[12:01:50] tagrudev: turbolinks is on
[12:02:18] juanpaucar: has joined #RubyOnRails
[12:04:36] f3ttX]: has joined #RubyOnRails
[12:05:42] ashleyw: has joined #RubyOnRails
[12:06:22] axl_: has joined #RubyOnRails
[12:08:25] arup_r1: has joined #RubyOnRails
[12:09:03] Creeves: has joined #RubyOnRails
[12:09:14] annlewis: has joined #RubyOnRails
[12:11:23] ishahnaz: has joined #RubyOnRails
[12:11:54] mary5030: has joined #RubyOnRails
[12:13:33] nya: has joined #RubyOnRails
[12:13:38] bbrowning_away: has joined #RubyOnRails
[12:15:29] nya: has joined #RubyOnRails
[12:17:17] niiamon: has joined #RubyOnRails
[12:17:19] niiamon1: has joined #RubyOnRails
[12:19:03] fighella: has left #RubyOnRails: ()
[12:19:39] doodlehaus: has joined #RubyOnRails
[12:21:08] leslie: has joined #RubyOnRails
[12:21:08] leslie: has joined #RubyOnRails
[12:21:34] leslie: I've got a .js.erb file but I can't use helpers in it, any idea what I'm doing wrong?
[12:21:37] niiamon: has joined #RubyOnRails
[12:21:47] carlosoliveira: has joined #RubyOnRails
[12:21:57] alfie_max15: has left #RubyOnRails: ("Ex-Chat")
[12:23:38] mary5030: has joined #RubyOnRails
[12:24:30] artto: has joined #RubyOnRails
[12:26:57] startupality: has joined #RubyOnRails
[12:27:13] Grundell: has joined #RubyOnRails
[12:28:06] pontiki: off to werkies
[12:28:33] rustymyers: has joined #RubyOnRails
[12:28:37] carlosd: has joined #RubyOnRails
[12:28:49] momomomomo: has joined #RubyOnRails
[12:29:47] emilkarl: has joined #RubyOnRails
[12:31:09] emilkarl: Using Nginx + Passenger in prod mode. Production logging goes to var/log/nginx/error.log. I have removed gem rails_12factor from :production, deployed and restarted nginx but it still logs in the nginx log and not the rails log?
[12:32:32] Scripore: has joined #RubyOnRails
[12:32:55] eGGsha: has joined #RubyOnRails
[12:33:51] alex88: has joined #RubyOnRails
[12:33:51] alex88: has joined #RubyOnRails
[12:33:51] alex88: has joined #RubyOnRails
[12:33:51] dstarh: has joined #RubyOnRails
[12:35:00] jkamenik: has joined #RubyOnRails
[12:35:30] allcentury: has joined #RubyOnRails
[12:35:55] Ropeney: has joined #RubyOnRails
[12:36:57] TvL2386: has joined #RubyOnRails
[12:37:21] sankaber: has joined #RubyOnRails
[12:38:27] pcpanic: has joined #RubyOnRails
[12:39:09] nandx64: has joined #RubyOnRails
[12:40:07] niiamon: has joined #RubyOnRails
[12:41:19] riscky: has joined #RubyOnRails
[12:43:55] k4nd4lf: has joined #RubyOnRails
[12:46:09] pcpanic: Hello Railsters, I just added a column :class to mt Navigation model and I am getting error '(Object doesn't support #inspect)' when calling Navigation.all from the console - https://gist.github.com/ysinc88/39bcd70055732a234a7b
[12:46:10] chouhoulis: has joined #RubyOnRails
[12:46:14] lethjakman: has joined #RubyOnRails
[12:46:46] mAAArkin: has joined #RubyOnRails
[12:47:58] elia: has joined #RubyOnRails
[12:48:53] momomomomo: pcpanic: http://reservedwords.herokuapp.com/
[12:49:39] pcpanic: momomomomo: Thanks! Renaming the column...
[12:50:39] brotspinne: has joined #RubyOnRails
[12:50:51] czerasz: has joined #RubyOnRails
[12:51:13] bmurt: has joined #RubyOnRails
[12:51:58] wheeee: has joined #RubyOnRails
[12:52:29] strcmp1: has joined #RubyOnRails
[12:54:00] bustrarm: has joined #RubyOnRails
[12:55:16] diegorv: has joined #RubyOnRails
[12:56:48] niiamon: has joined #RubyOnRails
[12:58:51] cornerma1: has joined #RubyOnRails
[12:59:45] DoubleMalt: has joined #RubyOnRails
[13:00:04] ramortegui: has joined #RubyOnRails
[13:00:10] niiamon_: has joined #RubyOnRails
[13:00:49] chills42: has joined #RubyOnRails
[13:01:00] jkamenik1: has joined #RubyOnRails
[13:01:03] iamse7en: has joined #RubyOnRails
[13:02:38] emilkarl: If I open up console in production mode i get the following: http://pastie.org/10320074
[13:03:05] emilkarl: that seems to indicate that it should log to /home/deploy/www/peppster-prod/releases/20150730122647/log/production.log but it doesnt
[13:04:52] niiamon: has joined #RubyOnRails
[13:05:42] shyshy: has joined #RubyOnRails
[13:05:51] Scripore: has joined #RubyOnRails
[13:06:54] shortCircuit__: has joined #RubyOnRails
[13:07:23] startupality: has joined #RubyOnRails
[13:07:34] erich: has joined #RubyOnRails
[13:07:48] sameerynho: how can I permit arrays in strong parameters? key: [] won't work
[13:09:56] livecano: has joined #RubyOnRails
[13:11:13] victortyau: has joined #RubyOnRails
[13:12:40] earthqua_: has joined #RubyOnRails
[13:13:48] andrew9184: has left #RubyOnRails: ()
[13:14:22] nandx64: has joined #RubyOnRails
[13:14:45] EminenceHC: has joined #RubyOnRails
[13:15:13] schaerli_: has joined #RubyOnRails
[13:18:07] doodlehaus: has joined #RubyOnRails
[13:19:00] nightsh: has joined #RubyOnRails
[13:19:22] werelivinginthef: has joined #RubyOnRails
[13:21:24] niiamon: has joined #RubyOnRails
[13:22:23] jrz: has joined #RubyOnRails
[13:23:07] jrz: has joined #RubyOnRails
[13:23:09] Scripore: has joined #RubyOnRails
[13:23:52] jrz: has joined #RubyOnRails
[13:24:05] Hates_: sameerynho: you just permit the name of the parameter
[13:24:09] drale2k: has joined #RubyOnRails
[13:24:20] sameerynho: Hates_: that won't work either
[13:24:36] jrz: has joined #RubyOnRails
[13:24:58] Hates_: sameerynho: what happens when you do key: []? you still get an error?
[13:25:01] mary5030: has joined #RubyOnRails
[13:25:17] artto: has joined #RubyOnRails
[13:25:17] jrz: has joined #RubyOnRails
[13:25:32] sameerynho: unpermitted key
[13:25:39] mary5030: has joined #RubyOnRails
[13:25:47] Hates_: sameerynho: and key is your parameter name right?
[13:25:56] jrz: has joined #RubyOnRails
[13:26:41] jrz: has joined #RubyOnRails
[13:26:52] Hates_: sameerynho: hmmm it should work. can you provide some of your log output as well as your permit code
[13:27:38] sameerynho: Hates_: yeah but in a minute
[13:28:23] shyshy: has joined #RubyOnRails
[13:30:33] artto: has joined #RubyOnRails
[13:31:05] l0oky: has joined #RubyOnRails
[13:32:30] julienk: has joined #RubyOnRails
[13:32:35] armyriad: has joined #RubyOnRails
[13:34:07] sonOfRa: has joined #RubyOnRails
[13:35:01] givanse: has joined #RubyOnRails
[13:35:07] elia: has joined #RubyOnRails
[13:36:24] elia: has left #RubyOnRails: ()
[13:36:36] TeckniX: has joined #RubyOnRails
[13:37:50] beauby: has joined #RubyOnRails
[13:38:56] niiamon: has joined #RubyOnRails
[13:39:07] eGGsha: has joined #RubyOnRails
[13:39:18] iamse7en: has joined #RubyOnRails
[13:40:13] bonhoeffer: has joined #RubyOnRails
[13:40:32] Kedric: has joined #RubyOnRails
[13:41:01] rghose: any alternatives for dbcharmer for rails4 ?
[13:42:14] momomomomo: has joined #RubyOnRails
[13:42:47] JoshL: has joined #RubyOnRails
[13:43:32] Kedric: Alright all, I am going insane. Bootstrap-sass gem does not let me override varaibles before the import or access them after (trying to use $body-bg). https://gist.github.com/anonymous/cb19f7dbc7b671e77054
[13:43:39] Kedric: can anyone see why?
[13:43:48] bonhoeffer: i???m writing a script to update my database with a set of external data ??? i want to use AR instead of raw sql so I get all my validations, etc, is there an example of how to load a script without running all of rails
[13:43:55] mary5030_: has joined #RubyOnRails
[13:44:26] christiandsg: has joined #RubyOnRails
[13:44:32] tvw: has joined #RubyOnRails
[13:44:35] dda: has joined #RubyOnRails
[13:44:36] bonhoeffer: i guess the best thing would be to make a rake task
[13:44:54] mary5030_: has joined #RubyOnRails
[13:46:02] l0oky: bonhoeffer: set of external data?
[13:46:12] bonhoeffer: no ??? other database from an old app
[13:46:25] bonhoeffer: so i guess i just do: conn = PG::Connection.open(:dbname => 'booher_family')
[13:46:37] srinidhi: has joined #RubyOnRails
[13:47:29] bonhoeffer: https://gist.github.com/tbbooher/7ec5d30f632b324bad03
[13:47:31] l0oky: migrating your old database huh? :D well that can be hard..
[13:47:43] bonhoeffer: my script ??? that i need to bring into rake
[13:48:11] l0oky: Is your data in old database valid?
[13:48:23] l0oky: i mean do they pass all the validations you need?
[13:48:46] bonhoeffer: that is why i have the script
[13:49:00] bonhoeffer: it cleans the data appropriately
[13:49:11] bonhoeffer: and gets it all into the right hashes
[13:49:12] chridal: has joined #RubyOnRails
[13:49:19] bonhoeffer: now i need to load into dB
[13:49:58] bonhoeffer: i think i got it ??? but looking for any feedback
[13:50:29] universa1: why do you not want to load rails? it's not that your script would be run that often that loading time savings actually mattered ;)
[13:51:46] l0oky: does the connection open? why don't you use ActiveRecord::Base.establish_connection ?
[13:52:14] bonhoeffer: was thinking about that ??? and i think now, i???ll use rake with the right environment
[13:52:21] bonhoeffer: then i get all of rails goodness
[13:52:29] universa1: bonhoeffer: sounds sensible.
[13:53:27] bonhoeffer: the only piece i???m not sure about is the use of ???pg??? versus existing rails ??? but my other database doesn???t have models ??? it is just data, so i think my own connection is fine
[13:54:00] Mago_joao: has joined #RubyOnRails
[13:54:08] universa1: bonhoeffer: sounds ok, you could also dump your old data to csv or alike and import that.
[13:54:34] djbkd_: has joined #RubyOnRails
[13:54:38] bonhoeffer: that would allow me to fix things in excel that otherwise require a lot of logic
[13:55:05] bonhoeffer: and provides a good environment to visualize the data to import
[13:55:10] universa1: bonhoeffer: sounds also simpler for me to redo in production ;)
[13:55:32] bonhoeffer: well, the thought is to get a good db, then push that to production
[13:55:37] bonhoeffer: the site is new ??? with no users
[13:55:43] busterarm: has joined #RubyOnRails
[13:55:51] universa1: bonhoeffer: ahh i see :-) yeah ok than, it doesn't really matter i guess
[13:56:51] Mago_joao: There's any way to count how many user_id a report table has(report record user who did it), but using something like this = @user.each do |f| <% user.count(@report.user_id => user.id) %>
[13:57:24] annlewis: has joined #RubyOnRails
[13:57:46] l0oky: Should I use PORO presenters instead of draper decorators?
[13:57:48] universa1: Mago_joao: Report.where(user_id: user.id).count ?
[13:57:52] shock_one: has joined #RubyOnRails
[13:58:01] universa1: l0oky: that is something you need to decide yourself
[13:58:16] Mago_joao: yes, like this
[13:59:14] devdazed: has joined #RubyOnRails
[13:59:42] darrencauthon: has joined #RubyOnRails
[13:59:45] garrypolley: has joined #RubyOnRails
[14:00:47] brazenbraden: has joined #RubyOnRails
[14:00:49] blackmesa: has joined #RubyOnRails
[14:00:58] livathinos: has joined #RubyOnRails
[14:01:11] Diabolik: what's everyone's thoughts on the latest github drama?
[14:01:27] Palsson: has joined #RubyOnRails
[14:01:32] universa1: which drama?
[14:01:51] l0oky: github drama?
[14:01:52] Diabolik: https://github.com/nixxquality/WebMConverter/commit/c1ac0baac06fa7175677a4a1bf65860a84708d67
[14:01:58] Fire-Dragon-DoL: has joined #RubyOnRails
[14:02:11] Diabolik: they disabled a repo for using the word "retard"
[14:02:45] wheeee: has joined #RubyOnRails
[14:04:02] DEA7TH: I have this in my routes file: match '/cgi-bin/*source_file/:digi_id',
[14:04:03] DEA7TH: to: 'redirector#bathomatic_request',
[14:04:04] DEA7TH: via: [:get, :post]
[14:04:49] DEA7TH: Accessing /cgi-bin/something/1 works, but not /cgi-bin/something/ 
[14:05:19] zorak8: has joined #RubyOnRails
[14:06:21] shock_one: has joined #RubyOnRails
[14:07:06] k4nd4lf: has joined #RubyOnRails
[14:08:08] DEA7TH: I get Routing Error No route matches [GET] "[the URL I accessed]"
[14:08:36] n1lo: has joined #RubyOnRails
[14:09:04] DEA7TH: I figured it out.
[14:12:00] sonOfRa: has joined #RubyOnRails
[14:12:03] siddart: has joined #RubyOnRails
[14:12:20] dopie: has joined #RubyOnRails
[14:16:23] jschoolcraft: has joined #RubyOnRails
[14:16:33] Coldblackice: has joined #RubyOnRails
[14:18:53] shock_one: has joined #RubyOnRails
[14:18:58] Mago_joao: universa1: im getting undefined method `where' for nil:NilClass when <td><%= user.relato.where(user_id: user.id).count %></td>
[14:19:02] krz: has joined #RubyOnRails
[14:19:20] jschoolcraft: has joined #RubyOnRails
[14:19:22] fdsajiosdf: has joined #RubyOnRails
[14:19:22] Mago_joao: <% @users.each do |user| %>, thought it was due nill at table but checked andd it is not
[14:19:28] rvanlieshout: Mago_joao: 1) your user doesn't have a relato
[14:19:35] leesharma: has joined #RubyOnRails
[14:19:46] rvanlieshout: 2) a belongs_to doesn't have a where
[14:19:56] l0oky: Can I put something like this in my view `@view.show_this? @view.show_that?` ? How can I define that?
[14:20:10] DCio: has joined #RubyOnRails
[14:20:30] universa1: rvanlieshout: helpers ;)
[14:20:30] werelivi_: has joined #RubyOnRails
[14:21:16] DCio: So I need help optimizing database code, because right now its take 45+ seconds to add like 1500 rows to the DB
[14:21:34] Mago_joao: rvanlieshout: 2) user belongs_to relato and relto has_many users
[14:21:47] rvanlieshout: Mago_joao: so your specific user doesn't have a relato
[14:21:51] rvanlieshout: and 2) a belongs_to doesn't have a where
[14:21:59] rvanlieshout: DCio: go ahead... :)
[14:22:04] l0oky: rvanlieshout: Sorry for not being clear, I want to define a class with show_this?, show_that? methods so I can use them into my view template
[14:22:22] rvanlieshout: l0oky: only for usage in views?
[14:22:29] DCio: im pretty sure most of the overhead is coming from ruby instantiating the objects, is there a way to add rows to the DB without having activerecord make all the objects?
[14:22:32] rvanlieshout: use the helpers for that
[14:22:44] rvanlieshout: DCio: there is an activerecord import gem
[14:23:00] DCio: Also let me show you my code and maybe you can point out some flaws
[14:23:01] DCio: its probably pretty nasty :)
[14:23:22] Mago_joao: rvanlieshout: in the table relato i column user_id there are an id pointing to the user_id, sorry, i dont know what u mean to belongs doesnt have a where
[14:23:34] chills42: has joined #RubyOnRails
[14:23:37] universa1: Mago_joao: !associations
[14:23:37] helpa: Mago_joao: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[14:23:46] DCio: so the code is here: https://gist.github.com/dciotoli/248c7fdb41ac4591f86a
[14:23:55] sarink: has joined #RubyOnRails
[14:24:05] DCio: its supposed to parse a big CSV file and store it in the DB
[14:24:07] lsone: has joined #RubyOnRails
[14:24:15] l0oky: Why do I hear people don't like helpers?
[14:24:20] DCio: by big i mean like 1500-1600 rows so not THAAAT big
[14:24:28] rvanlieshout: Mago_joao: i mean you just cannot user .where on a belongs_to association cause it would not make sense
[14:24:32] DCio: all i know is it should be taking like 1 second not 45 seconds
[14:24:37] rvanlieshout: and you're trying to access a property of a user that that user doesn't have
[14:24:45] rvanlieshout: DCio: i'll open that in a min
[14:25:02] drale2k: has joined #RubyOnRails
[14:25:05] DCio: rvanlieshout: thanks
[14:25:33] sarink: has joined #RubyOnRails
[14:26:40] rvanlieshout: DCio: ah right. something like this
[14:26:41] workmad3: DCio: I'd suggest you start by running a profiler with that request locally (you could look @ ruby-prof, or make use of the local profiling available in the newrelic_rpm gem)
[14:26:50] rvanlieshout: the issue with this isthat here are ways to improve the speed for sure
[14:26:53] niiamon: has joined #RubyOnRails
[14:26:54] rvanlieshout: but it's never going to be < 1 sec
[14:27:05] rvanlieshout: so you should in any way move it to the background
[14:27:20] workmad3: DCio: it's most likely spending a lot of time creating objects, but a big chunk of time will also be spent a) reading the file, b) parsing it as CSV
[14:27:25] livecano: has joined #RubyOnRails
[14:27:41] DCio: Im fairly certain that most of the time is spent creating the objects
[14:27:42] l0oky: rvanlieshout: Can I make helpers that are visible only, for example, to dashboard.html.erb and It's partials and none else?
[14:27:56] Mago_joao: rvanlieshout: considering that i have a report table which stores user id , im using this code to try to count how many reports the user made, all this in a "index" scaffold like of user, is this even possibile?
[14:28:04] workmad3: DCio: 'fairly certain' != 'I've run a profiler and checked this assumption'... never optimise without profiling ;)
[14:28:07] nyamurk: has joined #RubyOnRails
[14:28:16] DCio: hahaha very true
[14:28:17] nzst: has joined #RubyOnRails
[14:28:20] rvanlieshout: l0oky: there is a dashboard_helpers
[14:28:33] l0oky: cool thanks
[14:28:48] workmad3: DCio: I've had file uploads where just *reading* the file has taken 10s of seconds
[14:28:58] rvanlieshout: Mago_joao: could you explain the relationship between user and report again?
[14:29:04] shock_one: has joined #RubyOnRails
[14:29:24] DCio: so how does one go about profiling
[14:29:30] DCio: ruby-prof gem?
[14:29:45] badmadrad: has joined #RubyOnRails
[14:29:52] willywos: has joined #RubyOnRails
[14:30:32] Mago_joao: rvanlieshout: when someone sends a new report, there is this field <%= f.hidden_field(:user_id, :value => current_user.id) %> , it's working, in models im using has_many_and_belongs_to to users and reports
[14:31:01] workmad3: DCio: ruby-prof or newrelic_rpm are good starting points
[14:31:57] DCio: thanks, ill get to profiling the code, then ill see what I can do as far as optimizations for each step of the code go. Optimizing in ruby feels kind of... silly :P
[14:32:00] wheeee1: has joined #RubyOnRails
[14:32:39] l0oky: rvanlieshout: Is there a reason to not use helpers? Cause I hear a lot of bad stuff about it.
[14:32:40] darrencauthon: has joined #RubyOnRails
[14:34:52] tbuehlmann: l0oky, nothing against helpers in general, but often times you should have used an object instead of the helpers
[14:34:54] lethjakman: has joined #RubyOnRails
[14:34:56] DoubleMalt: has joined #RubyOnRails
[14:34:58] tbuehlmann: like a decorator/presenter
[14:35:23] blackmesa: has joined #RubyOnRails
[14:35:52] l0oky: tbuehlmann: Aham okay thanks. Now I am putting those pieces together in my head :D
[14:36:26] rickmasta: has joined #RubyOnRails
[14:36:39] rvanlieshout: helpers are ok
[14:36:45] rvanlieshout: for small view related things
[14:37:01] rvanlieshout: you could consider moving to decorators if you really just creating helpers to decorate an object
[14:37:36] l0oky: Yup, I am already using those. But I was stuck because I just needed somthing simple like that show_this? method
[14:38:49] maxdoubt: has joined #RubyOnRails
[14:39:25] tenderlove: has joined #RubyOnRails
[14:39:43] Fly80: has joined #RubyOnRails
[14:40:06] beauby: Guys, any simple way to make a string column as primary key nowadays?
[14:40:48] universa1: beauby: you shouldn't with rails.
[14:40:48] leex: Hi, I have a serialize :foo, Hash in one of my models and if I do record.foo[:bar] += 1 and don't do a record.save it won't get updated, but it gets update whenever I do record.foo[:bar] -= 1. what's the reason behind this?
[14:40:50] rvanlieshout: beauby: nobody has a good reason to do so :)
[14:41:03] rvanlieshout: leex: that's because it's not marked as dirty
[14:41:10] rvanlieshout: rails doesn't catch all methods that change a variable for that
[14:41:12] universa1: beauby: keep the default pk, and add a unique index on your string column.
[14:41:19] rvanlieshout: same with user.name.upcase!
[14:41:23] rvanlieshout: vs user.name = user.name.upcase
[14:41:37] rvanlieshout: you could use record.foo[:bar] += 1
[14:41:43] rvanlieshout: and use record.foo_will_change!
[14:42:00] axl__: has joined #RubyOnRails
[14:42:14] beauby: universa1: Is the `id` column used internally by rails? Otherwise I don't see the point of having a column around that is never used
[14:42:18] jas02: has joined #RubyOnRails
[14:42:41] rvanlieshout: it's not that it has to be 'id'. it's because string primary rows are slow
[14:42:59] hfp_work: has joined #RubyOnRails
[14:42:59] leex: rvanlieshout: so rather record.foo[:bar] += 1; record.foo_will_change! instead of record.save ?
[14:43:21] rvanlieshout: yeah. it's just because of that dirty flag
[14:43:24] Mago_joao: def user_report Relato.where(user_id: @user.id).count end <td><%= user_report %></td> didnt come up with any error, but count showed 0 when it should be 1
[14:43:25] hfp: has joined #RubyOnRails
[14:43:43] rvanlieshout: Mago_joao: i'm heading home, but look at the sql that produces and prove that it should be 1
[14:44:23] l0oky: I need to set a helper method if a parameter in show action is present.. is that possible?
[14:44:23] Mago_joao: User Load (0.5ms) SELECT "users".* FROM "users" (0.3ms) SELECT COUNT(*) FROM "relatos" WHERE "relatos"."user_id" IS NULL
[14:44:38] rvanlieshout: l0oky: you can just access params in it
[14:44:40] rvanlieshout: Mago_joao: there you go :)
[14:44:45] leex: rvanlieshout: is there a list which methods set dirty and which don't?
[14:44:55] rvanlieshout: leex: not really.. just assume only = does that
[14:45:04] rvanlieshout: there are really a lot of methos that have that issue
[14:45:11] jas02: has joined #RubyOnRails
[14:45:13] rvanlieshout: and it's not really easy to fix
[14:45:20] rvanlieshout: without e.g. consuming a lot of memory
[14:45:41] l0oky: accessing parameters from some action in a helper?
[14:45:44] rvanlieshout: leex: just don't use in place replacement
[14:46:01] rvanlieshout: back tomorrow!
[14:47:21] umgrosscol: has joined #RubyOnRails
[14:48:13] kies^: has joined #RubyOnRails
[14:48:18] jobewan: has joined #RubyOnRails
[14:51:15] Kedric: What is an easy way to edit a nested hstore via html?
[14:51:21] bruno-: has joined #RubyOnRails
[14:51:26] hfp: has joined #RubyOnRails
[14:51:28] blackmesa: has joined #RubyOnRails
[14:52:00] hfp_work: has joined #RubyOnRails
[14:52:18] tbuehlmann: kedric, postgres hstore?
[14:52:19] Mago_joao: universa1: there is any way to make the help get the id of the user ?
[14:52:40] universa1: Mago_joao: in which variable is the user?
[14:52:42] Kedric: tbuehlmann: correct.
[14:52:53] universa1: Mago_joao: since the helper is justa method call, pass the correct user object in.
[14:53:08] tbuehlmann: it can be nested? I was of the impression that it's flat
[14:53:56] Mago_joao: universa1: def new @user = User.new @users = User.all end ,is that what you mean?
[14:54:28] universa1: Mago_joao: enter @user = User.new in the console and look at the id attribute of it. do you notice something?
[14:55:46] seank_: has joined #RubyOnRails
[14:55:51] darrencauthon: has joined #RubyOnRails
[14:55:57] dman777_alter: has joined #RubyOnRails
[14:55:59] Mago_joao: universa1: everythig is nil, u mean, that there are no information given to the object ?
[14:56:15] universa1: Mago_joao: new users don't have an id until they're saved.
[14:56:33] universa1: Mago_joao: the database assigns the primary key (id) on insert.
[14:57:55] paulcsmith: has joined #RubyOnRails
[14:59:08] paulcsmith: has joined #RubyOnRails
[14:59:12] jkamenik: has joined #RubyOnRails
[14:59:24] atmosx: has joined #RubyOnRails
[14:59:36] Mago_joao: universa1: im usig new.html.erb to make an all in page, with a bunch of jquery to hide and show everything, dunno how to make it better, this is why it's made this way... I got this code : Relato.where(user_id: @users.all).count , and now is counting all reports from all users ofc. It's an advance i guess
[14:59:44] atmosx: is there any "good" way to share programming env/database setup between two different computers?
[15:00:24] atmosx: up to know I use bitbucket... but it's still a pain, sometimes I forget to commit or I'm working on a new branch and I'm making a mess.
[15:00:37] atmosx: anyone tried using docker?
[15:01:03] dman777_alter: Even thought params[:meta] shows as "current" when I puts it, if params[:meta] == "current" does not test true. Why is this?
[15:01:28] universa1: Mago_joao: a new user does not have any reports. so what count do you conceptually want to show there?!
[15:02:12] Mago_joao: i think i got it
[15:04:01] DCio: workmad3: So i profiled the code
[15:04:16] Mago_joao: universa1: please have a look in my code, new.html.erb https://gist.github.com/JjAnn/dc9855f5193940b74ceb https://gist.github.com/JjAnn/8e10bdf2d7cc610018ca im too stupid to explain this in a right way, sorry
[15:04:19] DCio: workmad3: I dont think the results were very helpful
[15:04:34] tenderlove: has joined #RubyOnRails
[15:05:17] Kedric: tbuehlmann: nested-hstore gem
[15:05:52] Kedric: atmosx: are you talking about source code or environment set up?
[15:05:55] universa1: Mago_joao: you can add multiple files to one gist
[15:05:58] universa1: Mago_joao: !gist-usage
[15:05:58] helpa: Mago_joao: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[15:06:16] tbuehlmann: kedric, ah, okay. I personally would switch to json or jsonb for a nested structure, though
[15:06:37] Scripore: has joined #RubyOnRails
[15:06:37] Kedric: tbuehlmann: ill take a look, what???s the difference between them?
[15:06:39] Mago_joao: i got that when @user.id it call back to @user = User.new great knowledge
[15:06:51] michaeldeol: has joined #RubyOnRails
[15:07:00] dopie: Has anyone worked with the Carmen-Rails gem?
[15:07:01] tbuehlmann: kedric, you mean between json and jsonb?
[15:07:14] Kedric: tbuehlmann: mostly json vs hstore
[15:07:37] tbuehlmann: to me, hstory is a flat key value store without nesting. json and jsonb store, well, json documents
[15:07:39] tubbo: i thought hstore was recommended on pg because you can query on keys inside the object, whereas with json you can't
[15:07:52] tubbo: oh yeah, you can't nest hstore :D
[15:08:11] tbuehlmann: also, it's now possible to index stuff even in json documents
[15:08:21] Mago_joao: universa1: teach me more
[15:08:25] tubbo: ahh that's nice
[15:08:40] dman777_alter: how could I test the value of params.has_key?(:current)?
[15:08:43] tubbo: i might have to take a second look at jsonb, as it would form a nice middle-ground between postgres and mongodb
[15:08:51] tbuehlmann: indexing json is not that easy, but indexing jsonb is
[15:09:01] beauby: has joined #RubyOnRails
[15:09:09] nandx64: has joined #RubyOnRails
[15:09:18] tbuehlmann: http://nandovieira.com/using-postgresql-and-jsonb-with-ruby-on-rails
[15:09:28] tubbo: dman777_alter: if you're looking for params[:meta] to have the value 'current', then has_key? isn't going to give you what you want..
[15:09:32] wheeee1: has joined #RubyOnRails
[15:09:40] tubbo: gem install pongoid ;)
[15:09:55] rghose: has joined #RubyOnRails
[15:10:44] startupality: has joined #RubyOnRails
[15:10:52] atmosx: kedric: environment setup
[15:11:09] Kedric: atmosx: is it safe to assume you are on os x?
[15:11:16] atmosx: kedric: spot on
[15:11:41] DCio: anyone want to tell me what this means? https://gist.github.com/dciotoli/4b7d606a44299cf8d909
[15:11:55] drale2k: has joined #RubyOnRails
[15:11:58] DCio: i profiled my code in an attempt to optimize it because its garbage but not really sure what to do with the results
[15:12:46] DCio: here is the code itself: https://gist.github.com/dciotoli/248c7fdb41ac4591f86a
[15:12:48] tubbo: atmosx: a lot of people use "dotfile repos" and there are various methods for keeping them up to date. i wrote a shell plugin called `homer` that makes a lot of that easier.
[15:12:52] richipargo: has joined #RubyOnRails
[15:13:06] atmosx: tubbo: link / blog-post?
[15:13:23] tubbo: atmosx: for example, here's my home dir repo...which by default includes dotfiles but also includes anything i have in my home dir that i wish to save or sync between computers -> github.com/tubbo/home
[15:13:27] tubbo: sorry, https://github.com/tubbo/home
[15:13:40] tubbo: atmosx: and here's the tool that makes it possible/easier https://github.com/tubbo/homer
[15:13:47] malcolmva: has joined #RubyOnRails
[15:14:06] riotjones: has joined #RubyOnRails
[15:14:37] beauby: Guys, if I have a var column_name, how would I go around doing a Model.find_by(`column_name`: value)?
[15:15:20] tbuehlmann: beauby, Model.find_by(column_name => value)
[15:15:45] beauby: tbuehlmann: oh, right, thanks!
[15:17:55] atmosx: tubbo: thanks
[15:19:04] marr: has joined #RubyOnRails
[15:20:49] gavit: anyone use cpanel? I am trying to get RoR running on it, but it looks like it's installing rails 2.
[15:20:59] nzst: Hi, what's a clean way to 'clear out' an active record attribute and save? say a published_at field
[15:21:13] riotjones: has joined #RubyOnRails
[15:21:51] universa1: nzst: record.update published_at: nil
[15:22:01] Gnut: has joined #RubyOnRails
[15:22:22] nzst: universa1: thank you for the quick response
[15:22:43] werelivinginthef: has joined #RubyOnRails
[15:22:44] Kedric: atmosx: We use ansible to set up and provision everything here. We use vagrant/virtualbox locally with mirrors of our production vm
[15:23:17] asheinfeld: has joined #RubyOnRails
[15:23:32] momomomomo: has joined #RubyOnRails
[15:25:35] dda: has left #RubyOnRails: ("logging out.")
[15:26:33] tenderlove: has joined #RubyOnRails
[15:27:23] niiamon: has joined #RubyOnRails
[15:28:18] asheinfeld: has joined #RubyOnRails
[15:28:32] shock_one: has joined #RubyOnRails
[15:28:32] startupality: has joined #RubyOnRails
[15:28:58] Contigi: has joined #RubyOnRails
[15:29:14] l0oky: has joined #RubyOnRails
[15:29:34] l0oky: Hello again
[15:29:43] n1lo: has joined #RubyOnRails
[15:30:13] atmosx: kedric: I'm a one-man show heh
[15:30:55] Kedric: atmosx: me too! or I used to be at least lol. I sit more managerial and dev ops now (android, iOS, win 8, rails and veeva projects)
[15:31:22] tejasmanohar_: has joined #RubyOnRails
[15:31:42] tubbo: "we" => "me, but i want to look more important"
[15:31:58] tubbo: in terms of READMEs, documentation, and giving advice on your workflow
[15:32:26] atmosx: kedric: sounds cool, ansible apart that setup is what I had in mind. Another option would be to develop via SSH.
[15:33:24] richipargo: has joined #RubyOnRails
[15:33:29] tubbo: until OS X gets some kind of kernel virtualization/container support, i'm sticking with local dev
[15:33:31] Kedric: atmosx: do you set up your production environments or do you use heroku?
[15:33:50] Kedric: tubbo: I wish, but running on vm seems much cleaner and less bloat
[15:33:53] Kedric: it is a bit slower though
[15:33:59] DukeDave: has joined #RubyOnRails
[15:34:03] tubbo: remote dev is slow and cumbersome, and in my experience produced poorer-quality software.
[15:34:42] Kedric: tubbo: agreed with my single data point. What about local vms?
[15:35:05] tubbo: kedric: how is it "less bloat" to run an entire operating system just for one application inside a virtual machine than to just run that application on the base system?
[15:35:24] eichenwald: has joined #RubyOnRails
[15:35:32] tubbo: well local VMs *would* be great if i didn't have to use that piece of shit that Oracle calls "VirtualBox"
[15:35:41] atmosx: kedric: I setup my own VPSs for my projects. But for this I'm going to use Heroku. I've used it only once in the past.
[15:35:42] tubbo: jesus christ what a pile of suck that program is
[15:35:59] asheinfeld: has joined #RubyOnRails
[15:36:02] atmosx: kedric: simple rails app w/ psql db and some JS.
[15:36:04] tubbo: first year i installed it, if you did some stupid shit like call `date` or whatever on your guest OS, it would just kernel panic THE ENTIRE SYSTEM
[15:36:08] Kedric: tubbo: when you have conflicting ruby versions and gems, and dealing with android, ios, and other platforms I see it as bloatier. Vm???s also remove the whole ???it works on my machine but not yours
[15:36:13] brianpWins_: has joined #RubyOnRails
[15:36:35] tubbo: it ate up resources like no tomorrow
[15:36:54] Kedric: yeah, I agree with that. It is pretty hungry
[15:37:07] Kedric: but how do you handle keeping the env up todate on everyones machines?
[15:37:19] tubbo: kedric: my problem is less with the idea of VMs, and more with how they are executed on Mac OS X. if you want to use virtualization, i highly suggest using linux for development as you can run containers natively.
[15:37:40] l0oky: Is there a good way to check url parameter of an action in a helper method?
[15:37:54] Kedric: tubbo: +1 on the linux part, -1 for when I have to do iOS dev.
[15:38:01] Kedric: mostly at the same time
[15:38:08] tubbo: kedric: haha true...i'm glad i don't have to do that very often :)
[15:38:12] ivanskie: has joined #RubyOnRails
[15:38:24] tubbo: it would be really sweet if apple released the compiler tools for their apps to linux devs, so we could really get to work
[15:38:30] tubbo: s/apps/OSes
[15:38:50] Cache_Money: has joined #RubyOnRails
[15:38:54] acti0nman: has joined #RubyOnRails
[15:38:55] l0oky: I have like a parameter group_name in the url and want to make selected_group helper method that will find a group model and return it.
[15:39:06] dopie: tubbo, you ever mess with the ActiveAdmin gem?
[15:39:28] Sylario: active admin is a bad idea
[15:39:40] dopie: Sylario, tell me about it
[15:39:43] niiamon: has joined #RubyOnRails
[15:39:51] tubbo: dopie: i used it a few years ago for a purely internal app. would not recommend it, even for that use case. we ended up having to monkey-patch some shit to get the chart on the homepage to work. much easier to just build your own admin.
[15:39:59] karmapolice: has joined #RubyOnRails
[15:40:13] tenderlove: has joined #RubyOnRails
[15:40:20] tubbo: admin is more about the front-end than the back-end...
[15:40:21] dopie: tubbo, I know this project is stuck in it... I can't really get out of it
[15:40:28] tubbo: dopie: why not?
[15:40:32] Sylario: dopie: as soon as you want more than basic crud his DSL is lacking
[15:40:45] dopie: tubbo, money and time
[15:40:47] Lightsword: has joined #RubyOnRails
[15:41:07] l0oky: Is there some internal current_path with parameters helper method i can use?
[15:41:10] Kedric: dopie: I have used both, and for out of the box I like rails_admin better. It falls off quickly though
[15:41:31] Sylario: i used rails admin less thatn Active admin, but it fell less painful
[15:41:34] tubbo: dopie: there's a lot of activeadmin resources out there though, at least. i found it pretty simple to override and screw with.
[15:41:42] dopie: I'm just trying to implement carmen_rails and active admin
[15:41:44] shock_one: has joined #RubyOnRails
[15:42:02] dopie: running into brick walls
[15:42:26] Kedric: dopie: carmen is no longer supported, what feature are you trying to add specifically? Maybe we know of another way to do it
[15:42:34] tubbo: l0oky: so you just want selected_group to do a find_by on Group for params[:group_name]?
[15:42:42] dopie: kedric, still on a 3.1 rails app
[15:42:46] dopie: so I still can use it
[15:42:52] l0oky: tubbo: and I want selected_group to be a helper method
[15:42:53] Kedric: dopie: nvm then lol
[15:43:03] centrx: has joined #RubyOnRails
[15:43:06] tubbo: l0oky: ok
[15:43:15] tubbo: l0oky: seems easy enough to me
[15:43:18] l0oky: Is it possble?
[15:43:25] chipotle: has joined #RubyOnRails
[15:43:27] tubbo: l0oky: of course it's possible, this is a turing-complete language
[15:43:31] tubbo: you can do anything you want
[15:43:46] tubbo: and afaik you live in a free country
[15:43:48] tubbo: so go ahead
[15:43:55] niiamon_: has joined #RubyOnRails
[15:43:55] l0oky: you wanna help?
[15:44:00] hosh__: has joined #RubyOnRails
[15:44:04] l0oky: ok then :(
[15:44:12] tubbo: l0oky: because i know you can do it yourself :)
[15:44:15] tubbo: you are good enough
[15:44:24] l0oky: i need some pointers though
[15:44:27] tubbo: i've seen you in here and you know what you're doing, i don't think you need me to hand-hold you
[15:44:40] tubbo: l0oky: why not try it out first, and then if you have issues hit me up and i'll help you sort them out
[15:44:46] tubbo: err, try out what you were thinking first*
[15:44:48] towski_: has joined #RubyOnRails
[15:45:03] l0oky: I tried it selected_group is not visible through all my views
[15:45:15] tubbo: l0oky: !ask
[15:45:15] helpa: l0oky: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[15:45:18] l0oky: I can't pass it as a local in a partial if I make it an instance
[15:45:25] tubbo: not sure if you ever read that, but it really helps...if you just start out with
[15:45:36] AzaToth: has joined #RubyOnRails
[15:45:40] tubbo: "i can't see the selected_group helper method in all my views, here's my code: <gist>", it would be a lot easier
[15:45:42] l0oky: yeah ill post some codee
[15:45:50] ebryn: has joined #RubyOnRails
[15:46:19] n1lo: has joined #RubyOnRails
[15:46:21] tubbo: l0oky: starting out with code and a full description of your problem is a better way of getting help than begging someone to do the work for you. i'm not going to do that.
[15:46:29] tubbo: but i will help you with your issue
[15:46:38] l0oky: didn't really beg but ok
[15:48:36] asheinfeld: has joined #RubyOnRails
[15:49:10] pingpong11: has joined #RubyOnRails
[15:49:45] carlosd: has joined #RubyOnRails
[15:50:00] dopie: kedric, want to take a look at it and help me out?
[15:50:13] Kedric: dopie: sure, gist me the code
[15:50:28] dopie: kedric, well I can't gist can you screen hero with me?
[15:50:51] bonhoeffer: has joined #RubyOnRails
[15:50:53] bonhoeffer: something like m.send(:author) ??? ah ??? yes it works
[15:50:57] Kedric: dopie: can you give me web link or do I have to install something?
[15:51:27] dopie: kedric, ill send you an invite whats your email
[15:51:48] bonhoeffer: but i can???t assign: j.send(:description) = 'foo' syntax error, unexpected '=', expecting end-of-input
[15:51:54] Kedric: dopie: pmed
[15:52:01] mxrguspxrt: has joined #RubyOnRails
[15:52:24] bruno-: has joined #RubyOnRails
[15:52:47] tubbo: bonhoeffer: you have to do j.send :description=, 'foo'
[15:53:02] bonhoeffer: hmm . . . why?
[15:53:10] bonhoeffer: the comma in there ??? new to me
[15:53:38] bonhoeffer: anyway ??? i get: ArgumentError: wrong number of arguments (1 for 0)
[15:53:43] tubbo: bonhoeffer: the method is actually called "description=" and you are sending the argument 'foo' to it. that space between the attr and its '=' in the method is just syntax sugar to make ruby look more like other languages. the reason why it works this way is because every method in ruby is just a message you pass to the object it's being called on.
[15:53:50] tubbo: bonhoeffer: that includes setters and getters
[15:54:07] bonhoeffer: ah ??? that helps
[15:54:18] shock_one: has joined #RubyOnRails
[15:54:19] tubbo: bonhoeffer: does your description= method take an argument?
[15:54:33] tenderlove: has joined #RubyOnRails
[15:54:34] bonhoeffer: it is an active record method
[15:55:28] lalalaaa: has joined #RubyOnRails
[15:55:42] AzaToth: has joined #RubyOnRails
[15:55:45] bonhoeffer: i should call it an attribute
[15:55:47] tubbo: bonhoeffer: why not use j.update(description: 'foo')
[15:56:02] tubbo: seems a little more readable to me and you get the added benefit of it also persisting to the DB
[15:56:07] tubbo: if that is a benefit haha
[15:56:11] bonhoeffer: well, i need to load that dynamically
[15:56:16] startupality: has joined #RubyOnRails
[15:56:23] bonhoeffer: so description changes
[15:56:40] AzaToth: has joined #RubyOnRails
[15:56:46] bonhoeffer: but maybe write_attribute
[15:56:47] tubbo: bonhoeffer: you can give it a dynamic key by doing j.update(key => value). 'key' can be any symbol or string.
[15:56:55] tubbo: write_attribute works too
[15:57:10] bonhoeffer: http://www.davidverhasselt.com/set-attributes-in-activerecord/
[15:57:16] lalalaaa: Is it just me or is everybody migrating from SQL to Neo4j?
[15:57:23] AzaToth: has joined #RubyOnRails
[15:57:35] ellisTAA: has joined #RubyOnRails
[15:57:41] tubbo: lalalaaa: somebody lives in the bay area ;)
[15:57:48] asheinfeld: has joined #RubyOnRails
[15:58:03] tubbo: i just started using neo4j the other day to see if it would work out for this project i'm starting
[15:58:14] ellisTAA: my js isn???t showing up in my rails app ???
[15:58:26] tubbo: thought it was pretty cool coming from Mongoid and all that, but there's still way more support for Mongoid in the Rails world than Neo4j. i did enjoy the ActiveRel thing though
[15:58:27] ellisTAA: shouldn???t it just show up if i put it in the javascripts folder?
[15:58:28] jscheel: has joined #RubyOnRails
[15:58:40] tubbo: feels like that would be *really* useful here rather than Mongoid's stupid "aggregations" thing
[15:58:43] bonhoeffer: tubbo: thanks for the help! and theory too
[15:58:54] AzaToth: has joined #RubyOnRails
[15:59:05] tubbo: EllisTAA: you mean public/javascripts or app/assets/javascripts?
[15:59:21] ellisTAA: app>assets>javascripts
[15:59:26] shock_one: has joined #RubyOnRails
[15:59:30] l0oky: tubbo: https://gist.github.com/l0oky/74f058c55585288574e1 Here's what I currently have, I want to somehow make selected_group a helper method so I don't have issues while passing it into a local of a parital
[15:59:31] htmldrum: has joined #RubyOnRails
[15:59:33] ellisTAA: i put a new js file in there and it isn???t working
[16:00:16] AzaToth: has joined #RubyOnRails
[16:01:09] l0oky: EllisTAA: You have to `//= reqire name.js` in the app/assets/javascript/application.js
[16:01:13] shock_one: has joined #RubyOnRails
[16:01:20] lalalaaa_: has joined #RubyOnRails
[16:01:24] l0oky: for it to be loaded
[16:02:47] tubbo: although spell it 'require' :)
[16:02:49] ellisTAA: !!! oooo ok
[16:02:57] tubbo: sprockets ftw
[16:02:59] shock_one: has joined #RubyOnRails
[16:03:37] l0oky: no quotes dude :D
[16:03:46] l0oky: /= require name.js
[16:03:58] garrypolley: has joined #RubyOnRails
[16:03:59] l0oky: lol irc swallows one /
[16:04:18] dpritchett: has joined #RubyOnRails
[16:04:44] tubbo: l0oky: if you want to start out with a '/', type "/say /whaaaaaaaaaaaaaaaaaaaaaaaaat"
[16:04:54] startupality: has joined #RubyOnRails
[16:04:56] tubbo: /like/a/path/or/something
[16:05:08] l0oky: yeah or just add a space doesn't really matter
[16:05:40] paulcsmith: has joined #RubyOnRails
[16:06:22] l0oky: still trying to figure out why my local isn't passing well in the partial.. I guess I'll have to make baby steps until I figure this out :S
[16:06:33] ellisTAA: i imagine i dont??? want // before = .. ?
[16:06:48] momomomomo: has joined #RubyOnRails
[16:06:53] tubbo: EllisTAA: you do, it's a comment directive. sprockets is chock full of 'em
[16:06:55] tubbo: EllisTAA: !assets
[16:06:55] helpa: EllisTAA: http://guides.rubyonrails.org/asset_pipeline.html - The Asset Pipeline Guide by Ryan Bigg, Richard Hulse & Mohammad Typaldos
[16:07:02] imperator: has joined #RubyOnRails
[16:07:03] l0oky: EllisTAA: Rails assets pipeline handles those things for you
[16:07:10] ellisTAA: ill read through that
[16:08:15] lalalaaa: has joined #RubyOnRails
[16:08:21] ellisTAA: https://github.com/ellismarte/wwwhich-color/blob/master/app/assets/javascripts/application.js#L17
[16:08:43] asheinfeld: has joined #RubyOnRails
[16:08:51] dpritchett: has left #RubyOnRails: ()
[16:08:56] l0oky: EllisTAA: *thumbs up*
[16:09:08] ellisTAA: but it doesn???t work :{
[16:09:15] [Butch]: has joined #RubyOnRails
[16:09:31] l0oky: you already required it using //= require_tree .
[16:09:49] l0oky: it requires everything in dir where application.js is
[16:10:00] l0oky: do you use chrome?
[16:10:01] lalalaaa: tubbo: cool thanks for the input
[16:10:04] bricker: has joined #RubyOnRails
[16:10:24] balr0g: has joined #RubyOnRails
[16:10:27] l0oky: You can open dev tools F12 and check if it's loaded EllisTAA
[16:10:34] Scripore: has joined #RubyOnRails
[16:10:36] lalalaaa: tubbo: and no im not in the bay area :)
[16:10:41] ellisTAA: i do use chrome
[16:10:48] ellisTAA: l0oky: coolill try that
[16:11:32] l0oky: EllisTAA: Chances are it is loaded but you're not using it right or it wasn't made right ;)
[16:11:41] l0oky: themes.js
[16:12:01] neilfse__: has joined #RubyOnRails
[16:12:01] leslie: has joined #RubyOnRails
[16:12:02] leslie: has joined #RubyOnRails
[16:12:03] ellisTAA: err thanks l0oky for helping me out i appreciate it
[16:12:13] Ergo: has joined #RubyOnRails
[16:12:20] l0oky: EllisTAA: np
[16:12:47] ellisTAA: and yeah i think it???s just not loading
[16:12:59] armyriad: has joined #RubyOnRails
[16:13:36] l0oky: EllisTAA: can you gist your page that you see in chrome?
[16:13:36] chancancode: has joined #RubyOnRails
[16:13:58] shwoodard__: has joined #RubyOnRails
[16:14:00] DCio: So I have some slow code. I profiled it but I'm not too sure what to do with the results. Here is the code: https://gist.github.com/dciotoli/248c7fdb41ac4591f86a and here is the breakdown of what is taking the most time: https://gist.github.com/dciotoli/4b7d606a44299cf8d909
[16:14:04] ellisTAA: mmm i think i got it let me try something
[16:14:13] DCio: The code is ActiveRecord stuff
[16:14:27] Iacobus: has joined #RubyOnRails
[16:14:44] IFrank00: has joined #RubyOnRails
[16:14:52] kumavis: has joined #RubyOnRails
[16:15:07] mostlybadfly: has joined #RubyOnRails
[16:15:16] l0oky: tubbo: Sorry for pinging you again :P, did you see the gist?
[16:15:22] startupality: has joined #RubyOnRails
[16:16:12] jlyndon: has joined #RubyOnRails
[16:16:24] baweaver: has joined #RubyOnRails
[16:16:39] uranther: has joined #RubyOnRails
[16:16:56] corioliss: has joined #RubyOnRails
[16:17:08] Silox|: has joined #RubyOnRails
[16:17:13] culturelabs: has joined #RubyOnRails
[16:17:26] amitchellbullard: has joined #RubyOnRails
[16:17:34] paulcsmith: has joined #RubyOnRails
[16:17:42] Tamal: has joined #RubyOnRails
[16:17:43] towski_: has joined #RubyOnRails
[16:19:19] ivanskie: has joined #RubyOnRails
[16:19:46] harisamin: has joined #RubyOnRails
[16:20:15] nomadicoder: has joined #RubyOnRails
[16:20:40] lethjakman: has joined #RubyOnRails
[16:20:48] zrl: has joined #RubyOnRails
[16:21:26] jkamenik: has joined #RubyOnRails
[16:21:28] jlpeters: has joined #RubyOnRails
[16:21:37] startupality: has joined #RubyOnRails
[16:21:49] Mago_joao: universa1: Relato.where(user_id: @user1.all.find_by_id(@users)).count this worked O.O
[16:22:31] johnMcLain: has joined #RubyOnRails
[16:22:52] spastorino: has joined #RubyOnRails
[16:23:50] mxrguspxrt: has joined #RubyOnRails
[16:24:04] startupality: has joined #RubyOnRails
[16:25:06] Scripore: has joined #RubyOnRails
[16:25:40] mjc_: has joined #RubyOnRails
[16:26:16] momomomomo: has joined #RubyOnRails
[16:26:31] manfrin: has joined #RubyOnRails
[16:26:32] leesharma: has joined #RubyOnRails
[16:27:08] mxrguspx_: has joined #RubyOnRails
[16:27:11] l0oky: ACTION listening to *crickets*
[16:27:56] tenderlove: has joined #RubyOnRails
[16:28:34] nickfausnight: has joined #RubyOnRails
[16:28:53] benlieb: has joined #RubyOnRails
[16:28:56] Scripore: has joined #RubyOnRails
[16:29:11] ellisTAA: i???m getting an error with my js file ??? here???s my code and gist https://github.com/ellismarte/wwwhich-color/blob/master/app/assets/javascripts/themes.js
[16:29:15] ellisTAA: https://gist.github.com/ellismarte/d0c48ea150fecbf1c630
[16:30:14] tubbo: l0oky: your selected_group helper method doesn't make much sense
[16:30:41] l0oky: tubbo: Yeah, that's why I commented it out.
[16:30:43] rubyonrails754: has joined #RubyOnRails
[16:31:00] tubbo: l0oky: the issue there is that it's expected an argument, `selected_group`, or some kind of local var
[16:31:12] tubbo: l0oky: @selected_group = selected_group...like what does that mean?
[16:31:33] imperator: has left #RubyOnRails: ("Leaving")
[16:31:34] l0oky: semi psuedo code whatever
[16:31:59] tubbo: l0oky: additionally, you could reduce the amount of code in here if you used an attr_reader. calling it :selected_group basically defines a method to just return @selected_group
[16:32:26] tejasmanohar_: has joined #RubyOnRails
[16:32:34] tubbo: so if i do attr_reader :selected_group and then helper_method :selected_group, i can expect the `selected_group` method to be defined with the contents of `@selected_group`, which you have already set in the action
[16:32:37] daxroc: has joined #RubyOnRails
[16:33:11] sbhatore: has joined #RubyOnRails
[16:34:41] l0oky: selected_group seems visible now, going to test this now
[16:35:04] pontiki: hey, all, looking for some naming help
[16:35:48] pontiki: i've got this model Payment::Method that's going to be polymorphic. i'm looking for a good name for the association. 'payment_methodable' sounds whack. anyone have an idea?
[16:35:56] l0oky: tubbo: nah didn't help, I updated the gist..
[16:36:04] l0oky: same exception
[16:36:50] niiamon: has joined #RubyOnRails
[16:37:26] dda: has joined #RubyOnRails
[16:37:30] dda: has left #RubyOnRails: ()
[16:37:55] epochwolf: So... I'm going to be "that guy". Does ActiveAdmin work with rails 4.2?
[16:38:12] RubyNewbey_: has joined #RubyOnRails
[16:38:49] chinmay_dd: has joined #RubyOnRails
[16:39:40] Zadrel: has joined #RubyOnRails
[16:39:42] centrx: ^ this guy
[16:39:47] DylanJ: that guy.. man.
[16:40:34] aep: any alternatives to activeadmin?
[16:40:47] aep: by the way ;)
[16:40:52] DylanJ: epochwolf: i don't actually know. but try it out. shouldn't take too long to see if it works
[16:41:05] niiamon_: has joined #RubyOnRails
[16:41:21] epochwolf: DylanJ: it actually takes a few days to find out some important piece is broken beyond repair. ;)
[16:41:24] tenderlove: has joined #RubyOnRails
[16:41:31] workmad3: epochwolf: !try :P
[16:41:31] helpa: epochwolf: Why don't you try it and find out for yourself?
[16:41:43] workmad3: epochwolf: ^ that's the response we always give 'that guy'
[16:41:51] l0oky: tubbo: I updated the gist with my current code still getting the error for some reason..
[16:41:52] Zadrel: hello there, anyone could tell me what loads more the server: ONE 4GB request or 8 512MB requests?
[16:42:00] epochwolf: workmad3: As I just said, it could take several days to find out it was a worse idea than just a bad idea.
[16:42:05] DylanJ: There's tickets asking about rails 5 support. So I have to imagine it works with rails 4.x
[16:42:10] pontiki: you folks as bad with names as i am?
[16:42:15] workmad3: epochwolf: however, it's ActiveAdmin, so the answer to "Is this broken in fundamentally stupid ways?" is almost certainly 'yes'
[16:42:22] DylanJ: pontiki: i've seen a payment_methods table
[16:42:26] DylanJ: check out how spree handles it
[16:43:33] niiamon: has joined #RubyOnRails
[16:43:38] l0oky: Zadrel: multipart?
[16:43:39] feignt: has joined #RubyOnRails
[16:43:55] rakm: has joined #RubyOnRails
[16:44:10] christiandsg: has joined #RubyOnRails
[16:44:29] Zadrel: l0oky: what do you mean by multipart?
[16:44:35] towski_: has joined #RubyOnRails
[16:44:52] pontiki: DylanJ: there's isn't polymorphic. i'm looking for a decent name, not how to implement a model
[16:44:59] DylanJ: Zadrel: depends what you mean by "loads more the server". depends what you're doing with the data. depends if you're sending or receiving data.
[16:45:15] l0oky: Sorry, does your request do a multipart upload? or just plain POST ( which would be a bad idea if you have something like 4GB to upload )
[16:45:24] DylanJ: pontiki: i would just call it payment_method
[16:45:48] Zadrel: l0oky: actually, both GET resquests
[16:45:58] pontiki: i'll try that, but i think that might screw with rails interpolations
[16:46:07] blackmesa: has joined #RubyOnRails
[16:46:32] DylanJ: come back with errors and we can probably figure them out. but i think thats the best name for what you're trying to represent
[16:46:48] pontiki: was that to me??
[16:47:09] jxf: has joined #RubyOnRails
[16:47:09] towski_: has joined #RubyOnRails
[16:47:10] Zadrel: DylanJ: wich of two optins have a higher probability to slow down the server
[16:47:15] asheinfeld: has joined #RubyOnRails
[16:47:39] pixelhandler: has joined #RubyOnRails
[16:48:29] DylanJ: pontiki: did i say something wrong? :/
[16:48:44] pontiki: if there are errors, i can figure them out
[16:49:15] DylanJ: alright. well, great.
[16:49:35] l0oky: Zadrel: You get server load either way you look, just don't complicate stuff. You can upload a 4GB file with one request. http://www.huyng.com/posts/under-the-hood-an-http-request-with-multipartform-data/
[16:50:34] momomomomo: not true, direct to s3 buckets can avoid hitting the server
[16:50:38] DylanJ: Zadrel: Is the client downloading a file?
[16:52:28] deol: has joined #RubyOnRails
[16:53:36] Glyphik: has joined #RubyOnRails
[16:54:45] SteenJobs: has joined #RubyOnRails
[16:55:19] Papierkorb: has joined #RubyOnRails
[16:55:20] l0oky: tubbo: I actually got it to work. Everything else related to this exception is due to me making it show when selected_group is nil. Thank you very much for all your help!
[16:55:20] asheinfeld: has joined #RubyOnRails
[16:57:18] strcmp1: has joined #RubyOnRails
[16:58:36] qejk: has joined #RubyOnRails
[16:59:57] towski_: has joined #RubyOnRails
[17:00:09] ss_much: has joined #RubyOnRails
[17:00:14] michaeldeol: has joined #RubyOnRails
[17:01:08] niiamon: has joined #RubyOnRails
[17:01:09] niiamon_: has joined #RubyOnRails
[17:02:42] mikecmpbll: has joined #RubyOnRails
[17:03:11] zemmihates: has joined #RubyOnRails
[17:03:17] kidoz: has joined #RubyOnRails
[17:05:56] niiamon: has joined #RubyOnRails
[17:06:08] heidar: has joined #RubyOnRails
[17:06:42] nzst: has joined #RubyOnRails
[17:06:55] michael_mbp: has joined #RubyOnRails
[17:09:16] asheinfeld: has joined #RubyOnRails
[17:09:17] DoctorMonocular: has joined #RubyOnRails
[17:10:45] niiamon: has joined #RubyOnRails
[17:11:08] EminenceHC: has joined #RubyOnRails
[17:13:19] lxsameer: has joined #RubyOnRails
[17:13:19] lxsameer: has joined #RubyOnRails
[17:13:41] garrypolley: has joined #RubyOnRails
[17:14:35] niiamon__: has joined #RubyOnRails
[17:15:01] Schalla: has joined #RubyOnRails
[17:15:09] bronson: has joined #RubyOnRails
[17:18:32] asheinfeld: has joined #RubyOnRails
[17:18:53] maxdoubt: has joined #RubyOnRails
[17:18:59] niiamon: has joined #RubyOnRails
[17:19:30] Zadrel: has joined #RubyOnRails
[17:19:55] Zadrel: sry, i had an internet blackout for a while and didn't see your answers. could you please repeat them if there was any?
[17:21:47] rakm: has joined #RubyOnRails
[17:22:18] Zadrel: l0oky: hello, have you replied? i had an internet blackout and didn't see if you did
[17:22:22] nandx64: has joined #RubyOnRails
[17:22:58] l0oky: Zadrel: nah, didn't write anything :D
[17:23:43] hahuang65: has joined #RubyOnRails
[17:24:05] baweaver: has joined #RubyOnRails
[17:24:12] FernandoBasso: has joined #RubyOnRails
[17:24:17] eGGsha: has joined #RubyOnRails
[17:25:16] nightsh: has joined #RubyOnRails
[17:25:53] n1lo: has joined #RubyOnRails
[17:27:11] bonhoeffer: has joined #RubyOnRails
[17:27:18] bonhoeffer: anyone have trouble getting write_attribute to work: NoMethodError: private method `write_attribute' called for #
[17:28:23] niiamon: has joined #RubyOnRails
[17:30:06] bonhoeffer: this works . . . hmm: myActiveRecordObject.send(:"dynamic_attribute#{i}", "value");
[17:31:08] Trynemjoel: has joined #RubyOnRails
[17:31:20] niiamon_: has joined #RubyOnRails
[17:31:26] pontiki: `write_attribute` is a private method, which means you call it from the outside
[17:31:30] carlosoliveira: has joined #RubyOnRails
[17:31:32] pontiki: can't call it
[17:31:47] pwnd_nsfw: hey guys, still have this issue remaining from last night. https://gist.github.com/SirUncleCid/90bfac26504205ff4d88
[17:31:54] bonhoeffer: yep ??? but why is that ??? otherwise ??? how can you dynamically build an AR object
[17:31:57] erichu: has joined #RubyOnRails
[17:32:12] pontiki: .send sneaks around public/protected/private
[17:32:24] asheinfeld: has joined #RubyOnRails
[17:32:47] pontiki: using .public_send respects the private and protected keywords
[17:33:05] chills42: has joined #RubyOnRails
[17:33:33] bricker: remember when they almost made send() public-only
[17:34:28] diegoviola: has joined #RubyOnRails
[17:34:31] Scripore: has joined #RubyOnRails
[17:34:47] davidheward: has joined #RubyOnRails
[17:34:56] tubbo: bonhoeffer: why use write_attribute when you can just use update()?
[17:35:17] bonhoeffer: well, i don???t want to update the db (yet)
[17:35:22] bonhoeffer: until i check valid?
[17:35:53] cnk: has joined #RubyOnRails
[17:35:58] tubbo: bonhoeffer: i think active_record will actually let you do that
[17:36:46] bonhoeffer: anyway ??? send doesn???t work either: ArgumentError: wrong number of arguments (1 for 0)
[17:36:59] bonhoeffer: i???m just going to make the hash and load all at once
[17:37:03] niiamon: has joined #RubyOnRails
[17:37:11] pontiki: update_column skips the validity checks
[17:37:11] SteenJobs: has joined #RubyOnRails
[17:37:32] theery: has joined #RubyOnRails
[17:37:51] tubbo: bonhoeffer: it would be a *lot* cleaner if you made a method that did some sanity checking before just blindly calling whatever on your AR object
[17:37:52] pwnd_nsfw: I'm wondering if that's what I should do for my problem too
[17:38:47] tubbo: ehhhh....if you need to do this, you *might* be doing it wrong. in the sense that your DB *should* be able to handle this at a lower level
[17:38:49] bonhoeffer: tubbo: well, i just want to create AR objects from a different DB ??? i would like to load each attributie by: m = MyModel.new; m.name = db.name;
[17:38:57] bonhoeffer: then m.valid? m.save!
[17:39:20] tubbo: bonhoeffer: i see, so you kinda have to deal with a flawed schema possibly
[17:39:21] atal421: has joined #RubyOnRails
[17:39:27] asheinfeld: has joined #RubyOnRails
[17:39:40] tubbo: bonhoeffer: your ARgumentError is dubious then
[17:39:49] tenderlove: has joined #RubyOnRails
[17:39:51] pontiki: as is using write_attribute.
[17:40:07] elaptics: pwnd_nsfw: what are you trying to do there? Any chance you could get syntax highlighting applied to your gist? It's hard to read
[17:40:08] tubbo: bonhoeffer: the method you're trying to call clearly isn't defined or something
[17:40:20] bonhoeffer: hmm. . . maybe
[17:40:28] pwnd_nsfw: https://gist.github.com/SirUncleCid/90bfac26504205ff4d88
[17:40:37] dyulax: has joined #RubyOnRails
[17:40:46] rickmasta: has joined #RubyOnRails
[17:40:52] lethjakman: has joined #RubyOnRails
[17:40:56] pwnd_nsfw: I'm rolling through an XML document, and it seemed clean to just accept data that the database already handles
[17:41:03] tubbo: bonhoeffer: you should be able to just ARModel.send "#{your_dynamic_attribute}=", value
[17:41:10] tubbo: bonhoeffer: you *need* the '=' on the end
[17:41:19] tubbo: if you can't do that something else is wrong
[17:41:27] SteenJobs: has joined #RubyOnRails
[17:41:28] pwnd_nsfw: I'm going to give that a go
[17:41:30] l0oky: Can decorators override model.name for example?
[17:42:30] tubbo: l0oky: why wouldn't they be able to?
[17:42:39] Trynemjoel: has joined #RubyOnRails
[17:43:33] bonhoeffer: i didn???t have the =
[17:44:15] iamse7en: has joined #RubyOnRails
[17:44:28] tubbo: yeah like i said earlier, Ruby's "self.method =" is actually sugar for "self.method=()"
[17:44:48] tubbo: just so you can switch between local vars and setter method calls without having to do much work
[17:44:59] christiandsg: has joined #RubyOnRails
[17:45:33] atal421: hey folks, i have a db in production on heroku. i'd like the db removed form this app, and put into another app on heroku. is there a "simple" way to do this? the original app will then need to write to the DB (at it's new location) as well
[17:45:57] Zadrel: for i had an internet blackout and didn't see if anyone replied, i'll repost: i have 2 comboboxes "combo1" and "combo2", combo2 values depends on combo1 selected value, my doubt is: what slows down my app more: calling the controller everytime the combo1 changes or loading everything on combo2 and use CSS and/or JS to hide the non-related values from combo2?
[17:46:00] atal421: not really sure about how to even start this sort of thing
[17:46:10] twohlix: has joined #RubyOnRails
[17:47:08] atal421: Zadrel: if it's already loaded in the JS, then it's faster in memory vs calling your endpoint
[17:47:18] atal421: that said, you may be duplicating code that way
[17:47:38] atal421: it depends on the size
[17:47:49] Zadrel: atal421: youisr DB mysql based? if so i'd simply do a dump and create another to load the dump;
[17:47:54] jrz: has joined #RubyOnRails
[17:48:11] Zadrel: is your**
[17:48:13] atal421: also, if you're optimizing for speed on two dropdowns i'd imagine the app is pretty fast at this point, cause there are certainly better things to speed up than dropdowns
[17:48:41] bruno-: has joined #RubyOnRails
[17:48:41] chinmay_dd: has joined #RubyOnRails
[17:48:43] asheinfeld: has joined #RubyOnRails
[17:48:46] atal421: Zadrel: i don't want the whole schema actually
[17:48:51] jrz: has joined #RubyOnRails
[17:48:58] pixelhandler: has joined #RubyOnRails
[17:49:33] jrz: has joined #RubyOnRails
[17:49:45] atal421: (postgresql)
[17:49:50] cnk: atal421: why does it need to move?
[17:50:01] cnk: can't you just connect both apps to the existing db?
[17:50:16] jrz: has joined #RubyOnRails
[17:50:17] atal421: cnk: business requirements... the app that's currently dirving it is not the best "api" to write to it. we want to create an api for the db
[17:50:36] pwnd_nsfw: When I use model.send in my code now, it throws ArgumentError (When assigning attributes, you must pass a hash as an argument.)
[17:50:41] cnk: that is nothing to do with the location of the db
[17:50:42] Zadrel: atal421: i can't think of any other ways, i'm still an beginner and i haven't use any other means yet :/
[17:50:47] pwnd_nsfw: It doesn't make sense to me though
[17:51:01] atal421: cnk: well, mgt wants it moved to the "new" rails app
[17:51:01] jrz: has joined #RubyOnRails
[17:51:11] atal421: but that's a good point
[17:51:20] atal421: they don't need to know exactly hwo that's happening
[17:51:24] cnk: connect the new rails app to the existing db
[17:51:37] atal421: Zadrel: no worries, all feedback is great
[17:51:41] jrz: has joined #RubyOnRails
[17:51:43] cnk: and if you don't want the old one to write, change it's connection to a user that only has read privs
[17:52:09] atal421: cnk: yeah, was thinking aobut that... my team wasn't so happy with that one
[17:52:28] atal421: cnk: just trying to offer a list of options
[17:52:28] towski_: has joined #RubyOnRails
[17:52:33] atal421: seems like nothing will be great
[17:52:35] jrz: has joined #RubyOnRails
[17:52:41] atal421: just pick the least worst from the list maybe
[17:53:03] atal421: cnk: thanks for the fedback
[17:53:08] cnk: no one said refactoring was easy -esp if it is refactoring the db
[17:53:15] djbkd: has joined #RubyOnRails
[17:53:19] jrz: has joined #RubyOnRails
[17:53:24] cnk: if you do have to move data, look at Heroku's taps gem
[17:53:28] pwnd_nsfw: AHHHH, I think I've found it
[17:53:35] DoctorMonocular: has joined #RubyOnRails
[17:53:43] cnk: I have used it for copying data local -> remote and back
[17:53:50] pwnd_nsfw: the xml has "attributes" in it, and that's an actual model method lul
[17:53:51] juike_: has joined #RubyOnRails
[17:53:53] cnk: probably could make you a new database if that has to happen
[17:53:59] jrz: has joined #RubyOnRails
[17:54:43] jrz: has joined #RubyOnRails
[17:55:28] jrz: has joined #RubyOnRails
[17:56:18] jrz: has joined #RubyOnRails
[17:56:49] atal421: will look it up
[17:56:54] tenderlove: has joined #RubyOnRails
[17:56:58] jrz: has joined #RubyOnRails
[17:57:30] asheinfeld: has joined #RubyOnRails
[17:57:30] shock_one: has joined #RubyOnRails
[17:57:42] shinnya: has joined #RubyOnRails
[17:57:44] jrz: has joined #RubyOnRails
[17:58:24] jrz: has joined #RubyOnRails
[17:59:08] jrz: has joined #RubyOnRails
[17:59:18] djbkd: has joined #RubyOnRails
[17:59:34] nandx64: has joined #RubyOnRails
[17:59:38] paulcsmith: has joined #RubyOnRails
[17:59:41] EminenceHC: has joined #RubyOnRails
[17:59:53] maxdoubt: has joined #RubyOnRails
[17:59:59] jrz: has joined #RubyOnRails
[18:00:42] jrz: has joined #RubyOnRails
[18:00:44] eGGsha: has joined #RubyOnRails
[18:01:24] jrz: has joined #RubyOnRails
[18:01:34] lucha: has joined #RubyOnRails
[18:02:06] shock_one: has joined #RubyOnRails
[18:02:06] jrz: has joined #RubyOnRails
[18:02:09] polpak: has joined #RubyOnRails
[18:02:52] iamse7en: has joined #RubyOnRails
[18:05:36] centrx: has joined #RubyOnRails
[18:06:45] garrypolley: has joined #RubyOnRails
[18:07:01] eoy_: has joined #RubyOnRails
[18:07:26] arup_r: has joined #RubyOnRails
[18:08:13] tenderlove: has joined #RubyOnRails
[18:08:20] RegulationD: has joined #RubyOnRails
[18:13:10] weckl: has joined #RubyOnRails
[18:13:15] paulcsmith: has joined #RubyOnRails
[18:13:22] niiamon_: has joined #RubyOnRails
[18:13:51] eoy: has joined #RubyOnRails
[18:15:27] rubyonrailed: has joined #RubyOnRails
[18:16:10] niiamon: has joined #RubyOnRails
[18:17:44] alfie_max15: has joined #RubyOnRails
[18:18:51] alfie_max15: i've got a doubt... i'm using active admin to setup my application's admin page
[18:18:52] alfie_max15: In my admin page, User's edit page, all the datatime fields like created_at, updated_at are resulting in an error
[18:18:52] alfie_max15: i can manually write a form, but i don't want to do that for just fixing this issue...
[18:18:52] alfie_max15: is there any way i can set all datetime fields to be set as :datetime in the form?
[18:18:55] rickmasta: has joined #RubyOnRails
[18:18:56] alfie_max15: maybe something i can put in the active admin initializer?
[18:19:08] tenderlove: has joined #RubyOnRails
[18:20:23] ararog: has joined #RubyOnRails
[18:20:30] jrz: has joined #RubyOnRails
[18:20:36] tejasmanohar_: has joined #RubyOnRails
[18:21:20] SteenJobs: has joined #RubyOnRails
[18:21:31] twohlix: alfie_max15: you gotta give us the error you're getting
[18:21:54] alfie_max15: undefined method `select_:year' for #<#<Class:0x0000000b7a24b0>:0x0000000c11bb40>
[18:21:56] alfie_max15: this is the error
[18:22:02] livecano: has joined #RubyOnRails
[18:22:52] alfie_max15: i've fixed it by writing a custom form, and specifying the datetime fields like this -> as input :created_at, as: :datetime
[18:22:52] alfie_max15: input :updated_at, as: :datetime
[18:23:07] niiamon: has joined #RubyOnRails
[18:23:11] alfie_max15: i hope you get it...
[18:24:17] twohlix: i dont, I'd go to #activeadmin and ask the guys there
[18:24:50] alfie_max15: all other fields are left unchanged... this seems to be an overkill... is there a way to specify somehow that all datetime fields be used as :datetime
[18:25:03] jenrzzz: has joined #RubyOnRails
[18:25:23] twohlix: everytime i've happened to use activeadmin it worked out of the box with datetimes
[18:25:28] twohlix: but thats like twice, so i dont know
[18:25:44] alfie_max15: oh... i did ask it there first... no activity over there... just you joined and left.. ;)
[18:25:57] twohlix: i was making sure it was a real place before sending you heh
[18:26:07] alfie_max15: yeah.. me too... i don't know what changed this time...
[18:27:06] avitzurel: has joined #RubyOnRails
[18:28:41] zorak8: has joined #RubyOnRails
[18:29:26] artto_: has joined #RubyOnRails
[18:29:28] niiamon: has joined #RubyOnRails
[18:29:47] michaeldeol: has joined #RubyOnRails
[18:30:29] pixelhan_: has joined #RubyOnRails
[18:30:29] lucha_: has joined #RubyOnRails
[18:30:52] jenrzzz_: has joined #RubyOnRails
[18:30:56] atmosx_: has joined #RubyOnRails
[18:31:30] prgmmr__: has joined #RubyOnRails
[18:31:38] tenderlove: has joined #RubyOnRails
[18:32:15] watnall56_: has joined #RubyOnRails
[18:32:18] bryancp_: has joined #RubyOnRails
[18:32:29] BBHoss_: has joined #RubyOnRails
[18:32:31] niiamon_: has joined #RubyOnRails
[18:33:42] grandy_: has joined #RubyOnRails
[18:33:53] bronson: has joined #RubyOnRails
[18:34:01] renegadeandy: has joined #RubyOnRails
[18:34:12] shinnya_: has joined #RubyOnRails
[18:34:56] towski_: has joined #RubyOnRails
[18:34:57] Detch: has joined #RubyOnRails
[18:34:57] jlpeters: has joined #RubyOnRails
[18:36:06] Scripore: has joined #RubyOnRails
[18:36:11] renegadeandy: Hey folks. I am having some problems with validations on my user model. During my signup if i enter a name, email, and a password of 'qqqqqq' then confirmation password of 'wwwwww' the error returned is : Password confirmation can't be blank - please help! https://gist.github.com/renegadeandy/be3180a530c0d578977a
[18:36:14] manfrin: I'm changing a collection-select-form to a drag and drop reorder thing, with two lists (one for active, one for all; drag from all to active, rerrange for position)
[18:36:18] manfrin: what's a good way to model this?
[18:36:38] DukeDave: has joined #RubyOnRails
[18:37:02] andrew9184: has joined #RubyOnRails
[18:37:07] manfrin: renegadeandy your password and password conf should be the same
[18:37:30] code1o6: has joined #RubyOnRails
[18:37:35] prgmmr__: has left #RubyOnRails: ()
[18:37:50] renegadeandy: manfrin: the validation wants them to be the same - but if i enter 'wwwwww' and 'qqqqqq' then it should say passwords dont match instead of password confirmation must not be blank surely?
[18:38:56] bulldawgden: has joined #RubyOnRails
[18:39:49] dman777_alter: namespace :api, defaults: { format: :json } do resources :backup_jobs; end....how would I make a child controller named error with it's own def index of backup_jobs?
[18:41:28] bmurt_: has joined #RubyOnRails
[18:41:31] lethjakman: has joined #RubyOnRails
[18:42:11] kies^: has joined #RubyOnRails
[18:42:40] renegadeandy: it was because i was not permitting the password_confirmation param
[18:42:43] renegadeandy: so it was nil
[18:43:00] mjc_: has joined #RubyOnRails
[18:43:12] loc22: has joined #RubyOnRails
[18:43:56] uranther: has joined #RubyOnRails
[18:44:54] tenderlove: has joined #RubyOnRails
[18:45:39] yfeldblum: has joined #RubyOnRails
[18:45:41] christiandsg: has joined #RubyOnRails
[18:46:27] vickleton: has joined #RubyOnRails
[18:51:07] nobitanobi: has joined #RubyOnRails
[18:51:38] renanoronfle: has joined #RubyOnRails
[18:52:03] differentreality: has joined #RubyOnRails
[18:52:59] slava_: has joined #RubyOnRails
[18:53:42] niiamon: has joined #RubyOnRails
[18:54:06] rubyonrailed: has joined #RubyOnRails
[18:55:14] jenrzzz: has joined #RubyOnRails
[18:57:07] jsrn_: has joined #RubyOnRails
[18:58:12] tenderlo_: has joined #RubyOnRails
[18:58:19] niiamon: has joined #RubyOnRails
[18:58:47] blackmesa: has joined #RubyOnRails
[19:00:13] frzn: has joined #RubyOnRails
[19:02:00] arBmind: has joined #RubyOnRails
[19:02:50] leesharma: has joined #RubyOnRails
[19:03:21] Mendenhall: has joined #RubyOnRails
[19:03:31] [Butch]: has joined #RubyOnRails
[19:04:36] asheinfeld: has joined #RubyOnRails
[19:05:25] bonhoeffer: has joined #RubyOnRails
[19:05:33] podman: has joined #RubyOnRails
[19:06:38] hahuang65: has joined #RubyOnRails
[19:07:14] Trynemjoel: has joined #RubyOnRails
[19:08:14] [Butch]: has joined #RubyOnRails
[19:08:36] nofxx: has joined #RubyOnRails
[19:10:37] jrz: has joined #RubyOnRails
[19:11:27] jrz: has joined #RubyOnRails
[19:11:31] cac: has joined #RubyOnRails
[19:12:07] jrz: has joined #RubyOnRails
[19:12:50] tubbo: renegadeandy: rails provides a validator called "confirmed" that does exactly what you need
[19:12:52] jrz: has joined #RubyOnRails
[19:13:08] tubbo: renegadeandy: http://edgeguides.rubyonrails.org/active_record_validations.html#confirmation
[19:13:19] renegadeandy: tubbo: i was using that! It just wasnt behaving as i would have expected - and I worked out why :)
[19:13:34] jrz: has joined #RubyOnRails
[19:13:40] DoubleMalt: has joined #RubyOnRails
[19:13:41] tubbo: oh cool yeah
[19:14:19] jrz: has joined #RubyOnRails
[19:14:59] jrz: has joined #RubyOnRails
[19:15:47] shock_one: has joined #RubyOnRails
[19:15:58] niiamon: has joined #RubyOnRails
[19:16:19] tubbo: does http_basic_authenticate_with take an `if:` param? i'm having trouble getting http basic auth to work but *only* on staging
[19:16:24] tubbo: and i woul rather not make a custom method...
[19:17:57] RegulationD: has joined #RubyOnRails
[19:18:13] leesharma: has joined #RubyOnRails
[19:20:17] asheinfeld: has joined #RubyOnRails
[19:21:08] paulcsmith: has joined #RubyOnRails
[19:23:26] EminenceHC: has joined #RubyOnRails
[19:23:49] eichenwald: has joined #RubyOnRails
[19:24:40] renanoronfle: has joined #RubyOnRails
[19:25:42] tenderlove: has joined #RubyOnRails
[19:25:59] DCio: has joined #RubyOnRails
[19:26:18] rickmasta: has joined #RubyOnRails
[19:26:56] DCio: hey so what is the best way to import CSV file to a database
[19:27:09] bruno-: has joined #RubyOnRails
[19:27:25] DCio: because right now im parsing it row by row, and im realizing that what im doing is so inefficient
[19:27:42] leesharma: has joined #RubyOnRails
[19:28:19] vere: has joined #RubyOnRails
[19:28:21] n1lo: has joined #RubyOnRails
[19:28:32] JonasOSDever: has joined #RubyOnRails
[19:28:34] phrozen77: has joined #RubyOnRails
[19:28:34] drPoggs: has joined #RubyOnRails
[19:28:38] elektronaut: has joined #RubyOnRails
[19:28:45] soahccc: has joined #RubyOnRails
[19:28:51] DCio: this is the code im using now: https://gist.github.com/dciotoli/248c7fdb41ac4591f86a
[19:28:56] vedu: has joined #RubyOnRails
[19:29:06] bauruine: has joined #RubyOnRails
[19:29:16] centrx: has joined #RubyOnRails
[19:29:29] jamesrward: has joined #RubyOnRails
[19:29:49] asheinfe_: has joined #RubyOnRails
[19:33:32] peterhil: has joined #RubyOnRails
[19:33:36] niiamon: has joined #RubyOnRails
[19:33:59] jamesrward: I'm taking my first stab at doing some caching and think I am going about it all wrong. I'm trying to cache a large SQL statement in my API via fetch and think I am going about it all wrong. Here's a gist of what a tried https://gist.github.com/anonymous/b90b576c34e60b54f2b9 elsif (plural_resource_name == "@groups") is the part I am trying to cache.
[19:35:06] Maletor: has joined #RubyOnRails
[19:35:17] jamesrward: I think this needs to be in my model but my controller is where the SQL happens. Not really sure what to try next.
[19:35:34] asheinfeld: has joined #RubyOnRails
[19:35:44] Maletor: is it possible to use the uniqueness validator or maybe the length validator to make sure more than 10 records with the same user_id are not created?
[19:36:14] existensil: has joined #RubyOnRails
[19:37:15] tbuehlmann: maletor, no. I guess you have to write a custom validator for that
[19:37:15] Maletor: tbuehlmann: thought so
[19:37:16] nobitanobi: has joined #RubyOnRails
[19:37:17] bmurt: has joined #RubyOnRails
[19:38:02] tenderlo_: has joined #RubyOnRails
[19:40:07] bricker: has joined #RubyOnRails
[19:42:37] IFrank00: has joined #RubyOnRails
[19:43:09] DEA7TH: has joined #RubyOnRails
[19:43:18] dman777_alter: namespace :api, defaults: { format: :json }; do resources :backup_jobs; resources :errors.....how come /api/backup_jobs/errors does not show up as a route in rake routes?
[19:43:45] mbd2: has joined #RubyOnRails
[19:46:34] meekohi: has joined #RubyOnRails
[19:47:44] SteenJobs: has joined #RubyOnRails
[19:47:52] dman777_alter: ah....I see now
[19:48:05] dman777_alter: it's not placing errors as a child to backup_jobs
[19:49:29] VeryBewitching: has joined #RubyOnRails
[19:50:19] tenderlove: has joined #RubyOnRails
[19:51:07] niiamon: has joined #RubyOnRails
[19:52:18] n1lo: has joined #RubyOnRails
[19:52:38] alfie_max15: has joined #RubyOnRails
[19:53:43] werelivinginthef: has joined #RubyOnRails
[19:53:44] hahuang65: has joined #RubyOnRails
[19:54:59] asheinfeld: has joined #RubyOnRails
[19:55:13] tbuehlmann: dman777_alter, you'd need a block for that, like `resources :backup_jobs do; resources :errors ;end`
[19:57:02] charliesome: has joined #RubyOnRails
[19:57:04] bonhoeffer: has joined #RubyOnRails
[19:59:21] l0oky: has joined #RubyOnRails
[19:59:29] leesharma: has joined #RubyOnRails
[20:00:31] Klumben: has joined #RubyOnRails
[20:01:25] christiandsg: has joined #RubyOnRails
[20:02:14] Kedric: has left #RubyOnRails: ()
[20:02:42] Papierkorb: I have the model Article and TextArticle, where TextArticle inherits from Article (class TextArticle < Article). How do I make activerecord use 'text' as value for the type column, and not 'TextArticle' ?
[20:03:52] garrypolley: has joined #RubyOnRails
[20:04:20] bronson: has joined #RubyOnRails
[20:04:27] Hates_: has joined #RubyOnRails
[20:05:30] robbyoconnor: has joined #RubyOnRails
[20:06:40] bendangelo: has joined #RubyOnRails
[20:07:11] dopie: has joined #RubyOnRails
[20:07:27] darrencauthon: has joined #RubyOnRails
[20:08:10] twohlix: def sti_name
[20:08:16] twohlix: and set it there i think
[20:08:26] twohlix: def self.sti_name i mean
[20:08:29] cnk: Papierkorb: You don't. The type column is used to look up the model in Rails single table inheritance
[20:08:46] tejasmanohar_: has joined #RubyOnRails
[20:09:24] twohlix: http://apidock.com/rails/ActiveRecord/Base/sti_name/class
[20:09:27] darrenca_: has joined #RubyOnRails
[20:09:31] twohlix: in Rails 3.1
[20:09:52] twohlix: http://apidock.com/rails/ActiveRecord/Inheritance/ClassMethods/sti_name for 4.2.1 Papierkorb
[20:10:42] yfeldblum: has joined #RubyOnRails
[20:10:59] Papierkorb: twohlix: thanks, tried that after your first post, but it seems cnk is right as it throws: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'text'. [...].
[20:11:02] twohlix: Also papierkorb: http://stackoverflow.com/questions/6865920/activerecord-custom-type-naming-scheme
[20:11:20] Papierkorb: ha, nice, thanks twohlix
[20:11:47] Supertanker2: has joined #RubyOnRails
[20:11:56] twohlix: not sure it works with 4 but good luck
[20:12:21] twohlix: and I'd say its generally a code smell unless its a must have requirement
[20:12:34] twohlix: if its just a nice to have I'd leave rails STI alone
[20:12:45] momomomomo: has joined #RubyOnRails
[20:13:17] acovrig: has joined #RubyOnRails
[20:14:01] acovrig: I have a hidden field that doesn???t seem to be passing though to the controller: <%= f.hidden_field :end_date, :value => "", data: { provide: 'datepicker' } %> it gets passed to the controller as an empty string, why?
[20:14:41] Scripore: has joined #RubyOnRails
[20:15:13] DoctorMonocular: has joined #RubyOnRails
[20:15:17] Trynemjoel: has joined #RubyOnRails
[20:16:01] twohlix: acovrig: can you use some javascript/inspect element before submitting stuff to see if its got a value? Also your style is wrong
[20:16:14] twohlix: dont mix hash rockets and new stuff if you can avoid it
[20:16:19] twohlix: so value: ''
[20:16:31] acovrig: twohlix: yes, it gets a value in the inspector
[20:16:49] twohlix: params allowing it through?
[20:17:11] shock_one: has joined #RubyOnRails
[20:17:31] Radar: GOOD MORNING!
[20:20:31] garrypolley: has joined #RubyOnRails
[20:20:39] Papierkorb: Radar: OOHHAAYOOO .. pretty early for you
[20:20:45] arooni: has joined #RubyOnRails
[20:21:27] Papierkorb: twohlix: was a fair point though, while I don't think it looks great in the DB, I'll stick with rails naming scheme for the type column.
[20:21:43] Papierkorb: It's a enum anyway, so no difference in the end
[20:22:11] twohlix: Yea, papierkorb: there are many things you could play with, but if you can avoid it doing it the 'railsy' way just works better maintenance wise
[20:22:20] twohlix: by doing it*
[20:23:14] jenrzzz: has joined #RubyOnRails
[20:23:16] acovrig: twohlix: well??? it was setting the value, now it doesn???t seem to be (and $(???#start_date???).value = ???asdf???; $(???#start_date???).value returns nothing???)
[20:23:41] twohlix: if you're using jquery
[20:23:48] Schalla: has joined #RubyOnRails
[20:23:54] twohlix: and .val(new value here)
[20:23:56] acovrig: twohlix: I tried that too (that???s the code it???s supposed to use)
[20:23:58] asheinfeld: has joined #RubyOnRails
[20:24:28] rcedillor: has joined #RubyOnRails
[20:24:32] acovrig: twohlix: `$("#start_date").val("asdf"); $("#start_date").value` returns ???undefined'
[20:24:37] theery: has joined #RubyOnRails
[20:24:46] twohlix: yea, cause it should be .val()
[20:24:48] twohlix: not .value
[20:25:01] Radar: Papierkorb: only 6:20am :
[20:25:05] acovrig: *sigh* I just realized it isn???t start_date, it???s request[start_date]...
[20:25:38] tenderlo_: has joined #RubyOnRails
[20:25:51] twohlix: and its probably #request_start_date if its a simpleform and the object is a Request
[20:26:10] nahtnam: has joined #RubyOnRails
[20:26:15] nahtnam: How hard will it be to update to rails 5 once it comes out?
[20:26:37] bricker: nahtnam: 16 minutes
[20:26:48] nahtnam: bricker: How many seconds?
[20:26:55] bricker: nahtnam: 16 also
[20:27:21] bricker: nahtnam: are you keeping up to date with the rails 5 changelog?
[20:27:22] nahtnam: Ill make sure to spend 16 minutes and 16 seconds updating.
[20:27:23] yardenbar: has joined #RubyOnRails
[20:27:27] nahtnam: bricker: No?
[20:27:34] nahtnam: Havent even looked at it yet
[20:27:41] nahtnam: Just heard about action cable
[20:27:43] nahtnam: and it sounds awesome
[20:27:50] bricker: nahtnam: have you upgraded a major version of rails before?
[20:27:53] nahtnam: Especially with ember js
[20:27:55] nahtnam: bricker: No
[20:28:08] Jarboe: has joined #RubyOnRails
[20:28:09] nahtnam: But there are instructions right?
[20:28:12] bricker: nahtnam: Do you have a full test suite for your app with 100% coverage?
[20:28:16] djbkd: has joined #RubyOnRails
[20:28:19] alfie_max15: has joined #RubyOnRails
[20:28:21] irctc470: has joined #RubyOnRails
[20:28:50] n1lo: has joined #RubyOnRails
[20:29:04] SteenJobs: has joined #RubyOnRails
[20:29:15] rcedillor: hello everyone
[20:29:19] nahtnam: More like 0%. I still need to learn how to write tests :P On the bright side, there are only two controller in my app :P
[20:29:33] rcedillor: do you know if exists any gem for automatic migrations like south on django ?
[20:29:38] loonshi: has joined #RubyOnRails
[20:30:26] Rosa: has joined #RubyOnRails
[20:30:33] lethjakman: has joined #RubyOnRails
[20:30:42] DoctorMonocular: has joined #RubyOnRails
[20:30:51] VeryBewitching: nahtnam: I wrote my whole app before I wrote my tests, and where the tests didn't even take a day to write, I'll always write a test first in the future, then the feature.
[20:30:52] l0oky: Will draper decorate a relation?
[20:31:22] nahtnam: VeryBewitching: TDD right? Yeah. Im gonna start learning today/tomorrow
[20:31:24] Papierkorb: Then you didn't have a lot of test cases VeryBewitching..
[20:31:33] nahtnam: not sure wheter I should use minitest or rpeck
[20:31:35] VeryBewitching: Papierkorb: 183
[20:31:38] guest1241234: has joined #RubyOnRails
[20:31:43] VeryBewitching: Papierkorb: I don't know if that's a lot or not
[20:32:05] nahtnam: What should I use?
[20:32:24] rcedillor: what do you recomend to use for migrations ?
[20:32:25] Papierkorb: nahtnam: I like rspec more. minitest feels too much like C assert();
[20:32:28] VeryBewitching: nahtnam: I used what rails defaults to, will try rspec on my next project
[20:32:29] loc22: has joined #RubyOnRails
[20:32:32] nahtnam: rcedillor: Built in migrations?
[20:32:43] nahtnam: VeryBewitching: What does rails default to?
[20:32:44] Papierkorb: nahtnam: rspec on the other hand is quite powerful and easy to read and write.
[20:32:50] VeryBewitching: nahtnam: Minitest
[20:33:09] Jarboe: has joined #RubyOnRails
[20:33:14] nahtnam: So yesterday someone mentioned minitest is going to have a new feature
[20:33:19] nahtnam: That will make it a lot better
[20:33:27] nahtnam: Cant remember what it was/is
[20:33:43] blackmesa: has joined #RubyOnRails
[20:33:48] nahtnam: Is that something important enough for me to use it?
[20:33:53] ivanskie: has joined #RubyOnRails
[20:33:56] nahtnam: or does that feature (whatever it is) not matter?
[20:33:57] rcedillor: nahtnam: a gem to autobuild migrations or something like that
[20:34:12] nahtnam: rcedillor: You can use rails g model or rails g scaffold
[20:34:17] Papierkorb: nahtnam: well, apparently you yourself don't remember it anymore already. can't have been that important.
[20:34:23] cac: has joined #RubyOnRails
[20:34:29] diego_k: has joined #RubyOnRails
[20:34:34] pwnd_nsfw: rails g migration is p poweful in itself
[20:34:46] asheinfe_: has joined #RubyOnRails
[20:34:49] diego_k: has joined #RubyOnRails
[20:34:51] vere: has joined #RubyOnRails
[20:34:54] rcedillor: yep but what when I need to add or delete some field(column)
[20:34:56] pwnd_nsfw: I'm finally trusting it more lol
[20:34:58] nahtnam: Papierkorb: Im pretty sure its important, but I havent written tests before and I didnt know what minitest was so I ignored it
[20:35:03] pwnd_nsfw: remove_column
[20:35:09] ivanskie: so.. i have an app im working on.. i have some csv files, of products I'm trying to load.. and i found a way to load it with rake db:seed.. and it's working.. but its very repetitive.. i'm just wondering is there a better way to do this? https://gist.github.com/i5okie/70b37c5b95f5435c4a88#file-seeds-rb-L19
[20:35:11] pwnd_nsfw: remove_column_from_table column_name:type
[20:35:12] Papierkorb: nahtnam: Said no one ever??? - Still, seeing how many projects out there use rspec over Minitest, I think it's safe to bet on rspec
[20:35:19] nahtnam: rcedillor: rails g migrate AddUsernameToUsers username:string
[20:35:33] pwnd_nsfw: Ahr ight, I'm brain dead
[20:35:50] pwnd_nsfw: RemoveFartsFromButts butts:type
[20:35:57] pwnd_nsfw: FUCK, farts:type
[20:36:05] nahtnam: was just about to say
[20:36:15] rcedillor: nahtnam: but rails g doesn't work for delete a field, does it ?
[20:36:19] pwnd_nsfw: I even used an example where that should've been super easy
[20:36:21] nahtnam: yes it does rcedillor
[20:36:44] nahtnam: `rails g migrate RemoveUsernameFromUsers username:string` I think
[20:36:52] nahtnam: (not sure anymore actually)
[20:36:55] srruby: has joined #RubyOnRails
[20:36:59] pwnd_nsfw: that should be it, yeh
[20:37:11] Papierkorb: ivanskie: the superseeder gem does CSV, mapping CSV columns to SQL columns.
[20:37:14] pwnd_nsfw: "omg u delete my daterbace"
[20:37:32] ivanskie: cool thanks papierkorb
[20:37:51] Papierkorb: ivanskie: in seeds.rb, you pretty much just do something like this: seed :banned_mail_domains, update_by: :domain
[20:37:54] nahtnam: Papierkorb: There must be a reason why minitest is the default though
[20:38:05] nahtnam: Dont get me wrong, I have no bias on this, I just want to choose the right one
[20:38:14] juike_: has joined #RubyOnRails
[20:38:21] nahtnam: and I think I used rspec once before
[20:38:30] tvw: has joined #RubyOnRails
[20:38:31] pwnd_nsfw: Speculation: could it be what rails tests were written in?
[20:38:37] diegodap: has joined #RubyOnRails
[20:38:48] pwnd_nsfw: If that even makes sense.
[20:38:48] momomomomo: has joined #RubyOnRails
[20:38:49] imkj: has joined #RubyOnRails
[20:39:00] Papierkorb: nahtnam: just try both, and then use what you like more. Many projects use rspec, and probably many use minitest too. Neither will vanish any time soon
[20:39:14] nahtnam: Papierkorb: https://github.com/nahtnam/straight-api/blob/master/spec/lib/straight_spec.rb I have done it once before :P
[20:39:27] ivanskie: i'll have to have a daily script later to scrub a csv file i get from supplier with inventory and pricing... i wonder what i could use for that
[20:39:47] dopie: has joined #RubyOnRails
[20:39:55] Papierkorb: nahtnam: that's the legacy syntax. nowadays it's expect(order.amount).to eq 1
[20:40:02] Scriptonaut: has joined #RubyOnRails
[20:40:14] cnk: THis article laid out most of the compare / contrast of the 2 http://tenderlovemaking.com/2015/01/23/my-experience-with-minitest-and-rspec.html
[20:40:22] Scriptonaut: anyone know how I can return haml from a helper?
[20:40:29] Papierkorb: nahtnam: or mock something: expect(some_object).to receive(:some_method).with("some arguments").and_return 123
[20:40:31] nahtnam: Papierkorb: Its like writing in english. I think I might just go with Rspec.
[20:40:36] diegodap: has joined #RubyOnRails
[20:40:52] nahtnam: Just one question.
[20:41:01] nahtnam: Lets say I have a table called categories
[20:41:14] nahtnam: and I want rails to prefill them with some categories
[20:41:29] nahtnam: I cant use seed because I have some dummy stuff in there
[20:41:36] tubbo: fixtures mang
[20:41:40] Papierkorb: nahtnam: huh?
[20:42:00] nahtnam: tubbo: Yeah, I was getting to that. I noticed discourse puts everything in fixtures
[20:42:08] nahtnam: I also noticed that minitest makes use of fixtures
[20:42:12] nahtnam: will they clash?
[20:42:20] niiamon_: has joined #RubyOnRails
[20:42:41] nahtnam: Papierkorb: I have categories that I want prefilled in the database
[20:42:46] nahtnam: Cant use seed
[20:42:53] Papierkorb: nahtnam: you can also use fixtures with rspec. I once did "rm -rf fixtures" and never looked back though.
[20:43:06] Radar: nahtnam: prefilling IS seeds?
[20:43:14] Radar: nahtnam: What dummy stuff do you have in seeds already?
[20:43:31] Papierkorb: I'd rather have "User.create! name: 'foo'" in my test case to control and see every variable right where it matters.
[20:43:35] nahtnam: Just User.new and stuff so when I reset my db for whatever reason, I can quickly login
[20:43:43] nahtnam: Radar: Then why does Discourse use fixtures?
[20:43:46] Papierkorb: A random magic file on the HDD somewhere else isn't that obvious
[20:43:47] nahtnam: to seed the database
[20:44:02] rcedillor: another question
[20:44:03] Radar: nahtnam: Because they're a bunch of .net developers who used Discourse to learn how to build a RAils app
[20:44:05] Papierkorb: nahtnam: fixtures are seeds for tests only
[20:44:07] l0oky: I have a relation I want to decorate can I do that with draper? model1 has_many model2, ex. model1.model2.decoratedmethod
[20:44:13] nahtnam: Papierkorb: Ohhh
[20:44:15] imkj: nahtnam: AFAIK, fixtures are for tests mainly.
[20:44:25] rcedillor: what gem do you recomend for authentication/authorization ?
[20:44:30] livecano: has joined #RubyOnRails
[20:44:30] nahtnam: seeds = real data, fixtures = test data
[20:44:30] lwu_: has joined #RubyOnRails
[20:44:35] nahtnam: rcedillor: Have you used rails before?
[20:44:37] imkj: nahtnam: Correct.
[20:44:56] rcedillor: nahtnam: nope I'm learning
[20:45:09] nahtnam: rcedillor: Then write your own authentication system to learn
[20:45:11] Radar: rcedillor: Authentication is Devise, Authorization is Pundit
[20:45:22] Radar: rcedillor: please don't listen to nahtnam.
[20:45:23] rcedillor: nahtnam: I've used django
[20:45:29] imkj: rcedillor: Radar is correct.
[20:45:53] nahtnam: Radar: I believe thats what you told me. To write my own authentication system to learn
[20:45:56] nahtnam: A long time ago
[20:46:07] Radar: nahtnam: I don't recall ever having that opinion.
[20:46:10] Papierkorb: rcedillor: because if you don't look hard enough, you'll fuck something up and someone will run away with your moniz
[20:46:16] nahtnam: But yeah, Devise and/or Omniauth
[20:46:22] nahtnam: is what I use
[20:46:33] FernandoBasso: has joined #RubyOnRails
[20:46:42] imkj: Pundit for authorization, also.
[20:46:50] niiamon_: has joined #RubyOnRails
[20:46:58] rcedillor: ok, I will check devise and pundit
[20:47:04] l0oky: Found the answer is anyone is interested :) http://stackoverflow.com/questions/10884740/how-to-decorate-nested-attributes-associations-with-draper-in-rails-3
[20:47:09] nahtnam: Is pundit a replacement for cancan?
[20:47:17] nahtnam: or are they different things?
[20:47:18] cnk: Fixtures are really useful if you have a bunch of set up for a site. For example, a CMS will always have a home page, some settings, some navigation
[20:47:21] tubbo: nahtnam: i might have said that, but i *also* said not to actually deploy that code :)
[20:47:27] imkj: nahtnam: Eeh... They're different, but CanCan is kind of inactive.
[20:47:31] tubbo: pundit is a replacement for cancan
[20:47:33] VeryBewitching: I'm a fan of cancancan
[20:47:34] tubbo: in terms of the role it plays
[20:47:36] nahtnam: tubbo: He said he was learning
[20:47:36] cnk: I use fixtures for that stuff and then factories on top for individual items under test
[20:47:45] nahtnam: tubbo: Obviously you wouldnt deploy that code
[20:47:48] nahtnam: At least I didnt
[20:47:57] tubbo: nahtnam: doesn't mean he's not going to deploy "my first rails app" to prod. happens all the time :)
[20:48:13] nahtnam: tubbo: Right. Discourse == example?
[20:48:13] tubbo: sometimes you gotta do what you gotta do
[20:48:15] dman777_alter: in the parent controller, I have def show; @backup_job = @backup_jobs.find(params[:id]) .... how can I make the child controller inherit this value in child def index so I don't have to do the look up twice?
[20:48:17] rcedillor: doesn't devise have authorization support?
[20:48:21] tubbo: nahtnam: discourse == NIH :P
[20:48:38] imkj: rcedillor: Devise doesn't.
[20:49:07] rcedillor: imkj: thanks
[20:49:08] tubbo: nahtnam: but in all seriousness, if you greenfielded Discourse today, it would be far easier. and you'd end up with a different-looking product.
[20:49:17] beauby: has joined #RubyOnRails
[20:49:22] tubbo: for example, Ember Data is in 1.x now
[20:49:31] imkj: rcedillor: No problem. :)
[20:49:40] nahtnam: tubbo: Greenfielded?
[20:49:43] tubbo: they also reinvented a lot of other stuff in their Rails app because Ember at the time couldn't handle it
[20:49:47] tubbo: nahtnam: means start from scratch
[20:50:11] asheinfeld: has joined #RubyOnRails
[20:50:12] imkj: Yeah, the Ember ecosystem is more stable now than it was back when they started Discourse.
[20:50:19] twohlix: damn777_alter: define it in a different function than show
[20:50:20] Radar: dman777_alter: You can't. Do the lookup in the other controller to be explicit.
[20:50:23] twohlix: and just call the function in show
[20:50:23] nahtnam: They also use ember-rails which is horrible now
[20:50:31] nahtnam: They should have switched to ember cli
[20:50:39] nahtnam: *or they should now
[20:51:04] imkj: nahtnam: Ember-CLI + Rails requires Rails to be only used as an API, but yeah. It won't suit some applications.
[20:51:25] nahtnam: Discourse is pretty much an api right?
[20:51:35] dman777_alter: twohlix: hmm...how would that retain the value for the child controller?
[20:51:35] tubbo: the rails app is
[20:51:43] l0oky: Does anyone make logs of this channel?
[20:51:52] twohlix: dman777_alter: its not like they're sharing values, its per request
[20:51:55] imkj: nahtnam: I'm not saying Discourse wouldn't work like that; just not all apps will work with Ember-CLI.
[20:51:56] nahtnam: l0oky: http://goo.gl/uma9x
[20:52:00] twohlix: its just that the child will inherit the parent's functions
[20:52:03] l0oky: I just had an idea to search the logs before asking anything :D
[20:52:08] twohlix: so if you've defined like a set_backup_job method
[20:52:17] twohlix: in the parent, you can use it in both
[20:52:23] dman777_alter: twohlix: no...in this instance it would always be show first...so the child would share the value(or I would like it to)
[20:52:24] Radar: l0oky: !topic
[20:52:24] helpa: l0oky: Read the topic. It contains useful information. Failure to read the topic will result in horrible consequences.
[20:52:28] l0oky: great way to archive useful information
[20:52:41] Radar: l0oky: A million monkeys, something something Shakespeare.
[20:52:50] bronson: has joined #RubyOnRails
[20:52:55] nahtnam: imkj: Why not? If they are written in ember-rails, it can pretty much be written in ember-cli rails
[20:52:59] twohlix: what: look, just set your @backup_job in a different function and call that function from your show method
[20:53:09] tubbo: nahtnam: that is false.
[20:53:12] twohlix: you'll have to call that method in both the parent and the child's show
[20:53:17] nahtnam: tubbo: How so?
[20:53:20] twohlix: but you wont have to copypasta code.
[20:53:20] tubbo: ember-rails was made before ember-cli and follows precisely zero of its conventions
[20:53:41] Radar: twohlix: It's one method. This is a pathetic attempt at being DRY for the sake of being DRY.
[20:53:44] tubbo: nahtnam: no loader, no resolver, no initializers, no es6. would you like me to continue?
[20:53:57] tubbo: it's basically like what ember used to look like around 1.x or right before 1.x
[20:54:00] twohlix: Radar: I just dont know what else is different between his show methods
[20:54:02] nahtnam: tubbo: With ember-rails?
[20:54:10] tubbo: now that we're reaching 2.x, the whole landscape has changed.
[20:54:16] tubbo: nahtnam: yeah, ember-rails is woefully outdated...
[20:54:27] nahtnam: tubbo: Yeah, nothing is stopping them from converting it
[20:54:30] Radar: twohlix: NOTHING is different! imo it's better to be explicit in the controller and have a before_action that is called something like load_parent_resource that does that fetching
[20:54:44] tubbo: one of these rainy days i'd like to go into ember-rails and upgrade it so that it works with the loader & resolver
[20:54:44] Radar: nahtnam: *cough* technical debt
[20:54:48] Radar: nahtnam: *cough* established userbase
[20:54:52] Radar: *cough* *cough* *cough*
[20:54:57] Radar: ACTION dies
[20:55:00] nahtnam: Radar are you oK?
[20:55:01] imkj: Haha, good one Radar.
[20:55:06] twohlix: Radar: thats what I was saying, define the resource fetch in the parent and use a before_action in the parent
[20:55:09] nahtnam: Ok, I understand
[20:55:13] tubbo: Radar: it's more like "why would we use Rails' shitty generator system when we made one of our own?" :)
[20:55:14] twohlix: oh yea, i was saying call it in both show methods
[20:55:17] Lytol: has joined #RubyOnRails
[20:55:17] Radar: twohlix: code example please?
[20:55:20] tubbo: also, the use case is rather narrow
[20:55:22] Radar: tubbo: exactly!
[20:55:28] tubbo: most people do not use ember in the same repo as their rails app
[20:56:01] l0oky: Radar do you have search capability in your logs?
[20:56:06] tubbo: turns out you can also build Electron apps in Ember, so right now i'm trying to make a desktop app with it
[20:56:11] Radar: l0oky: no
[20:56:22] Radar: l0oky: patches welcome :)
[20:56:29] nahtnam: tubbo: True, true. I prefer it in one app tho
[20:56:31] tubbo: i was surprised by how well the two tools fit in together, and how i can develop a desktop app as if it were a website.
[20:56:37] imkj: tubbo: Sounds like fun. A while back I made a mobile app with AngularJS and Phonegap, which was pretty fun. :P
[20:56:39] Radar: twohlix: dman777_alter: this is what I mean: https://gist.github.com/radar/9dcf7cbeddd2f8e7dcc6
[20:56:45] nahtnam: tubbo: ? Which two tools?
[20:56:48] Papierkorb: Is there a rails Cache which caches ruby objects without (de-)serializing them somehow in the applications cache?
[20:56:48] nahtnam: desktop app?
[20:56:48] tubbo: imkj: i hope my experience with electron is better than phonegap
[20:56:51] twohlix: Radar: https://gist.github.com/twohlix/f45914ded690affc84b2
[20:56:52] Papierkorb: *applications memory
[20:56:56] tubbo: nahtnam: ember and electron
[20:57:12] nahtnam: tubbo: Whats electron?
[20:57:15] tubbo: upgrading phonegap when iOS versions changed, and using Xcode, was painful
[20:57:16] Radar: twohlix: Seems bad. Child controller then inherits ALL the everything from the parent controller.
[20:57:19] Lytol: has joined #RubyOnRails
[20:57:20] VeryBewitching: ACTION has bad memories of Phonegap
[20:57:22] twohlix: yes, he said inherits
[20:57:24] tubbo: nahtnam: electron.atom.i
[20:57:26] tubbo: nahtnam: electron.atom.io
[20:57:31] IrishGringo: has joined #RubyOnRails
[20:57:31] twohlix: so i was assuming its a legit child of it
[20:57:40] imkj: tubbo: Eeh, Phonegap has its issues. I didn't get too much into it.
[20:57:47] Radar: twohlix: I think you're wrong there.
[20:58:18] shock_one: has joined #RubyOnRails
[20:58:31] Papierkorb: Ember.js is also used by zendesk. Thank you wikipedia page for bringing up bad memories
[20:58:34] twohlix: radar: okay. That's cool, I dont think I've ever inherited a controller other than applicationcontroller so I didn't understand why he was inheriting but just sayin
[20:59:00] l0oky: Awesome blog Radar! tons of stuff
[20:59:07] Radar: twohlix: not even an Admin::BaseController? :P
[20:59:10] Radar: l0oky: thanks :)
[20:59:26] theery: has joined #RubyOnRails
[20:59:31] x-light: has joined #RubyOnRails
[20:59:39] DoctorMonocular: has joined #RubyOnRails
[21:00:01] srruby: I need help creating an html/css template from a png file. Can you recommend a consultant or service ? It is not involved.
[21:00:17] nahtnam: tubbo: Cordova + Ember?
[21:00:22] nahtnam: Have you ever tried it?
[21:01:23] blackmesa: has joined #RubyOnRails
[21:01:25] twohlix: Radar: good point
[21:02:00] slava_: has joined #RubyOnRails
[21:02:06] bruno-_: has joined #RubyOnRails
[21:02:24] beauby_: has joined #RubyOnRails
[21:02:31] workmad3_: has joined #RubyOnRails
[21:03:10] inoter_: has joined #RubyOnRails
[21:03:27] dopieee: has joined #RubyOnRails
[21:03:52] Rosa: has joined #RubyOnRails
[21:04:22] blahwoop: has joined #RubyOnRails
[21:04:40] cnk_: has joined #RubyOnRails
[21:04:46] speaking1ode: has joined #RubyOnRails
[21:05:03] lytol_: has joined #RubyOnRails
[21:05:10] hahuang61: has joined #RubyOnRails
[21:05:38] krokuz: has joined #RubyOnRails
[21:05:51] asheinfeld: has joined #RubyOnRails
[21:05:54] tubbo: nahtnam: nope
[21:06:08] ElSif: has joined #RubyOnRails
[21:06:10] defswork: has joined #RubyOnRails
[21:06:51] drale2k: has joined #RubyOnRails
[21:07:00] carlosd: has joined #RubyOnRails
[21:07:05] raenk: has joined #RubyOnRails
[21:07:26] rlomax: has joined #RubyOnRails
[21:07:28] thejoecarroll: has joined #RubyOnRails
[21:08:09] tdguy: has joined #RubyOnRails
[21:08:26] lord4163: has joined #RubyOnRails
[21:09:07] kies^: has joined #RubyOnRails
[21:09:36] ankhers: has joined #RubyOnRails
[21:10:10] FernandoBasso: has joined #RubyOnRails
[21:10:35] Rosa: has left #RubyOnRails: ()
[21:11:14] Jarboe: has joined #RubyOnRails
[21:11:53] asheinfeld: has joined #RubyOnRails
[21:12:57] Jarboe: has joined #RubyOnRails
[21:13:47] n1lo: has joined #RubyOnRails
[21:14:18] richipargo: has joined #RubyOnRails
[21:14:22] amortimer: has joined #RubyOnRails
[21:14:24] nahtnam: tubbo: Kk. Ima try it. I heard its amazing
[21:14:40] tubbo: nahtnam: for iOS and stuff?
[21:14:46] nahtnam: tubbo: Ewww
[21:14:47] nahtnam: For android
[21:15:02] tubbo: :rolleyes:
[21:15:12] acovrig: I have a scaffolded resource :requests (/requests), how can I have it make a path/route for types (/requests/new/:request_type)?
[21:15:18] nahtnam: Sorry, I dont pay $400 for an os
[21:16:00] tubbo: you do if you have an android haha
[21:16:04] tubbo: or whatever they cost
[21:16:36] tubbo: i mean it's just a computer with a GSM chipset in it
[21:16:39] tubbo: the OS is what makes it all work
[21:16:53] tubbo: nothing special about a phone other than it's small and it's a walled garden
[21:17:01] manfrin: dumb question, I have an encoded payload "some_value[]=1&some_value[]=2" -- i want to post this to the url in a form, how would I modify that form?
[21:17:11] manfrin: i tried adding it to the value of a hidden field
[21:17:39] manfrin: but when I did that, params had: {the_key_for_that_field: "some_value[]=1&some_value[]=2"} (i.e. it came as a string, not parsed)
[21:17:41] alfie_max15: has joined #RubyOnRails
[21:18:05] chipotle: has joined #RubyOnRails
[21:18:21] nahtnam: tubbo: An iphone has the specs of a $200-300 phone which means that the rest is for the os or "ecosystem"
[21:18:36] acovrig: I can add `get ???requests/new/:request_type??? => ???requests#new???` but then in requests#create if !@request.save, it renders :new, which is nice given it displays the validation error, but params[:request_type] is unset, which breaks things
[21:19:48] nahtnam: and I personally prefer google, with google voice, hangouts, gmail, google now etc
[21:20:41] amortimer: has joined #RubyOnRails
[21:22:06] ur5us: has joined #RubyOnRails
[21:22:17] asheinfeld: has joined #RubyOnRails
[21:22:36] hashrocket: has joined #RubyOnRails
[21:22:47] imkj: nahtnam: I don't like phones where I can't even change the default browser from crappy Safari to Chrome.
[21:22:48] tubbo: nahtnam: typically these discussions end up with someone going "i personally prefer.." or something similar
[21:22:50] SteenJobs: has joined #RubyOnRails
[21:23:09] tubbo: which should tell you something about the argument
[21:23:10] user1138_: has joined #RubyOnRails
[21:23:12] nahtnam: imkj: So you dont like ios?
[21:23:29] imkj: tubbo: It's a personal thing; a lot of people use their phones many times daily.
[21:23:40] tubbo: like arguing about editors
[21:23:42] imkj: nahtnam: You are correct.
[21:23:57] imkj: tubbo: Exactly! Our Vim overlor -- wait, no, no.
[21:24:08] nahtnam: tubbo: Some editors are simply better than others :D
[21:24:30] imkj: Gents, we're on the edge of a flamewar. :p
[21:24:39] nahtnam: has left #RubyOnRails: ()
[21:24:53] imkj: nahtnam: I was just joking.
[21:25:00] imkj: Or was I?
[21:25:52] imkj: Nah, just know how to use whatever you use -- Vim, Emacs, Sublime, whatever.
[21:27:37] acovrig: My controller has a render :new if the request fails validation; can I change what path it renders while keeping parameters?
[21:28:12] user1138: has joined #RubyOnRails
[21:29:25] rubynuby: has joined #RubyOnRails
[21:29:35] blackmesa: has joined #RubyOnRails
[21:31:21] erich: has joined #RubyOnRails
[21:32:01] user1138_: has joined #RubyOnRails
[21:32:10] jamgood96: has joined #RubyOnRails
[21:32:25] AnoHito: has joined #RubyOnRails
[21:33:16] jamgood96: I have a Location model, and have created a LocationAddress model that stores street, city, state. Would it be possible to create a location, and then be able to set location.city or location.street without having to do it via location.location_address.city or location.location_address.street?
[21:33:25] jenrzzz_: has joined #RubyOnRails
[21:33:55] paulcsmith: has joined #RubyOnRails
[21:34:28] l0oky: whats the difference between migration fields and system db fields?
[21:34:46] tubbo: 'system db fields'?
[21:34:59] EminenceHC: has joined #RubyOnRails
[21:35:13] imkj: jamgood96: You could use virtual attributes, I suppose. Define street= and city= on the Location model, and then make it so that it sets it for the LocationAddress model.
[21:35:36] manfrin: jamgood96 there is a railsy way of doing that, lemme try to find it
[21:35:43] manfrin: I think it's delegate
[21:35:51] manfrin: delegate :city, to: :location
[21:36:01] manfrin: buuuut that might just be decorators
[21:36:01] beauby_: has left #RubyOnRails: ()
[21:36:13] beauby: has joined #RubyOnRails
[21:36:44] manfrin: yeah, delegate should work
[21:36:46] manfrin: in location
[21:36:47] l0oky: tubbo: Yeah well, RubyMine can be a bit puzzling, but it creates cool diagrams :D
[21:37:08] manfrin: delegate :[your location address field], to: :location_address
[21:37:20] manfrin: and if you set location.city, it'll set location.location_address.city
[21:37:34] tubbo: you can even do delegate :city, :street, :postal_code, to: :location_address
[21:37:39] tubbo: combine as many attrs on there as you want
[21:38:17] asheinfeld: has joined #RubyOnRails
[21:38:42] manfrin: what imkj is a pretty useful thing to learn as well, though (knowing you can manually set setters/getters)
[21:39:34] tejasmanohar_: has joined #RubyOnRails
[21:39:46] imkj: manfrin: Yeah, though I agree using delegate is more elegant in this situation.
[21:39:59] CodProbo3: has joined #RubyOnRails
[21:40:57] marahin: has joined #RubyOnRails
[21:41:24] djbkd: has joined #RubyOnRails
[21:41:33] marahin: Hey guys. I want to create a button, which when clicked, changes the I18n.locale to :en, and when clicked again, to :pl. What would be the best approach?
[21:43:50] jamgood96: manfrin: awesome. thanks for the tip/info!
[21:44:27] manfrin: marahin, that button could post to a controller setting the session or user locale
[21:44:31] DoctorMonocular: has joined #RubyOnRails
[21:44:54] marahin: manfrin: OK. Does I18n.locale = ... remember the setting, or will it reset every page reload?
[21:45:06] marahin: (assuming that it should be persistent unless user clicks it again)
[21:45:08] manfrin: http://guides.rubyonrails.org/i18n.html#setting-and-passing-the-locale
[21:45:13] user1138: has joined #RubyOnRails
[21:45:19] imkj: marahin: Depending on the usage, maybe including the locale in the URL makes sense too.
[21:45:29] manfrin: you could put the locale in the url
[21:45:35] marahin: imkj: sure it is, however I'm required to make a button for it :P
[21:45:43] marahin: manfrin: yeah I know
[21:45:44] manfrin: or you could put it in the session, and modify set_local (in that link) to look at session
[21:45:51] marahin: yeah, that should work out
[21:45:55] marahin: and it seem it does
[21:45:56] manfrin: if it's in the session, it will persist without it being in the url
[21:45:56] marahin: thanks guys
[21:46:07] imkj: marahin: No problemo.
[21:46:56] user1138_: has joined #RubyOnRails
[21:47:58] riscky: has joined #RubyOnRails
[21:50:10] christiandsg: has joined #RubyOnRails
[21:51:05] yfeldblum: has joined #RubyOnRails
[21:51:08] shock_one: has joined #RubyOnRails
[21:51:10] nya: has joined #RubyOnRails
[21:53:59] djbkd: has joined #RubyOnRails
[21:55:03] cajone: has left #RubyOnRails: ()
[21:56:09] erich: has joined #RubyOnRails
[21:56:37] user1138: has joined #RubyOnRails
[22:00:00] asheinfeld: has joined #RubyOnRails
[22:00:42] jgpawletko: has joined #RubyOnRails
[22:01:04] artto: has joined #RubyOnRails
[22:01:13] DoctorMonocular: has joined #RubyOnRails
[22:01:57] cajone: has joined #RubyOnRails
[22:02:12] user1138_: has joined #RubyOnRails
[22:02:48] Mendenhall: has joined #RubyOnRails
[22:04:01] dcunit3d: has joined #RubyOnRails
[22:04:21] erichu: has joined #RubyOnRails
[22:05:20] user1138__: has joined #RubyOnRails
[22:05:31] erich: has joined #RubyOnRails
[22:07:20] ivanskie: if i'm importing some data that in my database should be boolean, but in csv its "yes" .. or "no"... does rails ignore this or convert it to true/false?
[22:07:47] charliesome: has joined #RubyOnRails
[22:07:58] user1138: has joined #RubyOnRails
[22:08:41] ivanskie: yep.. thought it was a dumb question
[22:09:15] carlosd: has joined #RubyOnRails
[22:11:22] ratmav: has joined #RubyOnRails
[22:11:48] tubbo: ivanskie: nope, it doesn't knwo what type you want that to be
[22:12:07] tubbo: ivanskie: also, this is actually a Ruby thing, because Rails is just using Ruby's CSV lib
[22:12:27] ivanskie: i'll go there
[22:13:41] quazimod1: has joined #RubyOnRails
[22:14:28] wethu: has joined #RubyOnRails
[22:15:07] user1138_: has joined #RubyOnRails
[22:15:08] Papierkorb: simplecov is great. If I think back how long it took for me to set up coverage statistics for C++ stuff .. geeze
[22:15:21] Scriptonaut: has left #RubyOnRails: ()
[22:15:56] michael_mbp: has joined #RubyOnRails
[22:16:21] asheinfeld: has joined #RubyOnRails
[22:16:50] beauby: ivanskie: can't you just use sed 's/yes/true/' and same for false on your csv?
[22:17:04] kara_sweets: has joined #RubyOnRails
[22:17:16] drale2k: has joined #RubyOnRails
[22:17:28] riotjones: has joined #RubyOnRails
[22:17:35] beauby: ivanskie: i.e. replace the values in the csv
[22:17:43] kara_sweets: if a contest has many proposals, and a proposal as one shipment, how do you get all the shipments for a contest?
[22:18:05] beauby: kara_sweets: has_many through
[22:18:05] renegadeandy: is there a way to only allow a certain user run a rake task?
[22:18:13] ivanskie: ah. yah. that was my first instinct to just go in sublime and replace all yes/no with true/false..
[22:18:22] renegadeandy: to stop some idiot with access to the hosting environment running a nasty rake task?
[22:18:25] ivanskie: but then i realized i actually need to keep some in string.
[22:18:33] kara_sweets: beauby: has_many :shipments, :through => :proposals?
[22:18:51] beauby: kara_sweets: something like that yeah
[22:19:10] Papierkorb: renegadeandy: not really
[22:19:11] kara_sweets: i don't understand how to do it if its a has many
[22:19:34] workmad3: renegadeandy: unix file permissions - don't grant global read permission to any of your project, restrict it to user/group and chown appropriately
[22:19:45] Papierkorb: renegadeandy: you can restrict access to the bin/rake and $PATH/rake scripts, but beyond that there's nothing really permission wise
[22:19:48] beauby: kara_sweets: what you wrote should work (if you have a has_many :proposals as well)
[22:20:06] kara_sweets: hmm it didn't work
[22:20:21] workmad3: renegadeandy: if they have root or sudo access, nothing you can do (other than request that their access be removed because they're incompetent)
[22:20:24] kara_sweets: singular proposal?
[22:20:31] Papierkorb: renegadeandy: chown $Allowed_UNIX_User bin/rake $PATH/rake; chmod u+x,go-x bin/rake $PATH/rake
[22:20:48] beauby: kara_sweets: post some code and some error messages
[22:20:51] lethjakman: has joined #RubyOnRails
[22:21:01] theery: has joined #RubyOnRails
[22:21:05] renegadeandy: Papierkorb: workmad3 what if the hosting environment is heroku?
[22:21:09] Papierkorb: renegadeandy: Training those people would be a better approach though I think
[22:21:19] workmad3: renegadeandy: err... not much you can do then
[22:21:30] workmad3: renegadeandy: revoke their heroku access
[22:21:31] Papierkorb: renegadeandy: Then you've already given up your reign over to the devops team of heroku
[22:21:44] user1138: has joined #RubyOnRails
[22:21:52] renegadeandy: ok....is there a guide on running a production system, best practices for backups etc?
[22:22:18] beauby: renegadeandy: it's not really rails-specific
[22:22:23] workmad3: renegadeandy: if there was one, it should start with "Don't let untrustworthy idiots touch your servers"
[22:22:41] tubbo: workmad3: so...no programmers then?
[22:22:57] workmad3: tubbo: pretty much ;)
[22:23:12] beauby: tubbo: arguably programmers shouldn't get close to the production servers
[22:23:23] workmad3: beauby: just as arguably, they should ;)
[22:23:36] shock_one: has joined #RubyOnRails
[22:24:02] Papierkorb: renegadeandy: never let any server/daemon run as root. Just don't. At least, make it drop permissions. Use a user for each daemon, and have that daemon-user only have access to what it really needs. Oh, and never have it run as root. Really wanna stress this one. Not even for "just a day" or something.
[22:24:04] tubbo: the idea between devops is that we're all programmers, but we play different roles
[22:24:19] Papierkorb: renegadeandy: And then, the list goes on and on I guess
[22:24:32] tubbo: it doesn't mean product devs should be doing ops work, it means ops should be standing up servers with code, not with some neckbeard's playbook
[22:24:53] workmad3: renegadeandy: on a technical front, if a user has access to run commands on your heroku app, they also have access to push deploys... so putting in a rake task restriction to prevent them from running a task could just as easily be removed by them...
[22:25:18] renegadeandy: ok! Thanks guys - many good points
[22:25:21] tubbo: renegadeandy: if you're on heroku you don't have to worry about any of this shit
[22:25:23] renegadeandy: interesting discussion!
[22:25:36] tubbo: because no one but you can access the heroku app
[22:25:40] tubbo: on a CLI level that is
[22:25:41] Papierkorb: renegadeandy: If you were in control of the server, then you could do some black magic through SSH authentication. But it's insane and nothing I'd suggest for this.
[22:26:03] workmad3: tubbo: there's also the idea that there shouldn't be a siloed existence between the programmers who know what their app needs and the ops... they should talk, figure out what's needed, and not have a 'throw the code over to ops, let them figure that shit out' approach
[22:26:13] tubbo: this ^^^^
[22:26:17] renegadeandy: tubbo: not if another colleague has cli access to the heroku app,,,
[22:26:18] blackmes1: has joined #RubyOnRails
[22:26:23] nahtnam: has joined #RubyOnRails
[22:26:25] asheinfeld: has joined #RubyOnRails
[22:26:51] tubbo: renegadeandy: actually telling your colleague to his face not do run a particular rake task on prod is probably a lot easier and more effective.
[22:27:18] Papierkorb: renegadeandy: If you want to add annoyance, ask for user confirmation in the rake task. "This is a nasty task, because pizza, run anyway? (y/n)"
[22:28:01] tubbo: warning: this task will also install "GNAA Last Measure" on your local workstation. continue? (y/n)
[22:28:49] workmad3: warning: If you, yes I mean you, run this task without renegadeandy's permission, renegadeandy reserves the right to come to your desk and kick your ass. Continue? (n/n)
[22:29:36] imkj: Warning: Using this script will result in Skynet being activated and will result in all the puppies and babies in the world crying. Are you *sure* you wanna do this? (No / Heck no)
[22:30:09] workmad3: imkj: I've always rooted for the machines in terminator - yes
[22:30:32] renegadeandy: LOL I love that suggestion!
[22:30:52] imkj: workmad3: That's like rooting for The Empire in Star Wars. Oh wait.
[22:31:07] jamgood96: manfrin: can I use delegates for just getting, or is it possible to use it for setting?
[22:31:14] manfrin: it'll work for setting
[22:31:45] artto: has joined #RubyOnRails
[22:31:45] asheinfeld: has joined #RubyOnRails
[22:31:51] manfrin: if it doesnt, add :field= (where field is the actual field you want to set), but I think it works with setters automatically
[22:32:06] manfrin: delegate :city, :city= to:...
[22:32:11] manfrin: but it should work with just :city
[22:32:29] imkj: manfrin: It should work with setters, AFAIK.
[22:32:41] djbkd: has joined #RubyOnRails
[22:32:41] manfrin: i just dont have code in front of me to test
[22:33:01] shock_one: has joined #RubyOnRails
[22:33:05] manfrin: jamgood96 first rule of ruby development: if you dont know, guess and try; ruby is written in a way that what you think might be the method usually is the method
[22:33:22] manfrin: my job is 45% breaking things, and then 45% slowly unbreaking those things
[22:33:36] manfrin: and 10% bitching about how shitty the community at stackoverflow is
[22:33:57] loc22: has joined #RubyOnRails
[22:34:25] jamgood96: i've been trying for a bit, but it's definitely not liking it. i've set up the delegates for street/city/state and set the prefix to :address. but when i do location.address_city it complains about an undefined method
[22:34:36] jamgood96: however, i can access the attributes via location.address_city just find
[22:34:42] imkj: jamgood: You have to add allow_nil: true, possibly.
[22:34:50] imkj: jamgood96*
[22:37:19] _djbkd: has joined #RubyOnRails
[22:37:20] theery: has joined #RubyOnRails
[22:39:00] karmapolice: has joined #RubyOnRails
[22:39:12] renegadeandy: I want to run the confirm task before the delete_users runs, but my syntax is messed up and I cannot workout what it needs to be ; help : task :delete_users => [:confirm] :environment do
[22:39:55] garrypolley: has joined #RubyOnRails
[22:40:00] kara_sweets: has left #RubyOnRails: ()
[22:40:03] jamgood96: imkj: that didn't seem to do it
[22:41:15] imkj: jamgood96: In that case, also delegate the setters explicitly.
[22:41:32] DoctorMonocular: has joined #RubyOnRails
[22:42:11] manfrin: jamgood96 docs dont mention setters, so it might not be implicit
[22:42:15] manfrin: add em to the delegate list
[22:42:59] jamgood96: manfin: they're part of the delegate list, because that's how i'm able to get them, unless i'm misunderstanding what you're saying
[22:43:23] imkj: jamgood96: We mean the var= with the '=' at the end too.
[22:44:11] renegadeandy: I want to run the confirm task before the delete_users runs, but my syntax is messed up and I cannot workout what it needs to be ; help : task :delete_users => [:confirm] :environment do
[22:44:49] arBmind: has joined #RubyOnRails
[22:45:25] carlosd: has joined #RubyOnRails
[22:46:07] craysiii: I am writing a rescue_from in my ApplicationController. When i use { } for the block I get thrown an error, but when I use do...end it works fine. I try to use { } to maintain a standard, is that not possible here?
[22:46:43] Lytol: has joined #RubyOnRails
[22:47:15] renegadeandy: Can somebody please help here, what is wrong with my syntax for a rake task :
[22:47:16] renegadeandy: task :delete_users => [:confirm] :environment do
[22:48:41] asheinfeld: has joined #RubyOnRails
[22:50:09] hahuang61: has joined #RubyOnRails
[22:50:56] christiandsg: has joined #RubyOnRails
[22:51:35] l0oky: has joined #RubyOnRails
[22:51:42] dman777_alter: GET /api/backup_jobs/:backup_job_id/errors(.:format) is the :backup_job_id optional?
[22:51:49] fryguy: dman777_alter: no
[22:52:18] dman777_alter: fryguy: how can I make it optional?
[22:52:24] bonhoeffer: has joined #RubyOnRails
[22:52:29] fryguy: dman777_alter: add a collection route in addition to the member route
[22:54:04] asheinfeld: has joined #RubyOnRails
[22:55:03] dman777_alter: fryguy: thanks!
[22:55:07] dcunit3d: has joined #RubyOnRails
[22:56:44] djbkd: has joined #RubyOnRails
[22:57:22] momomomomo: has joined #RubyOnRails
[22:57:53] maxdoubt: has joined #RubyOnRails
[22:57:55] iamse7en: has joined #RubyOnRails
[22:58:15] renegadeandy: can anybody help me with this syntax question?
[22:58:36] renegadeandy: i want to run task :confirm before task :delete_users, but the syntax is wrong
[22:58:36] renegadeandy: task :delete_users => [:confirm] :environment do
[22:58:43] renegadeandy: not sure what to do to make it work
[22:59:49] dman777_alter: fryguy: http://dpaste.com/1HFNW3T this worked for me for /api/backup_jobs/errors but then I lost the feature of /api/backup_jobs/777/errors
[23:00:23] nofxx: has joined #RubyOnRails
[23:00:28] fryguy: dman777_alter: you add both
[23:01:07] asheinfeld: has joined #RubyOnRails
[23:01:28] marahin: Guys, I'm having an issue. Even though I changed locale through I18n.locale = ... and stored it in a session, Devise still throws flash[] messages in a default language. Everything else (I18n.t('..')) runs OK, only Devise somehow doesn't switch to the other language
[23:01:30] renegadeandy: fryguy: help! Please!
[23:01:42] marahin: any ideas why's that, is there another method to change locales just for devise or wha
[23:02:38] SteenJobs: has joined #RubyOnRails
[23:03:44] dman777_alter: fryguy: thanks
[23:03:53] imkj: marahin: Uh, sure the Devise views are localized properly?
[23:04:09] imkj: marahin: Scratch that, I misread.
[23:04:19] arBmind1: has joined #RubyOnRails
[23:04:24] marahin: imkj: uh, I didn't explain it good I think: the devise views are localized properly, only the flash messages are broken
[23:04:35] marahin: by that I mean, the flash messages are localized with the default locale, not the one I changed to
[23:05:22] marahin: I do have the devise.pl.yml and devise.en.yml, assuming the default language is :pl, and I switched to :en, everything is localized properly except the flash messages, which are still in Polish :P
[23:05:42] imkj: marahin: That's odd. I haven't encountered that before..
[23:06:05] user1138: has joined #RubyOnRails
[23:06:35] asheinfeld: has joined #RubyOnRails
[23:07:49] arooni: has joined #RubyOnRails
[23:08:12] marahin: imkj: OK, I reproduced. It seems that my rails app requires to refresh the site after lang change, and then devise throws the properly localized flash messages
[23:08:22] marahin: seems the location.reload() is not enough, i have to manually do it
[23:08:24] marahin: then it works fine
[23:09:08] marahin: maybe turbolinks is the issue...?
[23:09:23] eyck: has joined #RubyOnRails
[23:09:59] imkj: marahin: Unlikely, but you could try disabling Turbolinks in application(.coffee).js.
[23:10:43] mrbubbles: Trying to parse a date from a csv using Time.zone.parse??? the actual time in the CSV is being stored in the DB (rather than UTC time) which means that when it???s displayed it???s out by an hour. do I need to specify the timezone that it???s being imported from first?
[23:12:42] marahin: imkj: it seems turbolinks was the issue, disabled it and works like a charm :)
[23:13:12] hahuang61: has joined #RubyOnRails
[23:13:15] asheinfeld: has joined #RubyOnRails
[23:13:24] imkj: marahin: Oh really? Wow. Well, let's hope Turbolinks 3 will resolve issues like this one. Good to hear it worked out though. :)
[23:14:47] bronson: has joined #RubyOnRails
[23:15:26] matheuslucena: has joined #RubyOnRails
[23:15:32] user1138_: has joined #RubyOnRails
[23:16:36] paulcsmith: has joined #RubyOnRails
[23:17:34] GreatDanton: has joined #RubyOnRails
[23:17:55] ledestin: has joined #RubyOnRails
[23:18:50] sdwrage: has joined #RubyOnRails
[23:19:43] asheinfeld: has joined #RubyOnRails
[23:19:46] lucena: has joined #RubyOnRails
[23:21:33] lethjakman: has joined #RubyOnRails
[23:21:34] lucena: has joined #RubyOnRails
[23:21:59] htmldrum: has joined #RubyOnRails
[23:22:59] asheinfeld: has joined #RubyOnRails
[23:23:32] hahuang61: has joined #RubyOnRails
[23:24:05] fifi-v: has joined #RubyOnRails
[23:24:19] djbkd: has joined #RubyOnRails
[23:24:56] nettoweb: has joined #RubyOnRails
[23:25:17] blackmes1: has joined #RubyOnRails
[23:25:40] IceyEC: has joined #RubyOnRails
[23:27:40] tejasmanohar_: has joined #RubyOnRails
[23:28:41] asheinfeld: has joined #RubyOnRails
[23:32:25] artto: has joined #RubyOnRails
[23:32:41] Lightsword: has joined #RubyOnRails
[23:33:03] Radar: lol turbolinks
[23:33:27] asheinfeld: has joined #RubyOnRails
[23:33:55] Lightsword: has joined #RubyOnRails
[23:35:32] devdazed: has joined #RubyOnRails
[23:35:36] shock_one: has joined #RubyOnRails
[23:35:47] imkj: Radar: Eh, it happens. It has some weird kinks. Let's hope v3 solves those. :D
[23:36:24] lethjakman: has joined #RubyOnRails
[23:36:42] Mendenhall: has joined #RubyOnRails
[23:40:56] amdbcg1: has joined #RubyOnRails
[23:42:14] asheinfeld: has joined #RubyOnRails
[23:47:14] h7br1x: has joined #RubyOnRails
[23:50:37] asheinfeld: has joined #RubyOnRails
[23:51:12] l0oky: lol I have owner_id in my table called Groups, which should be really called user_id so It can be associated to a user correctly, do I have to rename owner_id to user_id?
[23:51:41] christiandsg: has joined #RubyOnRails
[23:51:42] l0oky: Is there a workaround?
[23:52:33] quazimod1: has joined #RubyOnRails
[23:53:24] ellisTAA: has joined #RubyOnRails
[23:54:07] ellisTAA: when i run my rails in localhost i get a bundle.js ???Uncaught TypeError: Cannot read property 'tagName' of null??? error. anyone seen this before?
[23:54:09] mxrguspxrt: has joined #RubyOnRails
[23:57:16] cnk: I0oky: you can configure the name of the foreign key when you declare your association
[23:58:00] cnk: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many - foreign_key parameter
[23:58:43] Radar: l0oky: belongs_to :owner, foreign_key: "user_id"
[23:58:55] Radar: EllisTAA: steps to reproduce or stacktrace plzkthx
[23:59:11] rickmasta: has joined #RubyOnRails