« Back to channel list

#RubyOnRails - 24 March 2016

« Back 1 day Forward 1 day »
[00:00:12] uglybandersnatch: has joined #RubyOnRails
[00:00:14] smathy: Darmani, this is par for the course with any gem you're using and want to know, you should - at the very least - read its README on github, so for rspec-rails, read this: https://github.com/rspec/rspec-rails
[00:00:19] Darmani: smathy: is rspec-rails different from 'rspec'?
[00:00:43] cnk: it provides hooks to make rspec and rails play well togheter
[00:00:44] smathy: Darmani, yes, rspec-rails is the gem you should be using if you're using rspec in a Rails app, it does other setup stuff for you.
[00:00:59] smathy: Darmani, it's all in that README.
[00:01:53] Darmani: smathy: Alright, I guess I'll get to reading.
[00:03:54] hnanon: has joined #RubyOnRails
[00:04:19] hnanon: Rails treats empty form text fields as empty strings.
[00:04:32] hnanon: I need an empty text field to be treated as nil.
[00:04:56] hnanon: Can I "watch" that parameter and if it's empty, set it to nil in the controller?
[00:05:11] hnanon: Or should I...
[00:05:22] hnanon: (instead of "Can I...")
[00:05:31] JoshGlzBrk: has joined #RubyOnRails
[00:06:04] Arcaire: Just set it before you do anything with the data?
[00:06:11] johnflux_: has joined #RubyOnRails
[00:06:43] hnanon: Arcaire: Some times the field will need to be nil. Other times it will have a value.
[00:07:00] chouhoulis: has joined #RubyOnRails
[00:07:09] Arcaire: So... just set it before you do anything with the data?
[00:07:12] ascarter: has joined #RubyOnRails
[00:07:27] Arcaire: if params[:meme] == ""; params[:meme] = nil
[00:07:37] pragmatism: Why would my capybara tests be blowing up not being able to find assets? I am serving static files. It's looking here: ""/assets/main/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff", which exists.
[00:07:44] Radar: pragmatism: !didntwork
[00:07:44] helpa: pragmatism: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[00:07:54] hnanon: Arcaire: Yes, that's what I was asking. Is it ok to do that?
[00:08:05] pragmatism: That was... fast.
[00:08:08] Arcaire: hnanon: I can't see any reason why it wouldn't be.
[00:08:13] akshat: has joined #RubyOnRails
[00:08:14] Arcaire: pragmatism: Radar is a bot. helpa is also a bot.
[00:08:20] Arcaire: I don't know why we have two, but it's the Ruby way.
[00:08:22] hnanon: Ok, cool. Thanks.
[00:08:23] smathy: pragmatism, are those "" at the start of that significant? Are you maybe include an extra " where you shouldn't be?
[00:08:32] pragmatism: Sorry, I pasted that in.
[00:08:36] pragmatism: Er, added them myself.
[00:08:47] pragmatism: no quotations in the error. I'll put together some better documentation.
[00:08:49] smathy: Ok, back to Radar's comment then. More info needed.
[00:09:05] smathy: pragmatism, and actually copy and paste the thing to avoid more typos.
[00:09:11] noodman: has joined #RubyOnRails
[00:10:13] pragmatism: https://gist.github.com/dankozlowski/dd9b325083893f30d719
[00:10:30] Radar: pragmatism: Asset path is wrong.
[00:10:51] Radar: This path: /assets/main/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff is not what will request this file: app/assets/fonts/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff
[00:10:52] Arcaire: >/assets/main
[00:10:55] Arcaire: >/assets/fonts/
[00:11:00] Arcaire: welp, beaten
[00:11:10] Radar: My guess is that a request to /assets/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff might work?
[00:11:15] pragmatism: I just joined this project, and that path works in production. Why would it fail in test?
[00:11:21] Radar: Radar-bot has finished evaluation for this question.
[00:11:25] smathy: pragmatism, are you kidding me, did you read every part of that error?
[00:11:30] smathy: It TELLS YOU what the issue is.
[00:12:10] pragmatism: Okay, thanks for the help.
[00:12:12] smathy: No, wait, that's your own text. Line 7?
[00:12:30] pragmatism: Yup, my text.
[00:12:30] Arcaire: Yeah that was a comment added by prag.
[00:12:42] smathy: Ok ok, I'm calming down, sorry.
[00:12:52] Arcaire: What're you gonna do when the smathmania comes for YOU?
[00:13:02] pragmatism: Try a different IRC channel, probly.
[00:13:10] pragmatism: Or just post on Stack.
[00:13:23] Arcaire: You'd probably get a response by one of three people who are in here too.
[00:13:31] pragmatism: So yeah, unsure why this path would work in prod, but not for capybara in test.
[00:13:42] Arcaire: Asset precompilation, perhaps?
[00:13:46] jfelchner: has joined #RubyOnRails
[00:13:54] smathy: No, it's ok. Add the code that's producing that route, the one with `main` in it.
[00:14:04] pragmatism: In fact, it only fails when I'm using the JS webdriver (PhantomJS), but succeeds with Rack::Test.
[00:14:27] smathy: Running outside of a test, in your app, does it produce that path?
[00:14:36] theblang: has joined #RubyOnRails
[00:14:42] Radar: ACTION is trying to understand why it matters if it's "" or if it's nil
[00:14:47] Radar: ACTION was scrolled up
[00:14:51] pragmatism: That's not a bot.
[00:14:58] smathy: It's very advanced.
[00:15:01] pragmatism: Yeah yeah :P
[00:15:03] smathy: ...and organic.
[00:15:11] pragmatism: Humans are pretty cool computers.
[00:15:12] Radar: What even is consciousness
[00:15:34] Arcaire: Wait Radar isn't a bot?
[00:15:45] Arcaire: I thought it was a neural network experiment by baweaver.
[00:15:49] pragmatism: No, he's a great developer though.
[00:15:56] baweaver: don't give it away
[00:16:05] baweaver: I just got him to pass turing tests
[00:16:07] Inside: has joined #RubyOnRails
[00:16:07] Inside: has joined #RubyOnRails
[00:16:15] baweaver: ...which I still fail
[00:16:18] n008f4g_: has joined #RubyOnRails
[00:16:20] Arcaire: Does he work with the turing test extra credit?
[00:16:24] pragmatism: Being human is hard.
[00:16:27] Arcaire: https://xkcd.com/329/
[00:17:38] pragmatism: Viewing the page in development, paths such as `assets/main/hero/hero_home-a63c7d90f6d3dbf5206c40818feaa7fc.jpg` are all over the place, working well.
[00:17:47] Radar: this seems wrong /assets/main
[00:17:58] Radar: Where is the "main" directory in your assets path? it isn't app/assets/fonts/main... ?
[00:17:58] pragmatism: We have app/assets/main/*
[00:18:19] smathy: pragmatism, you said the font is in app/assets/fonts though.
[00:18:26] pragmatism: app/assets/fonts/main/* exists, and contains the file that test is having trouble finding.
[00:18:38] pragmatism: Apologies, didn't mean to be unclear: main exists under each asset type
[00:18:41] Radar: I am out of ideas then.
[00:18:51] smathy: pragmatism, you said: "This file exists in app/assets/fonts/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff"
[00:18:59] smathy: pragmatism, and now you're saying it's in app/assets/fonts/main
[00:19:26] pragmatism: Fuck, sorry, smathy! It's in app/assets/fonts/main/e56*
[00:19:57] smathy: Is absolute perfection really too much to ask! Ok, np.
[00:19:58] pragmatism: You can definitely yell at me for that one.
[00:20:16] smathy: So the file is in app/assets/fonts/main and the path that's being generated is /assets/main/ ?
[00:20:27] wldcordeiro: has joined #RubyOnRails
[00:20:41] pragmatism: ... a path which works in prod and dev, but not in test under the JS webdriver.
[00:20:47] smathy: pragmatism, ok, so what's the code that's generating that path? I assume that's in an SCSS file somewhere?
[00:21:06] smathy: pragmatism, /assets/main works in dev?
[00:21:13] hnanon: Radar: For Friendly ID, the slug is regenerated based off a post title, for example, if it's value is nil. So if there exists a field to manually create a slug and it's left empty, the slug would be an empty string.
[00:21:32] smathy: pragmatism, like you can type in http://localhost:3000/assets/main/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff and you get a file?
[00:22:01] pragmatism: No, I can't, that results in the same error.
[00:22:04] pragmatism: Okay, good call
[00:22:15] Radar: Darmani: Did you figure out your RSpec error?
[00:22:18] Radar: hnanon: I see.
[00:22:20] kdough: has joined #RubyOnRails
[00:22:33] smathy: pragmatism, so what's ACTUALLY working in dev?
[00:22:53] smathy: pragmatism, look inside your generated application.self-FINGERPRINT.css file.
[00:23:17] northfurr: has joined #RubyOnRails
[00:23:42] smathy: Radar, they're off reading the rspec-rails README (and changing from using the rspec gem to using the rspec-rails gem).
[00:23:50] pragmatism: smathy This is how it's called in the scss: font-url("main/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff") format("woff"),
[00:24:10] pragmatism: Checking the fingerprint file.
[00:24:48] eyeamaye: After my application has been idle in development for a while, this method returns an empty array. I should note that in order to make it return a populated array after starting the server I had to enable config.eager_load http://pastie.org/10771743
[00:24:48] smathy: pragmatism, wait, that's the resulting CSS? Or that's actually what you have in your SCSS file?
[00:24:57] pragmatism: That's what is actually in the SCSS file.
[00:25:20] smathy: pragmatism, ok, you're very confused, read this: http://guides.rubyonrails.org/asset_pipeline.html
[00:25:42] smathy: pragmatism, np.
[00:25:53] bob434: has joined #RubyOnRails
[00:25:55] pragmatism: Is there a section here you want me to read specifically? The font_url helper?
[00:26:13] dalbusch1t: has joined #RubyOnRails
[00:26:17] Radar: smathy: Shouldn't be required for that chapter of the book.
[00:26:29] smathy: I want you to read everything, but I can't stop you if you jumped to http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets
[00:26:37] hnanon: pragmatism: I have the following in my scss file and it works fine for me: src: font-url('some-font-name-here.woff') format('woff');
[00:26:48] smathy: Radar, I didn't hear anything about a book.
[00:27:03] Radar: smathy: oh you're missing some context. Darmani is going through R4IA.
[00:27:09] pragmatism: Ah, okay, duh. That's how I understood it, I wasn't sure if the main was required.
[00:27:13] Radar: smathy: the "bacon" example is from the 2nd chapter, before we get to Rails
[00:27:14] smathy: Radar, never mentioned it.
[00:27:15] pragmatism: Thanks again!
[00:27:33] Darmani: Oh hey Radar.
[00:27:36] Radar: Hi DragonPunch
[00:27:39] Radar: Whoops, wrong D.
[00:27:44] Radar: Darmani: Hi!
[00:27:45] smathy: pragmatism, based on what you just said you're still clueless.
[00:28:03] pragmatism: So supportive!
[00:28:05] Darmani: So in chapter 4 they you were talking about RSpec (which I'm still learning how to do) so I went back a few chapters to see if I could figure it out.
[00:28:10] Darmani: I got stuck trying to set it up.
[00:28:12] hnanon: But my font is located at: app/assets/fonts
[00:28:45] smathy: pragmatism, just wanted to get it in before you ran away thinking you were all over this.
[00:29:16] smathy: pragmatism, we're all clueless in various things, better to know so you can do something about it.
[00:29:26] pragmatism: Yes yes, academia did teach me that.
[00:29:43] someish: has joined #RubyOnRails
[00:30:54] rubyonrailed: has joined #RubyOnRails
[00:31:01] hnanon: pragmatism: Do you have a line similar to this in your application.rb file? config.assets.paths << Rails.root.join("app", "assets", "fonts")
[00:31:15] pragmatism: I do, thanks though.
[00:31:29] pragmatism: Again, we precompile our assets in prod, and this code works.
[00:31:30] hnanon: And you have "main" in there?
[00:31:39] pragmatism: well. fonts/main*
[00:31:42] hnanon: I missed the earlier part of the question.
[00:32:14] pragmatism: No worries, I appreciate the help: I have a reference in an SCSS that works in dev, non-js test, and prod, but not in js-test.
[00:32:14] Radar: pragmatism: can you repro in a new app??
[00:32:41] pragmatism: Radar I haven't tried that yet.
[00:33:26] Radar: Dunno where that other question mark came from.
[00:33:34] pragmatism: Too much coffee?
[00:33:52] pragmatism: Or crack, you know, w/e.
[00:34:07] Radar: Too much chocolate. Easter bunny came to our office this morning.
[00:34:17] mustmodify: has joined #RubyOnRails
[00:34:37] Ropeney: Yes, the easter bunny is so generous!
[00:34:48] mustmodify: So my error interpolation doesn't seem to be working. "%{value.inspec t} does not appear to be a valid email address for %{model.name}" produces "Email %{value.inspect} does not appear to be a valid email address for %{model.name}"
[00:34:51] mustmodify: shouldn't that work?
[00:34:59] Ropeney: I think about losing some weight, it comes and reassures me I shouldn't
[00:35:43] Ropeney: mustmodify, value.inspect <-- no space between c and t
[00:36:06] mustmodify: yeah that was a copy/paste error. Sorry about that.
[00:36:09] mustmodify: but it's right in the code.
[00:36:18] Ropeney: odd copy paste error, normally copies exactly
[00:36:22] smathy: pragmatism, everything you need to know is in that guide. Hint: if you're hard-coding a fingerprint in any file ever, then you're gonna have a bad day.
[00:36:25] Ropeney: gist your file so we can see more context :)
[00:36:46] pragmatism: smathy Yeah, digesting now! And no, I at least know to not do that :)
[00:36:54] mustmodify: Yeah something's up with PUTTY. I keep meaning to look in to that.
[00:37:00] Arcaire: Use Bitvise.
[00:37:02] smathy: pragmatism, ...but you told me that's exactly what you had in your SCSS file.
[00:37:42] smathy: [18:23:50] pragmatism: smathy This is how it's called in the scss: font-url("main/e56ecb6d-da41-4bd9-982d-2d295bec9ab0.woff") format("woff"),
[00:37:42] smathy: [18:24:56] pragmatism: That's what is actually in the SCSS file.
[00:37:46] diegoaguilar: has joined #RubyOnRails
[00:37:55] pragmatism: That's not a fingerprint, that's the UUID one of the other engineers decided to name the font file.
[00:38:52] Inside: hey lovers
[00:38:54] smathy: Oh, I didn't notice that, my mistake. Well that makes things not as bad, still keep reading.
[00:39:12] pawnbox: has joined #RubyOnRails
[00:40:21] rakm: has joined #RubyOnRails
[00:42:40] yoshie902a: has joined #RubyOnRails
[00:42:49] Cohedrin: has joined #RubyOnRails
[00:45:09] Devalo: has joined #RubyOnRails
[00:50:04] baweaver: has joined #RubyOnRails
[00:52:43] lessless: has joined #RubyOnRails
[00:55:34] barajasfab: has joined #RubyOnRails
[00:57:00] bob434: has joined #RubyOnRails
[00:57:36] muhammadn: has joined #RubyOnRails
[00:59:56] yoshie902a: is there a way to pass a parameter to foreman to set an enviromental variable? like ARGV[0]? I know I can specify an environmental variable file, but I don’t want to save any passwords in any files, i would prefer to pass them realtime.
[01:00:08] twilling: has joined #RubyOnRails
[01:00:32] clorisu: anyone know whats going on here https://ghostbin.com/paste/nadh4
[01:01:01] Radar: clorisu: line 3 of your model
[01:01:17] clorisu: think its my hashed password
[01:01:51] htmldrum: has joined #RubyOnRails
[01:01:52] htmldrum_: has joined #RubyOnRails
[01:02:22] clorisu: is it because its too long radar?
[01:03:01] Radar: clorisu: What is it doing on that line of your model
[01:03:21] chouhoulis: has joined #RubyOnRails
[01:04:00] clorisu: i think i mightve accidentally pasted that
[01:04:03] clorisu: i dont recall that being there
[01:04:05] clorisu: let me see
[01:04:29] sypheren: has joined #RubyOnRails
[01:05:25] clorisu: yep, seems so. fixed it
[01:06:11] patrick-sartent: has joined #RubyOnRails
[01:08:11] jottr: has joined #RubyOnRails
[01:08:43] hotpancakes: has joined #RubyOnRails
[01:10:33] silverdust: In the request object I see #query_string and #query_hash methods but when I try request.query_hash I get undefined method. Why is that?
[01:12:01] halfamind: has joined #RubyOnRails
[01:12:47] silverdust: oh how else can I get a hash of query parameters without using params. I need this to analyze an API
[01:14:21] maxz: has joined #RubyOnRails
[01:17:30] northfurr: has joined #RubyOnRails
[01:17:37] sarink: has joined #RubyOnRails
[01:19:02] baweaver: has joined #RubyOnRails
[01:22:16] yoshie902a: has left #RubyOnRails: ()
[01:24:07] snowy: has joined #RubyOnRails
[01:24:22] mustmodify: has left #RubyOnRails: ()
[01:24:33] Tref: has joined #RubyOnRails
[01:27:05] gambl0re: has joined #RubyOnRails
[01:28:02] daveomcd_: has joined #RubyOnRails
[01:28:22] sleungcy: has joined #RubyOnRails
[01:28:44] joshkovach: has joined #RubyOnRails
[01:30:47] patrick-sartent: has joined #RubyOnRails
[01:31:20] chipotle: has joined #RubyOnRails
[01:33:20] uglybandersnatch: has joined #RubyOnRails
[01:35:02] tpendragon: has joined #RubyOnRails
[01:35:39] dandaman: has joined #RubyOnRails
[01:36:02] maxz: has joined #RubyOnRails
[01:36:35] mustmodify: has joined #RubyOnRails
[01:37:33] mustmodify: so this is probably dumb... I have a form where someone can enter a person or, using auto-complete, can select an existing person. How should I ignore the person's name if they auto-complete and fill in the person_id ?
[01:38:03] mustmodify: I was thinking I could delete it in the controller, but that seems like I'm solving a UI problem on the back end, #dirty
[01:42:13] sevenseacat: has joined #RubyOnRails
[01:45:00] eyeamaye: when dealing with polymorphic relationships, is there anyway to automatically build the polymorphic association by setting the type with a hidden field in the form?
[01:45:33] dandaman1: has joined #RubyOnRails
[01:46:00] noodman: has joined #RubyOnRails
[01:49:48] hotpancakes: has joined #RubyOnRails
[01:57:29] sneakerhax: has joined #RubyOnRails
[01:59:24] hotpancakes: has joined #RubyOnRails
[02:07:24] maxz: has joined #RubyOnRails
[02:07:27] htmldrum: has joined #RubyOnRails
[02:07:28] htmldrum_: has joined #RubyOnRails
[02:09:08] pawnbox: has joined #RubyOnRails
[02:10:29] watersoul: has joined #RubyOnRails
[02:11:13] patrick-sartent: has joined #RubyOnRails
[02:14:07] stannard: has joined #RubyOnRails
[02:14:36] one_zero: has joined #RubyOnRails
[02:17:39] Tref: has joined #RubyOnRails
[02:18:37] Regulati_: has joined #RubyOnRails
[02:22:36] sleungcy: has joined #RubyOnRails
[02:23:15] northfurr: has joined #RubyOnRails
[02:24:21] snowy: has joined #RubyOnRails
[02:24:56] tfitts: has joined #RubyOnRails
[02:24:59] Uber|Dragon: has joined #RubyOnRails
[02:26:22] DragonPunch: Would you do validation outside of ActiveRecord?
[02:29:54] mank: has joined #RubyOnRails
[02:31:07] User458764: has joined #RubyOnRails
[02:31:33] htmldrum: has joined #RubyOnRails
[02:31:34] htmldrum_: has joined #RubyOnRails
[02:40:46] KnownSyntax: has joined #RubyOnRails
[02:40:50] KnownSyntax: has joined #RubyOnRails
[02:41:10] kuroro: has left #RubyOnRails: ()
[02:44:06] DragonPunch: has joined #RubyOnRails
[02:45:12] halfamind: has joined #RubyOnRails
[02:46:06] Devalo: has joined #RubyOnRails
[02:47:07] northfurr: has joined #RubyOnRails
[02:52:44] silentpost: has joined #RubyOnRails
[02:53:07] Radar: DragonPunch: You are a good human. <- Validation outside of ActiveRecord
[02:53:11] Radar: Q.E.D. go home everyone
[02:53:30] Radar: I validated you.
[02:56:21] diegoaguilar: has joined #RubyOnRails
[02:58:30] patrick-sartent: has joined #RubyOnRails
[03:06:07] muhammadn: has joined #RubyOnRails
[03:06:58] djbkd: has joined #RubyOnRails
[03:08:02] DragonPunch: Radar hue hue nvm
[03:08:09] DragonPunch: im just exploring ruby ;#
[03:08:15] DragonPunch: its been so much fun lately
[03:08:23] sevenseacat: no you're not, you're exploring rails
[03:08:37] DragonPunch: i keep messing that up
[03:08:56] DragonPunch: basically, what i wanted to do was know how to do add fields to my tables in my db
[03:09:03] DragonPunch: seems to be in my db/migrate
[03:09:24] DragonPunch: sevenseacat: then what does models/active record do?
[03:09:41] sevenseacat: http://guides.rubyonrails.org/active_record_basics.html
[03:09:46] DragonPunch: i went through that
[03:09:50] DragonPunch: but its not hitting me
[03:09:55] DragonPunch: let me try again
[03:09:55] sevenseacat: and what part wasnt clear?
[03:10:13] sevenseacat: "what is active record" is the first section
[03:10:59] Radar: This is true.
[03:12:09] uglybandersnatch: has joined #RubyOnRails
[03:12:38] duncannz: has joined #RubyOnRails
[03:13:28] blackmesa: has joined #RubyOnRails
[03:13:45] statelesscode: has joined #RubyOnRails
[03:13:52] patrick-sartent: has joined #RubyOnRails
[03:14:36] Ropeney: Radar, on your blog, does your highlighting use a JS library I can't see?
[03:14:50] Radar: Ropeney: Any post in particular?
[03:15:08] Ropeney: Main screen, first code snippet its whilighting keywords
[03:15:26] Radar: Ropeney: Oh that. That's pygments iirc
[03:15:31] Ropeney: oooh `beginning_of_month..end_of_month` spelling mistake too
[03:16:51] _Tariq: has joined #RubyOnRails
[03:17:14] Radar: I can't remember how it works
[03:17:18] sleungcy: has joined #RubyOnRails
[03:17:19] Radar: https://github.com/radar/ryanbigg.com is the code
[03:18:29] sevenseacat: i dont see a spelling mistake there
[03:18:41] Ropeney: I haven't seen the .. before, whats it do?
[03:18:56] Ropeney: ACTION walks away
[03:19:27] Ropeney: some things can't be unsaid
[03:19:46] pawnbox: has joined #RubyOnRails
[03:19:53] baweaver: has joined #RubyOnRails
[03:20:11] johnflux: has joined #RubyOnRails
[03:20:53] Radar: What sevenseacat said.
[03:21:05] halfamind: has joined #RubyOnRails
[03:21:24] Ropeney: Yes, sevenseacat is very correct; I had a stupid moment
[03:22:27] Radar: We would've also accepted "I had a dumb"
[03:22:42] Ropeney: I felt it needed to be more emphasised :(
[03:23:04] sevenseacat: I did have to look at it once or twice because its a bit confusing calling beginning_of_month.end_of_month on one line and then beginning_of_month..end_of_month on the next
[03:23:39] sevenseacat: i probably would have named the end_of_month var differently
[03:23:42] Radar: My (non-mentioned) point about that being confusing code is being highlighted :)
[03:26:49] zzach: has joined #RubyOnRails
[03:27:38] Caerus: has joined #RubyOnRails
[03:28:53] patrick-sartent: has joined #RubyOnRails
[03:29:22] fedexo: has joined #RubyOnRails
[03:30:06] Arcaire: beginning_of_month..end_of_month
[03:30:11] Arcaire: >no space between '..'
[03:30:18] Arcaire: `beginning_of_month .. end_of_month` please
[03:30:50] Arcaire: I bet you're one of those people that doesn't space out additions too.
[03:30:59] Arcaire: [[ triggering intensifies ]]
[03:37:16] Radar: https://learnxinyminutes.com/docs/ruby/
[03:37:26] Radar: All range examples there do not use spaces.
[03:37:38] Radar: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
[03:37:48] Radar: This Ruby style guide explicitly calls out spaces as a bad practice.
[03:37:57] Radar: Arcaire: how about dem facts?
[03:38:09] sevenseacat: ACTION gets Arcaire some cold water for dat burn
[03:38:10] Radar: https://github.com/bbatsov/ruby-style-guide#spaces-operators
[03:38:18] Radar: Ruby style guide also says that operators should have spaces
[03:38:20] Arcaire: absolutely haram
[03:38:35] Arcaire: tbf the issue was more because irccloud is sans-serif
[03:38:44] Radar: well whos fault is that
[03:38:46] Arcaire: as i look at it with a menlo font it looks way better
[03:38:50] Arcaire: it's actually irccloud's
[03:38:54] Radar: of course
[03:39:02] sevenseacat: ACTION configured textual to use a monospace font and is winning at life
[03:39:06] Radar: I'm using MyriadPro because I'm a rebel.
[03:39:21] emachnic: has joined #RubyOnRails
[03:40:09] kinduff: has joined #RubyOnRails
[03:43:02] mank: has joined #RubyOnRails
[03:45:10] gabr13l: has joined #RubyOnRails
[03:45:29] kalimotxo: has joined #RubyOnRails
[03:45:47] zave: has joined #RubyOnRails
[03:46:37] zave: hi, can i ask an active record question here?
[03:48:11] zave: thank you. i'm using rolify and pundit...and would like to add a role to the users_role table based on a role parameter passed during user create...
[03:48:29] zave: a record to the users_role table, i mean...
[03:48:56] zave: i think that's pretty straight forward in the UI, but i'm wondering how i could test that in the console?
[03:49:32] zave: or maybe i should skip that and get straight to making it work in the UI?
[03:49:38] zave: the controller, i mean.
[03:50:31] sevenseacat: i dont think setting a role based on user input is a good idea
[03:50:49] patrick-sartent: has joined #RubyOnRails
[03:50:54] sevenseacat: user changes form to submit role="admin" instead -> boom
[03:51:47] zave: good point, alternate suggestions?
[03:52:16] patrick-sartent: has joined #RubyOnRails
[03:52:30] sevenseacat: if you want to set a default role, set that in the user create action
[03:54:49] zave: and then only let admins change it to something non-default?
[03:55:21] sevenseacat: that would make sense i think.
[03:55:51] sevenseacat: user-signup and admin-creates-new-user would be two totally separate processes
[03:55:55] emachnic: has joined #RubyOnRails
[03:58:47] sonofdirt: has joined #RubyOnRails
[03:59:34] patrick-sartent: has joined #RubyOnRails
[03:59:51] Inside: has joined #RubyOnRails
[03:59:51] Inside: has joined #RubyOnRails
[04:02:00] sonofdirt: has joined #RubyOnRails
[04:02:26] TheNet: has joined #RubyOnRails
[04:03:25] zave: sevenseacat: so in the def user_params method, how do i permit the inclusion of the role parameter, if it's not a field in the user model?
[04:03:57] sevenseacat: permitting has to do with params from the form, nothing to do with fields in the model - you can permit anything you want
[04:04:12] zave: perfecto
[04:04:25] zave: makes sense
[04:05:32] zave: so the first part `params.require(:user)`, doesn't prohibit you from using params that aren't in the user model?
[04:05:51] sevenseacat: nope, it just enforces that params[:user] is present
[04:05:54] sevenseacat: and throws a 400 Bad Request if it isnt
[04:06:09] DonOtreply: has joined #RubyOnRails
[04:07:06] baweaver: has joined #RubyOnRails
[04:10:53] DragonPunch: has joined #RubyOnRails
[04:11:40] sleungcy: has joined #RubyOnRails
[04:14:11] braincrash: has joined #RubyOnRails
[04:14:36] moei: has joined #RubyOnRails
[04:20:49] alex88: has joined #RubyOnRails
[04:20:55] smoitra: has joined #RubyOnRails
[04:23:52] treaki__: has joined #RubyOnRails
[04:27:14] zave: has joined #RubyOnRails
[04:34:17] zave: sevenseacat: so if i add :role to permit() in the user controller, then i should be able to do User.create(email:"foo",first_name:"foo",last_name:"bar",password:"foo",role:"test")
[04:34:18] joshkovach: has joined #RubyOnRails
[04:34:26] zave: in the console?
[04:34:42] sevenseacat: User.create has nothing to do with permitting params in a controller
[04:34:45] pawnbox: has joined #RubyOnRails
[04:34:52] sevenseacat: in the console, the controller isnt touched
[04:35:06] sevenseacat: you're calling the model directly
[04:35:08] zave: i was wondering about that. was gonna ask that before i tried
[04:35:51] zave: ok, then back to my original question, should i just start working on making it work in the UI, and skip trying to test it in the console?
[04:37:17] pawnbox: has joined #RubyOnRails
[04:37:25] sevenseacat: I think the console first will give you a better understanding about the pieces in MVC, seeing as they appear to be a bit fuzzy to you
[04:38:27] zave: then how to use the role parameter in the console? the plan is to use it to add the user_id and role in the user_role table.
[04:40:00] sevenseacat: you could either do a second query to insert the extra record, or use accepts_nested_attributes to create two records with one AR call (I probably wouldn't recommend doing that)
[04:44:21] merida: has joined #RubyOnRails
[04:45:02] stannard: has joined #RubyOnRails
[04:47:57] gabr13l: has joined #RubyOnRails
[04:49:25] griffindy: has joined #RubyOnRails
[04:51:21] errakeshpd: has joined #RubyOnRails
[04:52:50] errakeshpd: Have one doubt about one implementation, auto complete prediction showing in textbox (like place holder) instead of showing ul> li lists. How to implement this ?
[04:53:29] sevenseacat: start writing some javascript
[04:53:52] sevenseacat: nothing to do with rails.
[04:56:14] errakeshpd: yeah I know that, But what attribute can able to show the remaining text to the front end .
[04:56:23] sevenseacat: placeholder? :)
[04:56:51] sevenseacat: or a normal data attribute and get creative with css to make it look like it's a placeholder
[04:56:57] sevenseacat: either way, nothing to do with rails
[04:59:13] yatish27: has joined #RubyOnRails
[04:59:34] pawnbox: has joined #RubyOnRails
[05:01:16] DiCablo: has joined #RubyOnRails
[05:01:50] norc_: has joined #RubyOnRails
[05:05:22] krz: has joined #RubyOnRails
[05:06:04] sleungcy: has joined #RubyOnRails
[05:12:56] TheNet: has joined #RubyOnRails
[05:13:14] rrrepsaj: has joined #RubyOnRails
[05:13:32] dionysus69: has joined #RubyOnRails
[05:13:58] tildes: has joined #RubyOnRails
[05:14:12] blackmesa: has joined #RubyOnRails
[05:14:44] ascarter: has joined #RubyOnRails
[05:14:45] pawnbox: has joined #RubyOnRails
[05:15:16] jfelchner: has joined #RubyOnRails
[05:18:45] hotpancakes: has joined #RubyOnRails
[05:26:20] hotpancakes: has joined #RubyOnRails
[05:27:40] ascarter: has joined #RubyOnRails
[05:29:27] Pazician: has joined #RubyOnRails
[05:34:22] krz: has joined #RubyOnRails
[05:42:53] ur5us: has joined #RubyOnRails
[05:43:12] ascarter: has joined #RubyOnRails
[05:47:30] njero: has joined #RubyOnRails
[05:50:14] ur5us: has joined #RubyOnRails
[05:52:37] sonofdirt: has joined #RubyOnRails
[05:53:01] uglybandersnatch: has joined #RubyOnRails
[05:59:48] sarink: has joined #RubyOnRails
[06:00:15] sleungcy: has joined #RubyOnRails
[06:04:47] Disavowed: has joined #RubyOnRails
[06:05:52] wenchenx_: has joined #RubyOnRails
[06:06:47] DragonPunch: what is the @ symbol in rails stand for
[06:07:32] sevenseacat: DragonPunch: !twgr
[06:07:32] helpa: DragonPunch: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[06:10:05] pablo: has joined #RubyOnRails
[06:10:47] valetudo: has joined #RubyOnRails
[06:13:13] dionysus69: has joined #RubyOnRails
[06:13:17] htmldrum: has joined #RubyOnRails
[06:13:19] htmldrum_: has joined #RubyOnRails
[06:15:01] blackmesa: has joined #RubyOnRails
[06:22:02] sarink: has joined #RubyOnRails
[06:22:28] rogue_koder: has joined #RubyOnRails
[06:24:25] baash05: has joined #RubyOnRails
[06:25:09] baash05: Hey guys.. I have a serializer for a specific model.. But for one case I don't want to use that serializer.. I want to serve up the raw record.
[06:26:25] Radar: DragonPunch: We cannot be expected to teach you the basics of Ruby in here. You should learn Ruby before asking questions in here.
[06:26:40] merida_: has joined #RubyOnRails
[06:27:31] eyeamaye: has joined #RubyOnRails
[06:27:38] baweaver: baash05: http://stackoverflow.com/questions/8923172/is-there-a-way-to-skip-serialization-in-rails-3-1
[06:28:41] Macaveli: has joined #RubyOnRails
[06:29:48] beauby: has joined #RubyOnRails
[06:29:53] cd-rum: has joined #RubyOnRails
[06:31:15] DragonPunch: Radar: I tried to google what the @ sign was but there was not a straight forward answer
[06:31:31] DragonPunch: Radar: Then I googled RUBY SYNTAX and it got me to where I needed to go, #Google_Skills
[06:33:45] baash05: thanks heaps
[06:34:23] TheNet: has joined #RubyOnRails
[06:37:14] yfeldblum: has joined #RubyOnRails
[06:38:38] patrick-sartent: has joined #RubyOnRails
[06:38:41] voidDotClass: has joined #RubyOnRails
[06:39:36] voidDotClass: By default, if you specify a route like get '/foo/:p1/:p2', then should you call the url as /foo/bar/baz or /foo?p1=bar&p2=baz ?
[06:39:57] sevenseacat: the first one, though both wouldwork.
[06:45:00] Abhijit: has joined #RubyOnRails
[06:45:11] djbkd: has joined #RubyOnRails
[06:45:22] Abhijit: inside a .each loop how can i know if the current item is last one? without using index.
[06:46:53] htmldrum: has joined #RubyOnRails
[06:46:55] htmldrum_: has joined #RubyOnRails
[06:49:03] ayonkhan: has joined #RubyOnRails
[06:51:57] djbkd: has joined #RubyOnRails
[06:54:30] sleungcy: has joined #RubyOnRails
[06:56:16] uglybandersnatch: has joined #RubyOnRails
[06:56:31] andywww: has joined #RubyOnRails
[06:57:14] andywww: has anyone made any kind of attempt to develop on any of these laptop replacement iOS or Android tablets?
[06:59:20] arup_r: has joined #RubyOnRails
[07:04:02] DragonPunch: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[07:05:36] eyeamaye: has joined #RubyOnRails
[07:06:13] pawnbox: has joined #RubyOnRails
[07:06:24] Radar: Abhijit: You can't.
[07:06:42] Devalo: has joined #RubyOnRails
[07:08:15] hotpancakes: has joined #RubyOnRails
[07:10:47] sevenseacat: ACTION issues a head :no_content from a controller listening for stripe webhook requests, and watches heroku constantly respond with 301s -_-
[07:11:17] sevenseacat: oh, i'm a numpty.
[07:11:26] Radar: sevenseacat: Speaking of: do you have an example of creating a customer in Stripe with a fake payment token?
[07:11:34] Radar: My trainternet is dreadful
[07:11:50] guatajuk: has joined #RubyOnRails
[07:13:05] sevenseacat: Radar: https://gist.github.com/sevenseacat/2be7eb3e775a8337fe68 is part of the code i have
[07:13:27] futilegames: has joined #RubyOnRails
[07:13:46] sevenseacat: yay, now my webhook returns 204 properly
[07:13:50] Radar: Looks like that's from a controller. Sorry I wasn't specific. I want an example of creating a customer and a subscription to test what happens after that customer has the subscription.
[07:14:42] sevenseacat: I am not sure what you're after, sorry
[07:20:20] hotpancakes: has joined #RubyOnRails
[07:21:18] Radar: sevenseacat: trainternet stopped being shit. This is what I was after: https://gist.github.com/radar/f42a0f2971f471c44be0
[07:21:37] Radar: I wasn't sure if Stripe had test payment tokens like Braintree does. It seemingly doesn't
[07:21:52] stardiviner: has joined #RubyOnRails
[07:22:16] Pazician: has joined #RubyOnRails
[07:26:22] rrrepsaj: has joined #RubyOnRails
[07:32:05] pwnd_nsfw: has joined #RubyOnRails
[07:34:02] Disavowed: has joined #RubyOnRails
[07:34:06] comrad: has joined #RubyOnRails
[07:36:09] darutoko: has joined #RubyOnRails
[07:37:26] scepticulous: has joined #RubyOnRails
[07:39:54] UKn0Me: has joined #RubyOnRails
[07:41:26] sonofdirt: has joined #RubyOnRails
[07:41:58] solars: has joined #RubyOnRails
[07:45:01] arBmind: has joined #RubyOnRails
[07:48:49] sleungcy: has joined #RubyOnRails
[07:50:08] Cohedrin: has joined #RubyOnRails
[07:50:48] jstransky: has joined #RubyOnRails
[07:50:54] kp666: has joined #RubyOnRails
[07:53:20] Rahul_Roy: has joined #RubyOnRails
[07:54:58] mark4: has joined #RubyOnRails
[07:59:02] Ropeney: has joined #RubyOnRails
[08:03:14] rubyonrailed: has joined #RubyOnRails
[08:06:36] TheGreatGudsby: ACTION has quit (K-Lined)
[08:07:38] aganov: has joined #RubyOnRails
[08:12:17] n008f4g_: has joined #RubyOnRails
[08:12:53] quazimodo: has joined #RubyOnRails
[08:15:46] blackmesa: has joined #RubyOnRails
[08:17:00] Palsson: has joined #RubyOnRails
[08:17:50] hotpancakes: has joined #RubyOnRails
[08:18:40] tvw: has joined #RubyOnRails
[08:19:04] cd-rum: has joined #RubyOnRails
[08:22:52] benlieb: has joined #RubyOnRails
[08:23:37] arup_r: has joined #RubyOnRails
[08:26:04] pawnbox: has joined #RubyOnRails
[08:29:19] quazimodo: has joined #RubyOnRails
[08:32:33] merida: has joined #RubyOnRails
[08:33:38] hotpancakes: has joined #RubyOnRails
[08:34:28] davee_: has joined #RubyOnRails
[08:35:41] mfaeh: has joined #RubyOnRails
[08:36:41] DoubleMalt: has joined #RubyOnRails
[08:42:38] defsdoor: has joined #RubyOnRails
[08:42:39] lxsameer: has joined #RubyOnRails
[08:43:00] sleungcy: has joined #RubyOnRails
[08:47:46] matthias_: has joined #RubyOnRails
[08:47:48] jsrn: has joined #RubyOnRails
[08:58:04] Pumukel: has joined #RubyOnRails
[08:58:54] arBmind: has joined #RubyOnRails
[08:59:51] sergey_makagon: has joined #RubyOnRails
[09:01:30] arup_r: has left #RubyOnRails: ()
[09:01:31] arup_r: has joined #RubyOnRails
[09:01:38] futilegames: has joined #RubyOnRails
[09:02:57] patrick-sartent: has joined #RubyOnRails
[09:03:17] smoitra: has joined #RubyOnRails
[09:03:33] mank: has joined #RubyOnRails
[09:04:31] Ergo: has joined #RubyOnRails
[09:05:36] alaing: has joined #RubyOnRails
[09:06:26] alaing: hi i'm building a plugin and would like to test it on various rails version ie 4.1,4.2 and 5. What is the best way of doign this?
[09:06:56] alaing: I do have a dummy app under my spec directory but at the moment thats using 4.2.6
[09:08:15] artto: has joined #RubyOnRails
[09:08:22] srinidhi: has joined #RubyOnRails
[09:08:50] castor: has joined #RubyOnRails
[09:11:25] marr: has joined #RubyOnRails
[09:13:04] tenderlove: has joined #RubyOnRails
[09:13:47] muhammadn: has joined #RubyOnRails
[09:14:15] uglybandersnatch: has joined #RubyOnRails
[09:15:01] hotpancakes: has joined #RubyOnRails
[09:18:21] TheNet: has joined #RubyOnRails
[09:18:44] snowy: has joined #RubyOnRails
[09:23:47] ferr: has joined #RubyOnRails
[09:25:58] djellemah: has joined #RubyOnRails
[09:30:20] sonofdirt: has joined #RubyOnRails
[09:31:24] yfeldblum: has joined #RubyOnRails
[09:33:15] hotpancakes: has joined #RubyOnRails
[09:33:44] gingray: has joined #RubyOnRails
[09:33:59] nettoweb: has joined #RubyOnRails
[09:34:06] mank: has joined #RubyOnRails
[09:35:27] blackmesa: has joined #RubyOnRails
[09:37:02] sleungcy: has joined #RubyOnRails
[09:38:17] mdw: has joined #RubyOnRails
[09:38:33] FooMunki: has joined #RubyOnRails
[09:39:16] tenderlove: has joined #RubyOnRails
[09:48:31] pawnbox: has joined #RubyOnRails
[09:50:25] basldex: has joined #RubyOnRails
[09:51:12] basldex: I have a puma server on an 8 core machine running with 8 workers and need to share some data (ActionController::Live::SSE objects) between the workers. any idea how I could achieve this? would pipes maybe be a way?
[09:52:00] dgncn: has joined #RubyOnRails
[09:53:06] scepticulous: has joined #RubyOnRails
[09:54:45] dustinm`: has joined #RubyOnRails
[09:55:59] mfaeh: has joined #RubyOnRails
[09:56:13] yfeldblum: has joined #RubyOnRails
[09:56:25] mfaeh: has joined #RubyOnRails
[10:00:09] bricker: has joined #RubyOnRails
[10:02:10] djinni`: has joined #RubyOnRails
[10:03:48] AimlessRAven: has joined #RubyOnRails
[10:04:47] hightower3: has joined #RubyOnRails
[10:04:55] AimlessRAven: good morning evryone, in case when i have wrong migration and she is commited, how to remove them, i create migration with same name and just leave def change emty?
[10:06:03] rvanlieshout: if it's already in version control
[10:06:04] rvanlieshout: forget about it
[10:06:11] rvanlieshout: create a new migration that fixes what you want
[10:06:17] workmad3: has joined #RubyOnRails
[10:06:24] hightower3: Hey, what's some good OAuth2.0 server in Ruby?
[10:06:53] workmad3: hightower3: doorkeeper is the normal goto
[10:07:21] AimlessRAven: rvanlieshout: yea, but the name of new migration whats is need to looks like
[10:07:26] AimlessRAven: like a name in wrong migration ?
[10:07:33] aloneintheworld: has joined #RubyOnRails
[10:07:56] rvanlieshout: it shoulnd't have the same name
[10:07:59] rvanlieshout: any other is ok
[10:08:14] AimlessRAven: yea and just remove_colun :column_name?
[10:08:23] AimlessRAven: in def change ?
[10:08:43] hightower3: workmad3, great, thanks!
[10:10:13] rvanlieshout: AimlessRaven: if that's what it takes then yes
[10:10:14] Pazician: has joined #RubyOnRails
[10:10:20] AimlessRAven: rvanlieshout: tnx
[10:12:35] qejk: has joined #RubyOnRails
[10:12:38] chipotle: has joined #RubyOnRails
[10:14:53] Pazician: has joined #RubyOnRails
[10:15:32] ql6wlld: has joined #RubyOnRails
[10:16:43] acosonic: has joined #RubyOnRails
[10:17:29] acosonic: Hi, is anyone using RailsPanel, is it worth testing?
[10:18:29] fexilal: has joined #RubyOnRails
[10:18:32] Pazician: has joined #RubyOnRails
[10:19:04] srinidhi: has joined #RubyOnRails
[10:19:20] futilegames: has joined #RubyOnRails
[10:19:37] User458764: has joined #RubyOnRails
[10:20:34] stardiviner: has joined #RubyOnRails
[10:26:14] Pazician: has joined #RubyOnRails
[10:28:09] masscrx: has joined #RubyOnRails
[10:28:58] moeabdol: has joined #RubyOnRails
[10:30:35] Hates_: acosonic: I tried it. It's alright I guess :)
[10:30:53] masscrx: hi, I've just started to learning testing RoR apps, and Im bit lost with naming "unit/test/feauture", for example I would like to test user login with sorcery gem, there is a doc about it: https://github.com/NoamB/sorcery/wiki/Testing-Rails but I dont understand which way should I go, TestCase/Functional Tests/Feature Tests ?
[10:31:20] sleungcy: has joined #RubyOnRails
[10:31:51] djinni`: has joined #RubyOnRails
[10:32:16] masscrx: so should I make it as feauture tests or functional tests? or both ?
[10:32:22] dustinm`: has joined #RubyOnRails
[10:33:07] hotpancakes: has joined #RubyOnRails
[10:33:18] acosonic: what about rack insight? Any version that works with rails 4 ? I tested it on rails 3 earlier
[10:34:59] srinidhi: has joined #RubyOnRails
[10:37:48] artto: has joined #RubyOnRails
[10:39:36] tenderlove: has joined #RubyOnRails
[10:39:42] BaNzounet: I've a has_many relations, but I do Person.create!(dogs: [dog1, dog2, dog3]) the foreign keys are not set on Dogs. Can I do such things?
[10:43:17] yfeldblum: has joined #RubyOnRails
[10:45:39] snowy: has joined #RubyOnRails
[10:47:00] User458764: has joined #RubyOnRails
[10:47:02] Hates_: BaNzounet: you have the belongs_to association set on Dog ?
[10:47:25] BaNzounet: Hates_: yes :)
[10:54:29] renews: has joined #RubyOnRails
[11:00:09] cd-rum: has joined #RubyOnRails
[11:00:27] Devalo: has joined #RubyOnRails
[11:12:55] w0rd-driven: has joined #RubyOnRails
[11:14:47] hotpancakes: has joined #RubyOnRails
[11:15:59] valetudo: has joined #RubyOnRails
[11:19:27] Spami: has joined #RubyOnRails
[11:21:02] n008f4g_: has joined #RubyOnRails
[11:21:22] renews: has joined #RubyOnRails
[11:22:07] bePolite: has joined #RubyOnRails
[11:25:15] sleungcy: has joined #RubyOnRails
[11:26:12] weckl: has joined #RubyOnRails
[11:27:26] BaNzounet: was missing attr_accessible
[11:31:01] bePolite: has joined #RubyOnRails
[11:32:58] hotpancakes: has joined #RubyOnRails
[11:33:24] User458764: has joined #RubyOnRails
[11:37:59] AimlessRAven: has joined #RubyOnRails
[11:38:23] AimlessRAven: hello all, when i write rspec spec/ i see that
[11:38:33] AimlessRAven: home/niko/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- rails_helper (LoadError)
[11:38:53] AimlessRAven: why?, in my model, controller spec i rename require 'rails_helper' to require 'spec_helper'
[11:39:24] rvanlieshout: AimlessRaven: where would you expect rails_helper to be defined?
[11:39:26] rvanlieshout: do you have one?
[11:40:09] AimlessRAven: no i think not
[11:40:22] AimlessRAven: i write rake db:test:prepare but the result is same
[11:40:39] kriskhaira: has joined #RubyOnRails
[11:40:56] ldnunes: has joined #RubyOnRails
[11:42:50] rvanlieshout: how is that relevant?
[11:43:00] rvanlieshout: but if you want to require 'rails_helper' you'll need to create one
[11:43:19] AimlessRAven: no, i require spec_helper
[11:43:24] AimlessRAven: if i use rake db:schema:load RAILS_ENV=test
[11:43:31] AimlessRAven: i cant broke anythin
[11:43:43] rvanlieshout: i don't understand your question
[11:44:38] trinaldi: has joined #RubyOnRails
[11:44:39] AimlessRAven: my specs work correct, to now, i create new model, controller, and be default require in model, controller is "rails_helper" i change it to spec_helper
[11:44:43] AimlessRAven: and got this error
[11:44:56] AimlessRAven: all my model controller specs start with require 'spec_helper'
[11:44:58] rvanlieshout: you got that error before you've changed that?
[11:45:09] rvanlieshout: yeah. that's most likely because you've included relevant stuff in spec_helper
[11:45:11] AimlessRAven: i dont know, i rollback old code to see
[11:45:32] rvanlieshout: the rails helper just does some rails specific things
[11:45:36] rvanlieshout: which can also be done in the spec helper
[11:45:56] AimlessRAven: doesent even matter, i got this error in both cases
[11:46:18] AimlessRAven: home/niko/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- rails_helper (LoadError)
[11:47:21] mytrile: has joined #RubyOnRails
[11:47:21] renews: has joined #RubyOnRails
[11:47:48] rvanlieshout: yes. because you don't have one
[11:48:01] B4daBing73: has joined #RubyOnRails
[11:49:10] AimlessRAven: rvanlieshout: if i use direct path like rspec spec/models/sellor/category_spec.rb its work, but if i use only rspec spec/
[11:49:12] AimlessRAven: to see all tests
[11:49:16] mytrile: Hi guys, in rails 2 there was 'session :off' to disable session creation, but it was deprecated and what I read is that sessions are lazy-loaded. I want to create simple one action controller for monitoring purposes (monit will hit the route) and I wonder if there is a way to disable sessions for this single controller/action
[11:49:18] AimlessRAven: rails give me this error
[11:49:44] rvanlieshout: AimlessRaven: wut?
[11:49:48] rvanlieshout: when do you get what error
[11:49:51] rvanlieshout: gist _all_ details
[11:50:02] rvanlieshout: mytrile: the session is only created when you use it
[11:50:06] rvanlieshout: or initialized even
[11:52:14] chridal_: has left #RubyOnRails: ()
[11:52:22] chridal: has joined #RubyOnRails
[11:52:29] elaptics`away: has left #RubyOnRails: ()
[11:53:13] elaptics: has joined #RubyOnRails
[11:53:21] Detch: has joined #RubyOnRails
[11:57:37] stardiviner: has joined #RubyOnRails
[12:00:23] srinidhi: has joined #RubyOnRails
[12:04:25] bricker: has joined #RubyOnRails
[12:09:00] dionysus69: has joined #RubyOnRails
[12:09:46] AzaToth: has joined #RubyOnRails
[12:12:07] nirakara: has joined #RubyOnRails
[12:12:26] Synthead: has joined #RubyOnRails
[12:12:36] nirakara: has left #RubyOnRails: ("Leaving")
[12:14:28] hotpancakes: has joined #RubyOnRails
[12:15:11] walidvb: has joined #RubyOnRails
[12:19:08] acosonic: has joined #RubyOnRails
[12:19:10] ayonkhan: has joined #RubyOnRails
[12:20:15] sonofdirt: has joined #RubyOnRails
[12:20:47] Megamos: has joined #RubyOnRails
[12:20:53] mbreedlove: has joined #RubyOnRails
[12:21:21] wethu: has joined #RubyOnRails
[12:24:19] trifling-jest: has joined #RubyOnRails
[12:26:44] merida: has joined #RubyOnRails
[12:28:49] AlvaroFernandoMS: has joined #RubyOnRails
[12:29:46] halfamind: has joined #RubyOnRails
[12:31:19] TvL2386: has joined #RubyOnRails
[12:33:45] oliver___: has joined #RubyOnRails
[12:37:13] mfaeh: has joined #RubyOnRails
[12:38:03] FooMunki: has joined #RubyOnRails
[12:42:29] bePolite: has joined #RubyOnRails
[12:42:29] bePolite: has joined #RubyOnRails
[12:42:38] tvw: has joined #RubyOnRails
[12:43:10] mank: has joined #RubyOnRails
[12:43:11] krz: has joined #RubyOnRails
[12:43:14] nfk|laptop: has joined #RubyOnRails
[12:44:10] mank: has joined #RubyOnRails
[12:44:54] someish: has joined #RubyOnRails
[12:45:16] mank: has joined #RubyOnRails
[12:45:21] jgpawletko: has joined #RubyOnRails
[12:46:13] mank: has joined #RubyOnRails
[12:47:19] mank: has joined #RubyOnRails
[12:48:44] Moeh: has joined #RubyOnRails
[12:48:46] mank: has joined #RubyOnRails
[12:49:55] Moeh: What is the recommended way to allow rails to accept dasherized attributes that follow the JSON API spec recommendation. This: https://github.com/rails/rails/pull/20389#issuecomment-198759230?
[12:50:00] blackmesa: has joined #RubyOnRails
[12:51:15] _Tariq: has joined #RubyOnRails
[12:52:24] halfamind: has joined #RubyOnRails
[12:54:28] arup_r1: has joined #RubyOnRails
[12:54:56] kdough: has joined #RubyOnRails
[12:55:22] stannard: has joined #RubyOnRails
[12:55:59] hotpancakes: has joined #RubyOnRails
[12:56:34] j3r0: has joined #RubyOnRails
[12:57:09] artto: has joined #RubyOnRails
[12:58:19] artmann: has joined #RubyOnRails
[12:58:32] epochwolf: Moeh: at this point there isn't one. I'd write a custom middleware like they were discussing.
[12:58:43] edwinvdgraaf: has joined #RubyOnRails
[12:59:59] daveomcd_: has left #RubyOnRails: ()
[13:00:16] daveomcd: has joined #RubyOnRails
[13:00:17] daveomcd: If I want to build a "has_one" association once @MyObject.new is ran... is there a call back I can use for that?
[13:01:04] epochwolf: daveomcd: I'd use a factory method instead.
[13:03:38] daveomcd: epochwolf, ok thanks not familiar with that. I'll try to google that up
[13:03:45] JakFrist: has joined #RubyOnRails
[13:03:45] epochwolf: daveomcd: https://en.wikipedia.org/wiki/Factory_method_pattern
[13:04:29] epochwolf: It's a common design pattern. You have a method (instead of a class) that builds the object you want.
[13:05:15] flashpoint9: has joined #RubyOnRails
[13:05:19] epochwolf: You don't really want to override .new on an ActiveRecord object because there might come a day where you don't want to do that anymore.
[13:05:42] rodfersou: has joined #RubyOnRails
[13:10:50] stardiviner: has joined #RubyOnRails
[13:11:17] drbayer: has joined #RubyOnRails
[13:13:45] sleungcy: has joined #RubyOnRails
[13:15:05] daveomcd: epochwolf, so I would do something like... https://gist.github.com/daveomcd/753fd62d508ece0deb60
[13:15:21] arup_r: has joined #RubyOnRails
[13:16:29] epochwolf: daveomcd: close, you'll want to return the report object instead of the result of the save.
[13:17:01] daveomcd: so I'll just axe the ".save"
[13:17:26] epochwolf: I would call it build_new_report instead of create_new_report
[13:17:36] epochwolf: Since you aren't saving it.
[13:17:37] AimlessRAven: has joined #RubyOnRails
[13:17:53] epochwolf: But yeah, you got the idea. :)
[13:18:46] joshkovach: has joined #RubyOnRails
[13:19:07] epochwolf: This way, a Report object can still be created without all of the extra stuff. If you need to build it differently for some special case.
[13:19:21] AimlessRAven: anyone knows whats be the reason my variant = create(:sellor_variant) in rspec cant create my object
[13:20:06] epochwolf: AimlessRaven: Well, without seeing your code and the error message in a gist, I'm going to guess some divine power has taken a disliking to you.
[13:20:18] rvanlieshout: AimlessRaven: you've been here long enough to know the answer to that question
[13:22:06] epochwolf: rvanlieshout: my vote is malovent divine power.
[13:22:08] gmas: has joined #RubyOnRails
[13:22:15] AimlessRAven: https://gist.github.com/anonymous/10e7d5f264e60174cdc0
[13:22:21] AimlessRAven: there is my model, factory and model spec
[13:22:32] AimlessRAven: in all of my model spec, cannot build variant object
[13:22:33] rvanlieshout: and you're here long enough to know how gist works
[13:22:35] rvanlieshout: use separate files
[13:22:41] rvanlieshout: so there is syntax highliting
[13:22:45] rvanlieshout: also include the error
[13:23:36] rrawlins: has joined #RubyOnRails
[13:24:11] fmcgeough: has joined #RubyOnRails
[13:24:23] epochwolf: rvanlieshout: I'm beginning to think I should have gotten whiskey instead of tea this morning.
[13:24:45] rvanlieshout: and it's not even friday yet
[13:25:28] epochwolf: It's not? ... now I really want to cry.
[13:25:57] mrbubbles: has joined #RubyOnRails
[13:26:46] context: epochwolf: put some baileys in your coffee
[13:27:25] fmcgeough_: has joined #RubyOnRails
[13:27:50] epochwolf: context: um... my body is not prepared for coffee. I've be drinking a single weak cup of tea in the morning for 2 weeks.
[13:28:18] context: decaf. you're in it for the baileys man
[13:28:20] epochwolf: Alcohol + Coffee = drunk jitter wolf
[13:28:35] epochwolf: Actually, that might be fun.
[13:28:51] AimlessRAven: ok here is my mode: https://gist.github.com/anonymous/5787cfbdaaa6f6e26173
[13:28:52] Pazician: has joined #RubyOnRails
[13:29:01] AimlessRAven: here is my factory:https://gist.github.com/anonymous/d512aa1cc71817551a3f
[13:29:11] AimlessRAven: here is my spec test https://gist.github.com/anonymous/9b7cba5e627ece87bbeb
[13:29:15] rvanlieshout: i'll wayt for the syntax highlighting
[13:29:27] rvanlieshout: + full output of the failing test
[13:29:29] epochwolf: AimlessRaven: you can have multiple files in a single gist.
[13:30:09] epochwolf: I'm going to get a refill on my tea. Today is going to be a two cup day.
[13:30:15] artto: has joined #RubyOnRails
[13:31:12] skislak: has joined #RubyOnRails
[13:32:17] epochwolf: To add insult to sleepyness, the kettle was empty and I needed to refill it.
[13:32:30] AimlessRAven: ookey, i make it in our standarts :)
[13:32:30] AimlessRAven: https://gist.github.com/anonymous/3642032b21e6af1dc6c0
[13:33:04] rvanlieshout: so that error seems really clear
[13:33:10] artto: has joined #RubyOnRails
[13:33:16] rvanlieshout: it shows you the file and line
[13:33:22] rvanlieshout: why would you expect that to pass, AimlessRaven?
[13:34:04] AimlessRAven: rvanlieshout: the problem is in my spec test i cannot build object variant = create(:sellor_variant) its nil and i dont know why
[13:34:19] rvanlieshout: that's not what the errors shows
[13:34:33] Dbugger: has joined #RubyOnRails
[13:34:41] Dbugger: Greetings everyone, and happy Easter
[13:34:47] hotpancakes: has joined #RubyOnRails
[13:34:52] epochwolf: dbugger: BAH HUMBUG
[13:35:08] Dbugger: that really sounds horrible in my cultural context xDDD
[13:35:12] Dbugger: But thank you ;)
[13:35:25] AimlessRAven: ok the problem become from my after_initialize :set_defaults in my variant.rb ?
[13:35:31] _Tariq: has joined #RubyOnRails
[13:35:44] rvanlieshout: that's what's displayed yes
[13:35:45] epochwolf: dbugger: no, I should be happy and cheerful because easter but yeah, I'm cranky today. :D
[13:35:53] Dbugger: I wanted to ask you all something. Is there a way to chain scopes inside a "scope container"? Im not sure how you do it... This is my code: http://hastebin.com/iwomococam.rb
[13:36:02] Dbugger: epochwolf, Im only cheerful because I get 4 days off work ;)
[13:36:20] epochwolf: dbugger: I get no days off.
[13:36:31] Dbugger: epochwolf, in that case, I feel your pain
[13:36:37] epochwolf: And I'm packing up my apartment so I can move next week.
[13:36:47] rvanlieshout: dbugger: you could create scopes that accept a param
[13:37:03] rvanlieshout: then it's just @data.locked(params[:locked]).express(params[:express])...
[13:37:05] AimlessRAven: rvanlieshout: ok when i remove it, the things looks more cool, but i wanna do it with this
[13:37:22] marr: has joined #RubyOnRails
[13:37:30] rvanlieshout: AimlessRaven: why remove it? why not have a look at it
[13:37:35] Dbugger: rvanlieshout, I would certainly do that, but I already have a scope "locked" that takes "true" or "false"...
[13:37:52] rvanlieshout: .locked(params[:locked] == 'foobar')
[13:37:53] skislak_: has joined #RubyOnRails
[13:38:01] epochwolf: dbugger: @data.locked(params[:locked] == 'Locked')
[13:38:14] Dbugger: epochwolf, rvanlieshout the problem is that sometimes there are more than 2 options
[13:38:29] rvanlieshout: dbugger: than have the scope fix that? :)
[13:38:33] rvanlieshout: use a case in the scope
[13:38:49] Dbugger: I guess I will have to complicate further my scope...
[13:38:52] Dbugger: Thanks guys
[13:38:52] epochwolf: dbugger: then make a helper method that does all the heavy lifting?
[13:39:03] epochwolf: You don't need to make the model more complicated.
[13:39:48] Dbugger: well, i mean... instead of "scope :locked, (l) { locked: l }", I will have to make it a little more complex
[13:39:57] Dbugger: but if it is the cleanest way.. then no way around it
[13:40:03] AimlessRAven: rvanlieshout: i need to find the way to include this after_initialize :set_defaults in my specs ?
[13:40:14] rvanlieshout: AimlessRaven: no. you need to look at that failing line
[13:40:18] rvanlieshout: and read why it's failing
[13:40:32] rvanlieshout: nothing except that line is relevant at the moment
[13:40:38] rvanlieshout: don't include all kinds of irrelevant stuff until it's relevant
[13:41:31] pallavi: has joined #RubyOnRails
[13:43:10] Dbugger: something like this? http://hastebin.com/ubonukunit.coffee
[13:43:36] rvanlieshout: dbugger: it doesn't do anything yet
[13:43:49] epochwolf: dbugger: true.downcase is going to crash.
[13:43:49] Dbugger: rvanlieshout, what do you mean?
[13:43:55] rvanlieshout: when true, "locked" then where(locked: true)
[13:44:03] rvanlieshout: oh. you added a scope with ?
[13:44:11] yellow5: has joined #RubyOnRails
[13:45:46] stannard: has joined #RubyOnRails
[13:45:47] rvanlieshout: so i guess it actually did something
[13:45:51] rvanlieshout: then yes. this is ok
[13:45:55] flashpoint9: has joined #RubyOnRails
[13:45:56] Dbugger: I mean if I have this... http://hastebin.com/vimoviwuji.rb
[13:46:01] Dbugger: Now I can chain them easier, no?
[13:46:34] rvanlieshout: why not use scope :express, -> (value = true) do case end end
[13:46:41] rvanlieshout: then you don't need 3 scopes
[13:46:49] _Tariq: has joined #RubyOnRails
[13:47:22] sevenseacat: has joined #RubyOnRails
[13:47:49] Pazician: has joined #RubyOnRails
[13:48:06] Dbugger: "scope :express, -> (value = true)" ??
[13:48:12] Dbugger: You did not declare the parameter passed...
[13:48:13] rvanlieshout: scope with optional param
[13:48:16] Dbugger: where does value come from?
[13:48:17] rvanlieshout: value is a param
[13:48:22] Dbugger: oh, that is a thing??
[13:48:24] rvanlieshout: no value = true
[13:48:27] artto: has joined #RubyOnRails
[13:48:29] rvanlieshout: def foo(value = nil)
[13:48:35] rvanlieshout: def foo(value = 3)
[13:48:39] rvanlieshout: foo -> value = 3
[13:48:42] rvanlieshout: foo(4) -> value = 4
[13:48:45] andrmrtmr: has joined #RubyOnRails
[13:48:46] rvanlieshout: def foo(value: nil)
[13:48:55] rvanlieshout: foo(value: 3)
[13:49:03] Dbugger: ok wait... im lost now
[13:49:06] rvanlieshout: def foo(bar:, baz: 3)
[13:49:18] rvanlieshout: ok. i'll start over
[13:49:21] rvanlieshout: def foo(bar = 3)
[13:49:45] Dbugger: that should print 3
[13:49:50] rvanlieshout: foo() should print 3
[13:49:53] rvanlieshout: foo(4) should print 4
[13:49:54] epochwolf: ACTION realizes the kettle should have boiled by now...
[13:50:02] rvanlieshout: def foo(value: 3)
[13:50:05] rvanlieshout: same deal, but with named param
[13:50:13] rvanlieshout: def foo(value:, bar: 3)
[13:50:17] rvanlieshout: same deal, but with a required named param
[13:50:30] Dbugger: so how would you write the "locked" scope then?
[13:50:48] rvanlieshout: similar to your locked? but where the value has a default value of true
[13:51:02] Dbugger: ok, let me see..
[13:51:31] Dbugger: this? scope :locked, -> (value = true) { where locked: value }
[13:52:03] stannard: has joined #RubyOnRails
[13:52:48] matthias_: has joined #RubyOnRails
[13:53:27] shibly: has joined #RubyOnRails
[13:53:33] mustmodify: has left #RubyOnRails: ()
[13:53:47] shibly: has left #RubyOnRails: ()
[13:54:09] Dbugger: rvanlieshout, ?
[13:55:37] rustymyers: has joined #RubyOnRails
[13:55:54] rvanlieshout: dbugger: the body should match your previous locked?-scope
[13:55:56] rvanlieshout: back in a few
[13:56:10] Dbugger: what do you mean match?
[13:56:13] Dbugger: Where does it not match?
[13:57:11] Ergo^: has joined #RubyOnRails
[13:58:37] daveomcd: can i do a f.nested_fields_for on a "has_one" association? I'm getting an error: "undefined method `each' for #<Workout:0x007f8bc3aaaf68>"
[13:59:19] hotpancakes: has joined #RubyOnRails
[14:00:12] daveomcd: whoops, not nested need "simple"
[14:00:28] Uber|Dragon: has joined #RubyOnRails
[14:03:22] clorisu: has joined #RubyOnRails
[14:06:07] cpruitt: has joined #RubyOnRails
[14:06:18] Pazician: has joined #RubyOnRails
[14:07:32] bricker: has joined #RubyOnRails
[14:09:36] lessless: has joined #RubyOnRails
[14:13:45] JakFrist: has joined #RubyOnRails
[14:14:37] moeabdol: has joined #RubyOnRails
[14:15:14] Pazician: has joined #RubyOnRails
[14:16:18] gabr13l: has joined #RubyOnRails
[14:16:22] walidvb: has joined #RubyOnRails
[14:17:06] artto: has joined #RubyOnRails
[14:17:46] DragonPunch: has joined #RubyOnRails
[14:21:56] uglybandersnatch: has joined #RubyOnRails
[14:28:02] scepticulous: has joined #RubyOnRails
[14:30:28] hashtd: has joined #RubyOnRails
[14:31:51] bricker: has joined #RubyOnRails
[14:33:19] hotpancakes: has joined #RubyOnRails
[14:35:46] smathy: has joined #RubyOnRails
[14:37:29] maxz: has joined #RubyOnRails
[14:37:48] RegulationD: has joined #RubyOnRails
[14:38:12] ascarter: has joined #RubyOnRails
[14:38:35] mary5030: has joined #RubyOnRails
[14:38:41] roshanavand1: has joined #RubyOnRails
[14:39:32] diegoaguilar: has joined #RubyOnRails
[14:40:24] mary5030: has joined #RubyOnRails
[14:40:32] kies: has joined #RubyOnRails
[14:40:41] artto: has joined #RubyOnRails
[14:42:47] clorisu: has joined #RubyOnRails
[14:43:29] hotpancakes: has joined #RubyOnRails
[14:48:45] diegoaguilar: has joined #RubyOnRails
[14:49:54] acosonic: has joined #RubyOnRails
[14:50:07] acosonic: Hi all, how in code should I access this variable? http://prntscr.com/aje40q
[14:54:28] arup_r: acosonic: output from Rubymine? anyway, you can fetch it from `params` by using `#[]` method
[14:54:52] arup_r: it seems the output is from the inspection of params.
[14:55:05] arup_r: use gist always ;)
[14:55:56] acosonic: so it would be then contex[:time_entry#[params]]?
[14:57:05] sevenseacat: thats not even remotely close to valid syntax
[14:57:41] workmad3: sevenseacat: it's close if you have # and ] next to each other on a keyboard (like they would be on mine with a UK layout)
[14:58:15] workmad3: but probably not close to what the OP wants :)
[14:58:17] arup_r: acosonic: You can see the output in rails server log also.. use puts params in the corresponding the controller action
[14:58:40] bricker: has joined #RubyOnRails
[14:58:41] arup_r: and then you will see the structure, that you can access using `#[]`
[15:00:08] hotpancakes: has joined #RubyOnRails
[15:00:35] dcope: is there a general web dev channel? i'm having an issue with cors that isn't particularly rails related.
[15:01:48] sleungcy: has joined #RubyOnRails
[15:02:36] zave: has joined #RubyOnRails
[15:02:37] mrbubbles: has joined #RubyOnRails
[15:02:53] eyeamaye: has joined #RubyOnRails
[15:03:07] pokEarl: has joined #RubyOnRails
[15:03:09] Detch: has joined #RubyOnRails
[15:05:47] Console: has joined #RubyOnRails
[15:06:47] adavia: has joined #RubyOnRails
[15:07:27] dionysus69: has joined #RubyOnRails
[15:07:48] drale2k: using erb again after only using haml for months feels really good
[15:08:26] Sanguine1nomaly: has joined #RubyOnRails
[15:08:37] sevenseacat: my current project at work uses slim and it drives me nuts
[15:08:41] sungji: has joined #RubyOnRails
[15:08:49] drale2k: hm never used slim
[15:09:02] sevenseacat: i dont recommend it.
[15:09:38] drale2k: someone else started it and you took it over?
[15:11:30] Ergo: has joined #RubyOnRails
[15:11:51] herenow_: has joined #RubyOnRails
[15:11:59] sorc_: has joined #RubyOnRails
[15:12:05] hyperdri-: has joined #RubyOnRails
[15:12:06] ryanwincz: has joined #RubyOnRails
[15:12:45] D9-: has joined #RubyOnRails
[15:13:27] chouhoulis: has joined #RubyOnRails
[15:13:37] jnylen: has joined #RubyOnRails
[15:13:39] CornishPasty: seven cats made of sea
[15:14:12] Brando753: has joined #RubyOnRails
[15:14:36] griffindy: has joined #RubyOnRails
[15:14:37] scepticulous: has joined #RubyOnRails
[15:15:00] DragonPunch: When, using request.body.read.to_s I get that it's taking the request, and going down into the body but what does .to_s stand for? at the end of it?
[15:15:14] DragonPunch: JSON.parse request.body.read.to_s
[15:15:25] Pazician: has joined #RubyOnRails
[15:19:25] mr-spoon: has joined #RubyOnRails
[15:21:00] context: ruby has documentation on stuff like this
[15:21:20] context: http://ruby-doc.org/core-2.3.0/Object.html#method-i-to_s
[15:21:23] sarink: has joined #RubyOnRails
[15:21:43] acosonic: has joined #RubyOnRails
[15:21:46] sevenseacat: how many times do we have to recommend that you learn Ruby before you actually, you know, believe us?
[15:22:22] context: now now. maybe he missed the docs. they've only been there for like... over a decade.
[15:24:08] context: part of me is wondering why is reading the body of the request
[15:24:42] epochwolf: sevenseacat: always one more time M'lady.
[15:25:06] epochwolf: In other news, a wolf was found stabbed to death in a dark alley.
[15:25:19] sevenseacat: epochwolf: i'll protect you~!
[15:25:46] jfelchner: has joined #RubyOnRails
[15:25:48] duderonomy: has joined #RubyOnRails
[15:25:59] totimkopf: epochwolf: :(
[15:27:20] mary5030_: has joined #RubyOnRails
[15:27:41] acosonic: puts gives me nothing in console, useless
[15:28:08] acosonic: I do not know how to access something of something that I don’t know what it is
[15:28:20] matthias_: has joined #RubyOnRails
[15:28:23] sevenseacat: acosonic: it sounds like you're doing it wrong.
[15:28:38] Devalo: has joined #RubyOnRails
[15:28:51] acosonic: I tried puts context
[15:28:53] jhn: has joined #RubyOnRails
[15:28:55] tfitts: Anyone have puma setup with ssl for development? I got the server started but my logs don't show anything except the files being served
[15:29:00] DragonPunch: context: Why do we have to convert the request.body.read to a string?
[15:29:11] DragonPunch: context: Is it binary buffer data or something?
[15:29:20] sevenseacat: DragonPunch: look at it and see
[15:29:21] daveomcd_: has joined #RubyOnRails
[15:29:40] gabr13l: has joined #RubyOnRails
[15:29:40] arup_r: has joined #RubyOnRails
[15:29:40] mfaeh: has joined #RubyOnRails
[15:29:40] DoubleMalt: has joined #RubyOnRails
[15:29:40] shamanime: has joined #RubyOnRails
[15:29:41] RTG`: has joined #RubyOnRails
[15:29:41] iuuso: has joined #RubyOnRails
[15:29:41] tw1sted: has joined #RubyOnRails
[15:29:41] berserk_ren: has joined #RubyOnRails
[15:29:41] Haydos: has joined #RubyOnRails
[15:29:41] reaVer: has joined #RubyOnRails
[15:29:41] callumacrae: has joined #RubyOnRails
[15:29:41] bitemyapp: has joined #RubyOnRails
[15:29:41] Guest52406: has joined #RubyOnRails
[15:29:41] beingjohnm: has joined #RubyOnRails
[15:29:43] merida: has joined #RubyOnRails
[15:29:55] disgrntld: has joined #RubyOnRails
[15:30:36] Trynemjoel: has joined #RubyOnRails
[15:31:17] callumacrae: has joined #RubyOnRails
[15:31:18] JakFrist: has joined #RubyOnRails
[15:31:36] workmad3_: has joined #RubyOnRails
[15:34:31] mary5030: has joined #RubyOnRails
[15:36:59] Sadin: has joined #RubyOnRails
[15:37:35] enkristoffer: has joined #RubyOnRails
[15:38:53] armyriad: has joined #RubyOnRails
[15:39:01] polishdub: has joined #RubyOnRails
[15:39:14] Ergo: has joined #RubyOnRails
[15:43:06] acosonic: has joined #RubyOnRails
[15:45:09] chouhoulis: has joined #RubyOnRails
[15:45:21] dionysus69: has joined #RubyOnRails
[15:45:38] akshat: has joined #RubyOnRails
[15:47:08] drale2k: has joined #RubyOnRails
[15:47:49] codepete: has joined #RubyOnRails
[15:48:14] rattatmatt: has joined #RubyOnRails
[15:49:18] rakm: has joined #RubyOnRails
[15:49:39] User458764: has joined #RubyOnRails
[15:53:11] context: dragonpunch: i dont know. who is saying you have to? i figured the request body would be nil until the user sets it
[15:53:15] context: user in this case being you.
[15:53:30] DragonPunch: just to clarify
[15:53:35] DragonPunch: request.body is for the PSOT params
[15:53:40] Trynemjoel: has joined #RubyOnRails
[15:53:40] DragonPunch: and the request.headers are for the headers itself
[15:54:02] context: i would assume so. thats how http works
[15:54:09] context: you could try it and find out
[15:56:12] sleungcy: has joined #RubyOnRails
[15:58:31] jtong: has joined #RubyOnRails
[16:02:42] moeabdol: has joined #RubyOnRails
[16:04:57] halfamind: has joined #RubyOnRails
[16:06:05] mbreedlove: has joined #RubyOnRails
[16:06:27] ascarter: has joined #RubyOnRails
[16:09:03] smathy: ...or read ANY docs.
[16:09:32] smathy: ...whereupon you will realize that you basically never need to ever use request.body to get the POST params.
[16:09:40] rrawlins: has joined #RubyOnRails
[16:11:12] rattatmatt: has joined #RubyOnRails
[16:11:41] Pazician: has joined #RubyOnRails
[16:14:01] sasasekaric: has joined #RubyOnRails
[16:14:08] halfamind: has joined #RubyOnRails
[16:17:06] marr: has joined #RubyOnRails
[16:17:07] halfamind1: has joined #RubyOnRails
[16:17:47] mdel: has joined #RubyOnRails
[16:18:47] d0nn1e: has joined #RubyOnRails
[16:18:47] nobitanobi: has joined #RubyOnRails
[16:18:56] JoshGlzBrk: has joined #RubyOnRails
[16:19:32] nobitanobi: How can I create a FactoryGIrl association with some seed data that I have: So, in my factory I am trying to do: association :company, Company.for('default') - and it's complaining because I don't have a company factory
[16:22:26] Vlatiska: has joined #RubyOnRails
[16:23:54] Vlatiska: Hello coder, i need to understand if inside a model i can use callback after_create to increment another model without relationship? I have try but that did not work
[16:23:56] Maletor: has joined #RubyOnRails
[16:24:35] ascarter: has joined #RubyOnRails
[16:25:36] ryanwincz: has left #RubyOnRails: ()
[16:25:41] sar1nk: has joined #RubyOnRails
[16:25:47] pawnbox: has joined #RubyOnRails
[16:27:34] kuroro: has joined #RubyOnRails
[16:28:07] Pazician: has joined #RubyOnRails
[16:28:33] arup_r: nobitanobi: so why not defining a factory for a company too?
[16:29:17] arup_r: and if you don't have any association between company and model, that line shouldn't work too
[16:29:25] baweaver: has joined #RubyOnRails
[16:29:50] arup_r: nobitanobi: what are you trying to do actually?
[16:30:23] arup_r: Vlatiska: show the code in a gist
[16:31:27] Vlatiska: ok wait, i need to find that and open my C9
[16:32:01] tjohnson: has joined #RubyOnRails
[16:32:09] hightower2: has joined #RubyOnRails
[16:32:17] halfamind: has joined #RubyOnRails
[16:32:44] Maletor: has joined #RubyOnRails
[16:32:55] manfrin: has joined #RubyOnRails
[16:33:36] Rubie: has joined #RubyOnRails
[16:34:11] scepticulous: has joined #RubyOnRails
[16:36:09] Vlatiska: ok, https://gist.github.com/anonymous/3c1e9390e5f52fe480ff
[16:37:54] voidDotClass: has joined #RubyOnRails
[16:39:13] sypheren: has joined #RubyOnRails
[16:39:34] htmldrum: has joined #RubyOnRails
[16:39:37] htmldrum_: has joined #RubyOnRails
[16:40:42] epochwolf: nobitanobi: I'm not entirely sure what's not working but you can mix factories and fixtures/seeds. You can always use the before/after callbacks in FactoryGirl to make that happen.
[16:41:08] M-shine: has joined #RubyOnRails
[16:41:50] epochwolf: nobitanobi: if I had more time, I'd research the proper solution.
[16:41:56] AntiSpamMeta: has joined #RubyOnRails
[16:42:12] DarkBushido: has joined #RubyOnRails
[16:42:13] DarkBushido: has joined #RubyOnRails
[16:42:36] arBmind: has left #RubyOnRails: ()
[16:42:57] epochwolf: nobitanobi: There's plenty of things you can play with under the hood on FactoryGirl, just see the documentation: https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md :)
[16:44:07] KensoDev: has joined #RubyOnRails
[16:44:08] Blaze_Boy: has joined #RubyOnRails
[16:44:10] FCser: Hmm I have a has_many :through relationship setup. Parameters submitting but the associations are not saving... So I must be overlooking or have something setup wrong? The models / views / params are here: http://pastie.org/10772590
[16:44:28] FCser: The record saves just fine - but rooms is nil
[16:45:00] halfamind: has joined #RubyOnRails
[16:45:46] pawnbox: has joined #RubyOnRails
[16:46:37] arup_r: Vlatiska: What did you mean by didn't work. Any error or the model data didn't change which is being using inside the hook?
[16:47:43] Vlatiska: arup_r: The model data did not update
[16:49:19] meoblast001: has joined #RubyOnRails
[16:49:34] arup_r: Vlatiska: `friend` is field in the Profile model?
[16:49:55] Vlatiska: arup_r: exactly
[16:50:25] sleungcy: has joined #RubyOnRails
[16:50:28] arup_r: if you do it from rails console does it work?
[16:50:33] arup_r: can you try that?
[16:51:07] Vlatiska: arup_r: in my controller that work, but i want to change this snippet code inside model to refactor the code
[16:51:32] silentpost: has joined #RubyOnRails
[16:51:42] arup_r: ok,,, i got you. try in rails console
[16:52:00] arup_r: create one FriendList and see if it is updating or now
[16:52:15] Vlatiska: arup_r: So im not sure, i dont have any relation between User and FriendList, do i need to make one to have access to the other model with a callback?
[16:52:39] Vlatiska: arup_r: i will try in console, give me a minute
[16:52:44] jtong: has joined #RubyOnRails
[16:53:01] arup_r: To run the callback code not related to association.
[16:53:15] Cone3: has joined #RubyOnRails
[16:53:21] arup_r: Vlatiska: also try FriendList.create! in console
[16:53:28] nobitanobi: has joined #RubyOnRails
[16:53:33] arup_r: the bang one ..
[16:53:44] sonofdirt: has joined #RubyOnRails
[16:53:46] DragonPunch: has joined #RubyOnRails
[16:53:58] Vlatiska: arup_r: ok, i will put the bang
[16:54:31] scepticulous: has joined #RubyOnRails
[16:54:40] nobitanobi: epochwolf: the issue is that if I place the association as company Company.for('default') - when that file gets interpreted (in my CI), since the companies table are not up there. It fails
[16:55:08] arup_r: also inside the callback write like `puts 'calling'` Vlatiska .. it will confirm you if you are going there or not... Just a visual effect :)
[16:55:21] AntiSpamMeta: has joined #RubyOnRails
[16:55:47] nobitanobi: I solved it creating a factory Company that looks like https://gist.github.com/novito/4433240d1ea957f51eae
[16:56:09] Vlatiska: arup_r: Yeah that work inside the console with create!
[16:56:19] ornerymoose: has joined #RubyOnRails
[16:56:27] arup_r: well, then the code is fine..
[16:57:01] arup_r: then from the other place where you felt it didn't work might had some invalid dara, which rollback the saving
[16:57:33] pfg__: has joined #RubyOnRails
[16:57:34] arup_r: Vlatiska: try now from that place with create! for testing purposes.. and see it in action
[16:57:41] ornerymoose: Hello, I’m using the select2 plugin in a Rails 4 application. It works, but why is the populated dropdown hovering over the textfield instead of below it? https://gist.github.com/ornerymoose/cd60fa7e0ab398f9275f (I added a screenshot in the Gist description).
[16:57:41] arup_r: what is stopping
[16:57:44] iamvery: has joined #RubyOnRails
[16:58:15] Vlatiska: arup_r: Ok i will try inside the controller with create!
[16:58:38] arup_r: but that is just to test for now Vlatiska. remember to remove :)
[16:59:29] JakFrist: has joined #RubyOnRails
[16:59:50] arup_r: ornerymoose: tip: In gist also you can upload any docs
[17:00:13] ornerymoose: arup_r: oh nice! wasn’t aware, thank you :)
[17:02:09] ql6wlld: has joined #RubyOnRails
[17:02:15] choke: has joined #RubyOnRails
[17:04:52] Vlatiska: arup_r: nope, did not work, but, inside my controller i have let the increment, so in logic friend need to increment by 2 with also my code in model. Do these 2 increment can cancel one increment?
[17:05:35] arup_r: no idea, then need to see it live it seems :)
[17:06:08] qejk: has joined #RubyOnRails
[17:07:04] benlieb: has joined #RubyOnRails
[17:07:13] nettoweb: has joined #RubyOnRails
[17:07:54] axl__: has joined #RubyOnRails
[17:08:12] weaksauce: has joined #RubyOnRails
[17:08:28] wldcordeiro: has joined #RubyOnRails
[17:11:59] hjdivad: has joined #RubyOnRails
[17:12:11] Balzrael: has joined #RubyOnRails
[17:12:54] rakm: has joined #RubyOnRails
[17:13:13] sleungcy: has joined #RubyOnRails
[17:15:25] mdw: has joined #RubyOnRails
[17:16:08] ql6wlld: has joined #RubyOnRails
[17:17:22] shinnya: has joined #RubyOnRails
[17:17:38] Sadin: has joined #RubyOnRails
[17:21:01] DragonPunch: has joined #RubyOnRails
[17:21:40] arBmind: has joined #RubyOnRails
[17:22:09] jottr: has joined #RubyOnRails
[17:22:13] ericindc: has joined #RubyOnRails
[17:22:39] polyidus: has joined #RubyOnRails
[17:23:34] arup_r: has joined #RubyOnRails
[17:24:34] ascarter: has joined #RubyOnRails
[17:28:09] wldcordeiro: has joined #RubyOnRails
[17:28:32] KensoDev: has joined #RubyOnRails
[17:29:14] acosonic: has joined #RubyOnRails
[17:29:15] djellemah: has joined #RubyOnRails
[17:30:14] Devalo: has joined #RubyOnRails
[17:30:20] rodr1go: has joined #RubyOnRails
[17:30:39] User458764: has joined #RubyOnRails
[17:32:37] ascarter: has joined #RubyOnRails
[17:33:15] ql6wlld: has joined #RubyOnRails
[17:37:51] arup_r: has joined #RubyOnRails
[17:38:41] sneakerhax: has joined #RubyOnRails
[17:38:57] ql6wlld: has joined #RubyOnRails
[17:39:06] jtong_: has joined #RubyOnRails
[17:39:07] jenrzzz: has joined #RubyOnRails
[17:39:26] srinidhi: has joined #RubyOnRails
[17:39:32] t4nkD: has joined #RubyOnRails
[17:40:02] beauby: has joined #RubyOnRails
[17:40:16] mdw: has joined #RubyOnRails
[17:40:40] acosonic: has joined #RubyOnRails
[17:43:49] baweaver: has joined #RubyOnRails
[17:44:59] halfamind1: has joined #RubyOnRails
[17:45:05] dopie: has joined #RubyOnRails
[17:46:34] n008f4g_: has joined #RubyOnRails
[17:47:19] sbarg: has joined #RubyOnRails
[17:47:39] sbarg: has left #RubyOnRails: ()
[17:50:30] moeabdol: has joined #RubyOnRails
[17:51:35] dopie: has joined #RubyOnRails
[17:54:16] djbkd: has joined #RubyOnRails
[17:54:40] djbkd: has joined #RubyOnRails
[17:56:36] acosonic: has joined #RubyOnRails
[17:57:23] acosonic: arup_r: ha-haa I did it :D
[17:58:19] arup_r: acosonic: awesome :)
[17:59:22] baweaver: has joined #RubyOnRails
[17:59:59] stannard: has joined #RubyOnRails
[18:00:13] jenrzzz: has joined #RubyOnRails
[18:00:13] jenrzzz: has joined #RubyOnRails
[18:03:59] rogue_koder: has joined #RubyOnRails
[18:04:26] halfamind: has joined #RubyOnRails
[18:05:01] FLeiXiuS: has joined #RubyOnRails
[18:05:13] speakingcode: has left #RubyOnRails: ()
[18:05:41] polyidus: has joined #RubyOnRails
[18:06:20] FLeiXiuS: Using response.headers['X-Remote-User'] = current_user.email on an after login callback, I'm getting redirected to http://url.comCURRENT_USER
[18:06:57] halfamind1: has joined #RubyOnRails
[18:10:05] JakFrist: has joined #RubyOnRails
[18:11:15] intrigueD: has joined #RubyOnRails
[18:12:35] baweaver: has joined #RubyOnRails
[18:12:46] cnk: has joined #RubyOnRails
[18:14:37] replay: has joined #RubyOnRails
[18:15:36] tildes: has joined #RubyOnRails
[18:15:38] tubbo: FLeiXiuS: isn't 'X-Remote-User' an apache thing?
[18:15:59] FLeiXiuS: It's a header that I'm setting within rails to be interpreted by a remote proxy.
[18:17:06] tubbo: FLeiXiuS: i think you might be conflicting with something apache already uses: http://serverfault.com/questions/207301/get-the-authenticated-user-under-apache
[18:17:13] yellow5: has joined #RubyOnRails
[18:17:20] FLeiXiuS: tubbo, That works but only under basic auth.
[18:17:35] FLeiXiuS: I'm simply defining a custom header - it could be named whatever.
[18:18:01] B1n4r10: has joined #RubyOnRails
[18:18:21] tubbo: FLeiXiuS: so name it something else and see what happens
[18:18:30] tubbo: name it "X-Gloopy-Noops"
[18:18:51] FLeiXiuS: tubbo, I did, same results.
[18:19:00] dvinciguerra: has joined #RubyOnRails
[18:19:02] tubbo: FLeiXiuS: hmm, must be something else in your app then.
[18:19:04] FLeiXiuS: I'm using a devise and the after_sign_in_path_for callback.
[18:19:28] matthewd: !fake: http://url.comCURRENT_USER
[18:19:36] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[18:21:08] matthewd: FLeiXiuS: Specifically, I can't tell whether you mean literally 'CURRENT_USER', or that's a placeholder
[18:21:50] tubbo: FLeiXiuS: !gist
[18:21:50] helpa: FLeiXiuS: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:21:51] FLeiXiuS: matthewd, It's whatever the object returns when the header is set.
[18:23:33] treehug88: has joined #RubyOnRails
[18:23:33] flashpoint9: has joined #RubyOnRails
[18:24:06] uglybandersnatch: has joined #RubyOnRails
[18:24:28] FLeiXiuS: tubbo, matthewd https://gist.github.com/anonymous/6824f10fc0e91b220d69
[18:25:50] tubbo: i know what happened
[18:26:02] tubbo: FLeiXiuS: you used `current_user`, you should be using the passed-in `resource` object.
[18:26:19] tubbo: current_user will redirect_to login_path unless authenticated?, and you're not authenticated (yet).
[18:27:12] FLeiXiuS: tubbo, Thats exactly what I thought.
[18:27:21] FLeiXiuS: tubbo, So I had changed it to response.email
[18:27:34] FLeiXiuS: Same results
[18:27:55] jobewan: has joined #RubyOnRails
[18:28:31] tubbo: FLeiXiuS: can you throw a debugger in there and make sure after_sign_in_path_for is actually being called? if it still gives you the same results, your method isn't being run.
[18:28:37] tubbo: so the issue is somewhere else.
[18:29:11] FLeiXiuS: tubbo, I added an inspect to the method to raise an error. It's being called.
[18:29:26] cgfbee: has joined #RubyOnRails
[18:29:46] FLeiXiuS: i may need to use super.
[18:29:59] TheGreatGudsby: has joined #RubyOnRails
[18:30:04] FLeiXiuS: I think the after_sign_in_path_for callback is used to modify the redirect url.
[18:30:24] tubbo: FLeiXiuS: does devise's documentation correlate with what you believe?
[18:30:42] smathy: Why would you have an email address as the sign in path?
[18:30:44] dvinciguerra_: has joined #RubyOnRails
[18:30:56] FLeiXiuS: smathy, Im not - thats what the problem was.
[18:30:58] JakFrist: has joined #RubyOnRails
[18:31:15] FLeiXiuS: tubbo, Yep - adding response = blah; super; worked.
[18:31:49] mrgreenfur: has joined #RubyOnRails
[18:32:20] tubbo: FLeiXiuS: nice
[18:32:20] FLeiXiuS: The callback is used to modify actions that happen after a successful login. So I assumed I could do what I wanted. Furhter investigation - its expecting to return a url.
[18:32:28] FLeiXiuS: Simple fix - either way - thanks.
[18:32:41] tubbo: FLeiXiuS: next time, check the RDoc for the method to make sure it's returning the right type. :)
[18:32:44] matthewd: "after_sign_in_path_for" definitely sounds like it's supposed to return a path (for after sign in)
[18:33:00] matthewd: .. which strongly implies to me it should *not* be arbitrarily messing with the response
[18:33:09] matthewd: Is there not another place you can/should be doing that? :/
[18:33:56] gingray: has joined #RubyOnRails
[18:34:00] dvinciguerra_: has left #RubyOnRails: ()
[18:34:43] User458764: has joined #RubyOnRails
[18:35:53] dvinciguerra: has joined #RubyOnRails
[18:37:47] tubbo: ACTION would think it's better off in `after_action :set_remote_user, if: :user_logged_in?`
[18:37:58] tubbo: but that might be extra work
[18:38:03] mrgreenfur: when I run “RAILS_ENV=production bundle exec rake assets:precompile” the Rails.env.production? is still false. Anyone know whats up?
[18:38:20] DoubleMalt: has joined #RubyOnRails
[18:38:26] FLeiXiuS: matthewd, I cant think of a better place. This is designed to be used as an SSO portal.
[18:38:44] FLeiXiuS: So the proxy will be handling auth redirection.
[18:38:46] FLeiXiuS: etc etc etc.
[18:38:48] shinnya: has joined #RubyOnRails
[18:39:09] crystal77: has joined #RubyOnRails
[18:39:52] jtong: has joined #RubyOnRails
[18:40:46] tubbo: frankly, this might not be the most apparent place for that code to exist...but it's certainly the least intrusive as far as devise is concerned. otherwise, you'd have to do some kind of weird overriding.
[18:41:10] tubbo: FLeiXiuS: but i think you still have a problem here, as any subsequent connections to the app won't have that header set unless it's in an after_action for *every* request. right?
[18:41:23] acosonic: has joined #RubyOnRails
[18:41:24] smathy: You'll never believe what the docs say too matthewd ;)
[18:41:25] tubbo: FLeiXiuS: because after_sign_in_path_for gets called when you sign in, *not* when you're already logged in and re-visit the site.
[18:42:25] FLeiXiuS: tubbo, The header is being set in the http response from the login. This header is then picked up by the reverse proxy and set for each subsequent connection. At least thats the hope. I then have to some how figure out how to manage the session.
[18:42:37] smathy: FLeiXiuS, look at the highest scored answer here: http://stackoverflow.com/q/4753730/152786 (the second answer)
[18:43:05] smathy: FLeiXiuS, or http://www.rubydoc.info/github/plataformatec/devise/master/Devise/Models/DatabaseAuthenticatable#after_database_authentication-instance_method
[18:43:29] Jasaka: has joined #RubyOnRails
[18:43:35] B1n4r10: has joined #RubyOnRails
[18:43:52] FLeiXiuS: smathy, There's a way that recreates the method in a controller, there's a method that occupies the model (which probably wont work as it has no idea about http responses ;-) ) and then theres the way I did it .
[18:44:05] FLeiXiuS: I went for simplicity
[18:44:31] FLeiXiuS: The method after_sign_in_path_for performs exactly as it did before, though I'm prepending a header to it.
[18:44:38] tubbo: whoa, i didn't know there was after_database_authentication. p cool!
[18:44:56] smathy: Good, ok, side effect to the rescue. What could go wrong.
[18:45:54] gingray: has joined #RubyOnRails
[18:46:16] tubbo: FLeiXiuS: right, there's just a more apparent place to put your code that has the same effect.
[18:46:41] jstransky: has joined #RubyOnRails
[18:48:24] djbkd: has joined #RubyOnRails
[18:49:42] codepete: has joined #RubyOnRails
[18:50:16] rattatmatt: has joined #RubyOnRails
[18:50:40] cgfbee: has joined #RubyOnRails
[18:50:48] jtong: has joined #RubyOnRails
[18:51:15] moeabdol: has joined #RubyOnRails
[18:52:45] jenrzzz: has joined #RubyOnRails
[18:53:51] beingjohnm: my app stores account names and transaction information (and is hosted at Heroku). Currently it is all stored unencrypted in postgresql. I'm about to move into production and feel that at least account names should be encrypted. I feel transactions would be hard as you can't query/sum encrypted data. Anybody encrypt their database and have any pointers?
[18:54:44] djbkd: has joined #RubyOnRails
[18:56:31] manfrin: has joined #RubyOnRails
[18:58:57] LeoHernan: has joined #RubyOnRails
[19:00:42] Tref: has joined #RubyOnRails
[19:02:45] yfeldblum: has joined #RubyOnRails
[19:03:04] acosonic: has joined #RubyOnRails
[19:03:21] User458764: has joined #RubyOnRails
[19:06:18] arup_r1: has joined #RubyOnRails
[19:07:48] DoctorMonocular: has joined #RubyOnRails
[19:08:29] machty: has joined #RubyOnRails
[19:08:51] machty: has left #RubyOnRails: ()
[19:08:56] machty: has joined #RubyOnRails
[19:09:49] B1n4r10: has joined #RubyOnRails
[19:10:53] smathy: beingjohnm, https://github.com/attr-encrypted/attr_encrypted works well.
[19:11:07] arup_r1: beingjohnm: https://github.com/attr-encrypted/attr_encrypted
[19:11:24] smathy: I hear an echo ;)
[19:14:11] rakm: has joined #RubyOnRails
[19:14:17] sarink: has joined #RubyOnRails
[19:14:40] beingjohnm: smathy: can I use that on a system that already contains data or do I need to start from scratch?
[19:20:20] beingjohnm: and would it be better to encrypt the database rather than use that?
[19:21:09] slash_nick: hmm... beingjohnm do you need to encrypt the whole database, or certain data?
[19:21:20] matthewd: beingjohnm: You probably need a better defined use case than "I should encrypt things", before you can explore the trade-offs of the various options, and how well each meets your actual need
[19:22:18] srinidhi: has joined #RubyOnRails
[19:23:31] smathy: beingjohnm, there are ways of migrating existing data to the encrypted fields, I don't remember the specifics. Might be as simple as: Foo.each { |f| f.field = f[:field]; f.save! }
[19:24:29] sergey_makagon: has joined #RubyOnRails
[19:24:55] beingjohnm: matthewd: it seems both ways attr_encrypted and RDS encypted have the "data at rest" encrypted. I guess the question does attr_encypted provide any additional security feature than that?
[19:25:31] cnk: Encrypting everything would make it very difficult to do db level debugging. For example to look for inconsistent rows. I would suggest encrypting sensitive fields but not the entire active db. Encrypting your backups however, may be worth it. Though if you need to restore, it will likely take longer
[19:27:03] slash_nick: read/write to encrypted DB is slower than unencrypted... if you dont want to take that performance hit just to encrypt a couple of columns, use attr_encrypted... if you need the whole shebang encrypted at rest, encrypt your DB
[19:27:32] baweaver: has joined #RubyOnRails
[19:27:33] mrgreenfur: has joined #RubyOnRails
[19:28:41] beingjohnm: slash_nick: as a selling point the whole thing encrypted would be nice. I can still query and sum number columns in an encypted database (I assume!) but I think the performance trade off would be more than worth it when I'm trying to sell the software.
[19:28:51] matthewd: beingjohnm: As I said, you seem to be coming from "encryption good", rather than "I need to protect X against Y"
[19:29:00] cnk_: has joined #RubyOnRails
[19:29:04] halfamind: has joined #RubyOnRails
[19:29:27] beingjohnm: matthewd: I need to protect user's financial data (really just account names and transactions) from evil hackers :)
[19:29:52] beingjohnm: and mayb at some point in the future, employees
[19:30:19] matthewd: Hackers walking in and stealing hard drives? Or hackers subverting the web app's implementation?
[19:31:00] jschoolcraft: has joined #RubyOnRails
[19:31:24] nettoweb: has joined #RubyOnRails
[19:32:13] patrick-sartent: has joined #RubyOnRails
[19:32:25] chouhoul_: has joined #RubyOnRails
[19:32:53] beingjohnm: matthewd: the latter is of much more concernt
[19:33:45] chouhoul_: has joined #RubyOnRails
[19:35:47] gabr13l: has joined #RubyOnRails
[19:36:06] jtong_: has joined #RubyOnRails
[19:36:11] TheGreatGudsby: has joined #RubyOnRails
[19:36:43] beingjohnm: matthewd: does protecting users from my own ignorance count as a use case? :)
[19:36:44] slash_nick: beingjohnm: "all sensitive data is encrypted" sounds as good as "all of DB is encrypted" to me
[19:38:21] chepur: has joined #RubyOnRails
[19:40:23] mary5030_: has joined #RubyOnRails
[19:41:02] polyidus: has joined #RubyOnRails
[19:42:10] mary5030: has joined #RubyOnRails
[19:42:31] baweaver: has joined #RubyOnRails
[19:43:10] beingjohnm: thanks slash_nick matthewd cnk smathy arup_r
[19:44:17] Cohedrin: has joined #RubyOnRails
[19:54:09] hxegon: has joined #RubyOnRails
[19:54:44] hxegon: has joined #RubyOnRails
[19:55:44] edwinvdgraaf: has joined #RubyOnRails
[19:56:43] rattatmatt: has joined #RubyOnRails
[19:59:04] User458764: has joined #RubyOnRails
[20:00:58] baweaver: has joined #RubyOnRails
[20:01:41] smathy: beingjohnm, np.
[20:03:00] rattatmatt: has joined #RubyOnRails
[20:03:31] hxegon: Anyone here using the heroku/ruby docker: Do you just do local dev with RAILS_ENV=production, or do you change it? if so, how?
[20:05:38] sergey_makagon: has joined #RubyOnRails
[20:05:48] alaing: has joined #RubyOnRails
[20:06:00] alaing: hi i'm building a plugin and would like to test it on various rails version ie 4.1,4.2 and 5. What is the best way of doign this?
[20:06:35] baweaver: has joined #RubyOnRails
[20:07:19] alaing: I've tried this https://docs.travis-ci.com/user/customizing-the-build/#Build-Matrix but its failed in travis with find dependencies
[20:08:45] chouhoulis: has joined #RubyOnRails
[20:10:20] cnk: alaing: that seems like a good way to do it so perhaps hunting down the dependency problem
[20:10:33] kallisti5: anyone have a good way to compare data in a table?
[20:10:56] kallisti5: aka, I have a model with data. I want to show "missing" data
[20:11:14] kallisti5: Y: A,B, Z: A
[20:11:28] kallisti5: I want to highlight B is missing, or at least show a blank cell
[20:12:00] kallisti5: Y: A,B,C Z: A, (blank), C
[20:12:12] sbarg1: has joined #RubyOnRails
[20:12:21] arup_r: kallisti5: You can take a help of SQL `MINUS` ..
[20:12:43] alaing: cnk the plugin is pretty basic but and mainly relies on rails form builder
[20:12:58] arup_r: ok,, wait rereading it now
[20:13:11] alaing: the thing is i dont think travis knows about the plugin if i setup its of gemfile to test
[20:13:27] prgmmr: has joined #RubyOnRails
[20:13:54] kallisti5: arup_r: yeah, it's a complex problem to solve with the "rails way" :-)
[20:14:42] Terens: holy fuck. I visited an eshop that downloads 142mb per page with 250 requets
[20:14:58] arup_r: kallisti5: you want to compare data in the same model?
[20:15:11] polyidus: has joined #RubyOnRails
[20:15:17] arup_r: kallisti5: Arel exist to do rails way :p
[20:15:27] kallisti5: arup_r: yeah. let me type up a clearer example
[20:15:50] rubyonrails194: has joined #RubyOnRails
[20:15:52] arup_r: yea those A, B and C not helping me to think further
[20:16:17] jenrzzz: has joined #RubyOnRails
[20:16:48] rodfersou: has joined #RubyOnRails
[20:18:31] kallisti5: arup_r: http://pastebin.com/Cp1pErGc
[20:18:42] kallisti5: ACTION ignores helpa for now
[20:20:29] jscheel: has joined #RubyOnRails
[20:20:33] Pumukel: has joined #RubyOnRails
[20:22:22] arup_r: kallisti5: if you do group by server and then select the date field, the data will take a kind of structure which matches with yours. Now, what should be the reference? Based on what you will check, what you have and what you don't have
[20:22:35] arup_r: still that requirement is not clear
[20:22:49] rattatmatt: has joined #RubyOnRails
[20:23:44] renews: has joined #RubyOnRails
[20:23:53] kallisti5: arup_r: the biggest point is pointing out that there are differences between servers
[20:24:19] kallisti5: so If date doesn't exist on server B but exists on the rest I want to highlight it
[20:26:25] renews: has joined #RubyOnRails
[20:27:46] kallisti5: arup_r: aah.. i got you
[20:27:52] kallisti5: Agent.find("09a597f6-5973-43bd-b026-952bd3201dde").recovery_points.group_by(&:created_at).keys
[20:28:10] kallisti5: that'll give me dates, then points by date
[20:29:01] Pazician: has joined #RubyOnRails
[20:31:50] Devalo: has joined #RubyOnRails
[20:36:22] polyidus: has joined #RubyOnRails
[20:36:54] djbkd: has joined #RubyOnRails
[20:39:04] daveomcd_: has left #RubyOnRails: ()
[20:39:14] daveomcd: has joined #RubyOnRails
[20:39:16] daveomcd: I'm trying to set up a "reject_if" on a nested attributes, nested attribute. Do I put the reject_if on my most parent model, or do I put it on the most immediate parent model? Here's some code of the controller and most parent model file: https://gist.github.com/daveomcd/2d00f46181b4c192a3a5
[20:39:20] moeabdol: has joined #RubyOnRails
[20:39:28] futilegames: has joined #RubyOnRails
[20:40:44] jtong: has joined #RubyOnRails
[20:41:46] Cohedrin: has joined #RubyOnRails
[20:43:49] cd-rum: has joined #RubyOnRails
[20:44:04] sypheren: has joined #RubyOnRails
[20:46:29] djbkd: has joined #RubyOnRails
[20:47:28] slash_nick: daveomcd: gut tells me most immediate parent...
[20:47:32] slash_nick: have you tried it?
[20:48:35] DoctorMonocular: has joined #RubyOnRails
[20:49:15] halfamind1: has joined #RubyOnRails
[20:50:45] blackmesa: has joined #RubyOnRails
[20:54:29] daveomcd: slash_nick, yep - i've tried it on both, and each other. I think I'll move back to most immediate parent - but just wanted to try and rule out that as the issue.
[20:54:50] acosonic: has joined #RubyOnRails
[21:01:47] chouhoulis: has joined #RubyOnRails
[21:02:15] cd-rum_: has joined #RubyOnRails
[21:05:42] intrigueD: has joined #RubyOnRails
[21:07:10] srinidhi: has joined #RubyOnRails
[21:08:53] mary5030: has joined #RubyOnRails
[21:09:20] camilasan: has joined #RubyOnRails
[21:09:46] dvinciguerra: has joined #RubyOnRails
[21:10:57] nettoweb: has joined #RubyOnRails
[21:11:44] sbarg: has joined #RubyOnRails
[21:12:16] loechel: has joined #RubyOnRails
[21:12:21] DiCablo: has joined #RubyOnRails
[21:12:32] augcesar: has joined #RubyOnRails
[21:14:11] gabr13l: has joined #RubyOnRails
[21:17:12] apotry: has joined #RubyOnRails
[21:17:21] naftilos76: has joined #RubyOnRails
[21:17:28] rodr1go: has joined #RubyOnRails
[21:20:21] new_bruins: has joined #RubyOnRails
[21:21:03] htmldrum: has joined #RubyOnRails
[21:21:04] htmldrum_: has joined #RubyOnRails
[21:23:33] choke: has joined #RubyOnRails
[21:23:35] acosonic: has joined #RubyOnRails
[21:25:34] yfeldblum: has joined #RubyOnRails
[21:27:15] hxegon: has joined #RubyOnRails
[21:28:07] drbayer: has joined #RubyOnRails
[21:28:45] zave: has joined #RubyOnRails
[21:29:24] polyidus: has joined #RubyOnRails
[21:31:09] ascarter: has joined #RubyOnRails
[21:32:20] Pupeno: has joined #RubyOnRails
[21:32:28] djbkd: has joined #RubyOnRails
[21:33:37] bollullera: has joined #RubyOnRails
[21:34:01] RubyNewbey_____: has joined #RubyOnRails
[21:34:14] TheNet: has joined #RubyOnRails
[21:34:34] baweaver: has joined #RubyOnRails
[21:34:49] podman: has joined #RubyOnRails
[21:35:23] jlyndon: has joined #RubyOnRails
[21:35:25] sdn90: has joined #RubyOnRails
[21:36:19] eyeamaye: has joined #RubyOnRails
[21:36:24] chipotle_: has joined #RubyOnRails
[21:36:29] lipoqil: has joined #RubyOnRails
[21:36:52] czetter: has joined #RubyOnRails
[21:37:01] jcp: has joined #RubyOnRails
[21:37:04] blackmesa: has joined #RubyOnRails
[21:37:30] jlpeters: has joined #RubyOnRails
[21:37:36] bollullera: has left #RubyOnRails: ()
[21:37:57] marr123: has joined #RubyOnRails
[21:37:59] JoshL: has joined #RubyOnRails
[21:39:56] JonasOSDever: has joined #RubyOnRails
[21:40:23] Pupeno: has joined #RubyOnRails
[21:40:26] markelite: has joined #RubyOnRails
[21:42:00] alaing: anyone around
[21:42:35] sypheren: has joined #RubyOnRails
[21:42:57] cnk: a few folks
[21:43:47] smathy: Lies, they're all dead.
[21:45:19] Pupeno: has joined #RubyOnRails
[21:45:55] jlebrech: has joined #RubyOnRails
[21:46:18] sbarg1: has joined #RubyOnRails
[21:46:51] FooMunki: has joined #RubyOnRails
[21:52:05] cschneid: has joined #RubyOnRails
[21:53:21] ascarter: has joined #RubyOnRails
[21:53:35] moeabdol: has joined #RubyOnRails
[21:56:49] workmad3: has joined #RubyOnRails
[21:57:39] alaing: do i need the dummy app in my spec folder? can I just test my form builder plugin without it
[21:58:01] alaing: i'm using rspec if that makes any difference
[22:00:22] nettoweb: has joined #RubyOnRails
[22:00:41] sleungcy: has joined #RubyOnRails
[22:00:41] shamanime: has joined #RubyOnRails
[22:00:41] RTG`: has joined #RubyOnRails
[22:00:41] iuuso: has joined #RubyOnRails
[22:00:41] tw1sted: has joined #RubyOnRails
[22:00:41] berserk_ren: has joined #RubyOnRails
[22:00:41] Haydos: has joined #RubyOnRails
[22:00:41] reaVer: has joined #RubyOnRails
[22:00:41] bitemyapp: has joined #RubyOnRails
[22:00:41] Guest52406: has joined #RubyOnRails
[22:00:41] beingjohnm: has joined #RubyOnRails
[22:00:49] hahuang65: has joined #RubyOnRails
[22:01:01] matthias_: has joined #RubyOnRails
[22:01:51] sypheren: has joined #RubyOnRails
[22:02:41] nettoweb: has joined #RubyOnRails
[22:03:00] chipotle: has joined #RubyOnRails
[22:04:36] cnk: I think you probably do need a dummy app so you can test integration into a rails project
[22:04:58] cnk: Jose Valim's book was the best reference I found on engines / plugins, etc
[22:05:03] tjohnson: has joined #RubyOnRails
[22:05:04] cnk: the guides might hellp
[22:12:48] stannard: has joined #RubyOnRails
[22:13:42] jgpawletko: has joined #RubyOnRails
[22:14:58] phredus: has joined #RubyOnRails
[22:16:18] queequeg1: has joined #RubyOnRails
[22:19:24] mary5030: has joined #RubyOnRails
[22:22:12] _djbkd: has joined #RubyOnRails
[22:22:41] htmldrum: has joined #RubyOnRails
[22:22:45] htmldrum_: has joined #RubyOnRails
[22:23:51] tvw: has joined #RubyOnRails
[22:24:22] jscheel: has joined #RubyOnRails
[22:25:57] uglybandersnatch: has joined #RubyOnRails
[22:28:59] TheNet: has joined #RubyOnRails
[22:30:31] FooMunki: has joined #RubyOnRails
[22:30:39] Pupeno: has joined #RubyOnRails
[22:36:09] eyeamaye1: has joined #RubyOnRails
[22:36:50] polyidus: has joined #RubyOnRails
[22:37:15] mdw: has joined #RubyOnRails
[22:37:17] pawnbox: has joined #RubyOnRails
[22:40:55] disgrntld1: has joined #RubyOnRails
[22:41:11] pwnd_nsfw: cnk, that reference is great
[22:41:37] cnk: Which one? the engines guides?
[22:41:43] cnk: or the Valim book?
[22:41:47] pwnd_nsfw: The valim book
[22:41:50] pwnd_nsfw: crafting rails 4 apps or w/e
[22:42:54] cnk: Ya. I had a hard time getting into it but then we chose it for our book group +++
[22:44:59] DragonPunch: has joined #RubyOnRails
[22:45:05] pwnd_nsfw: Well, it's like.. incredibly specific
[22:45:19] pwnd_nsfw: like, if you don't need to use the example RIGHT THEN, it's basically like "eh ok, I know it exists at least"
[22:45:58] cnk: I really appreciated getting to work on plugins for a whole book (even if the first one wasn't of any interest to me)
[22:50:42] yfeldblum: has joined #RubyOnRails
[22:50:59] reber: has joined #RubyOnRails
[22:51:40] northfurr: has joined #RubyOnRails
[22:51:59] snowy: has joined #RubyOnRails
[22:54:36] neanderslob_: has joined #RubyOnRails
[22:56:43] hxegon: has joined #RubyOnRails
[23:00:49] queequeg1: has joined #RubyOnRails
[23:00:59] codepete: has joined #RubyOnRails
[23:03:56] codepete: has joined #RubyOnRails
[23:04:28] polyidus: has joined #RubyOnRails
[23:04:37] codepete: has joined #RubyOnRails
[23:04:49] one_zero: has joined #RubyOnRails
[23:04:57] codepete_: has joined #RubyOnRails
[23:05:17] TheNet: has joined #RubyOnRails
[23:05:42] chipotle_: has joined #RubyOnRails
[23:06:17] codepete: has joined #RubyOnRails
[23:06:26] queequeg1: has joined #RubyOnRails
[23:06:55] codepete_: has joined #RubyOnRails
[23:10:59] TheNet: has joined #RubyOnRails
[23:13:14] neanderslob_: has joined #RubyOnRails
[23:13:31] baweaver: has joined #RubyOnRails
[23:14:23] queequeg1: has joined #RubyOnRails
[23:14:50] yfeldblum: has joined #RubyOnRails
[23:15:34] neanderslob_: has joined #RubyOnRails
[23:16:24] fox_mulder_cp: has joined #RubyOnRails
[23:19:02] choke: has joined #RubyOnRails
[23:19:49] quazimodo: has joined #RubyOnRails
[23:22:46] Balzrael: has joined #RubyOnRails
[23:27:59] duncannz: has joined #RubyOnRails
[23:29:29] TheNet: has joined #RubyOnRails
[23:29:57] intrigueD: has joined #RubyOnRails
[23:36:41] manfrin: has joined #RubyOnRails
[23:36:48] pawnbox: has joined #RubyOnRails
[23:41:30] polyidus: has joined #RubyOnRails
[23:48:02] crystal77: has joined #RubyOnRails
[23:48:32] LambdaSource: has joined #RubyOnRails
[23:48:39] halfamind: has joined #RubyOnRails
[23:53:08] bricker: has joined #RubyOnRails
[23:59:13] _Tariq: has joined #RubyOnRails