« Back to channel list

#RubyOnRails - 06 July 2016

« Back 1 day Forward 1 day »
[00:00:39] Radar: comm64x: article would belong to a post_type?
[00:00:47] Radar: comm64x: Because different articles can have different post_types
[00:03:26] pyemkey: has joined #RubyOnRails
[00:04:45] quazimodo: has joined #RubyOnRails
[00:08:11] moring: has joined #RubyOnRails
[00:08:30] moring: howdy folks
[00:09:03] moring: I was wondering If anybody can answer a "career" question. More like career advice.
[00:09:38] Bira: has joined #RubyOnRails
[00:09:41] arooni-mobile: has joined #RubyOnRails
[00:10:32] Radar: moring: fire away
[00:11:10] comm64x: Radar: a post can have different post_types, namely a post can be an article, or a page, or a project
[00:11:15] augcesar: has joined #RubyOnRails
[00:11:31] gopz: has joined #RubyOnRails
[00:11:32] comm64x: an article would only have one post_type
[00:11:44] Radar: comm64x: so an article would belong to a post_type
[00:13:17] comm64x: thats what I was trying to verify...it would be easier sounding I think if there were an is_a association but I could be looking at things the wrong way lol
[00:13:36] moring: I've been playing around with rails for a while. I’ve done some tutorials and a small project. I'm looking for the next step to grow my knowledge. I was looking at contributing at Discourse or even Rails but I feel overwhelmed with the huge code base. Also, in the case of Discourse I’m not familiar with Ember. My ultimate goal is to get a job as a rails developer in-house or remote.
[00:13:47] eserror: has joined #RubyOnRails
[00:14:13] flashpoint9: has joined #RubyOnRails
[00:14:33] arBmind1: has joined #RubyOnRails
[00:22:12] pawnbox: has joined #RubyOnRails
[00:23:49] asheinfeld: has joined #RubyOnRails
[00:24:33] hahuang61: has joined #RubyOnRails
[00:24:34] openstruct: has joined #RubyOnRails
[00:24:54] arooni-mobile: has joined #RubyOnRails
[00:26:23] Darmani: Hey guys, question.
[00:26:57] Darmani: How do you add multiple values to one object? Like if I had a "shirt" object but I wanted it to also come in medium and large...
[00:27:06] Darmani: How would I do that without creating another t-shirt object with those values?
[00:29:19] moring: Darmani: Maybe not another t-shirt object but rather a Size object
[00:30:01] Darmani: moring: So... A shirt would belong to a "size"? o.o
[00:30:23] moring: Darmani: A shirt "has a" size
[00:31:01] Darmani: moring: I never thought of that... hmm...
[00:31:13] Radar: Darmani: You could have "variants" of a shirt, where the variant tracks the different size / colour combinations
[00:31:24] Radar: so that someone buys a variant of a shirt rather than the shirt itself
[00:31:39] Darmani: Radar: Hello friend ^.^
[00:31:54] flashpoint9: Oh yea and you could keep inventory on a shirt by finding how many shirts are owned by a size
[00:32:15] Darmani: So a variant model?
[00:32:16] Radar: flashpoint9: no need to worry about inventory in this case; it's a simple Rails app exercise that I've given to Darmani
[00:32:23] Radar: flashpoint9: This one: https://gist.github.com/radar/3037d4c5f8d3240afd43
[00:32:25] moring: flashpoint9: but why Size owns shirt?
[00:32:43] Radar: It even says: "Do not worry about stock management for the time being." :D
[00:33:13] Darmani: Radar: So a shirt would belong to a variant and the variant would hold all of the variables...?
[00:33:19] Radar: Darmani: yes
[00:33:28] moring: Radar: how would you go about representing variants of shirts in AR? Single-table inheritance?
[00:33:31] flashpoint9: Radar: Oh neat exercise! Im interested, do you have a bunch of exercises?
[00:33:50] Darmani: Radar: But wouldn't I still have to create like 20 different instances of shirt objects to account for all the variations?
[00:34:00] Radar: Darmani: 9.
[00:34:11] Radar: Darmani: Small / Medium / Large sizes, Red / Blue / Green colours.
[00:34:20] Radar: It's a 3x3 matrix of combinations, so 9.
[00:34:50] Darmani: Radar: Okay, I'll get to work.
[00:35:14] gopz: has joined #RubyOnRails
[00:35:19] flashpoint9: Radar: Holy cow mate?! Your github is so active!
[00:35:29] Radar: flashpoint9: Just two: https://github.com/radar/guides/tree/master/what_next
[00:35:35] Radar: flashpoint9: It is?
[00:35:50] Radar: flashpoint9: Oh that's showing my work activity too.
[00:35:58] flashpoint9: 3,800 contributions in the last year
[00:36:07] Radar: There's a nice big gap over the last week where I did not do much but play overwatch and mope.
[00:36:23] triptec: has joined #RubyOnRails
[00:36:24] Darmani: Radar: You play Overwatch?! :O
[00:36:29] flashpoint9: Compare to mine.... https://github.com/JosephLeon
[00:36:42] Radar: flashpoint9: Maybe you just commit less frequently to me?
[00:37:37] Radar: Darmani: I have been known too.
[00:37:48] Radar: Now that I'm back at work full time I won't be playing it as often as the last week.
[00:38:15] asheinfeld: has joined #RubyOnRails
[00:38:20] Darmani: They need to nerf Torbjorn. Like yesterday.
[00:38:23] flashpoint9: Radar: You play hearthstone ever?
[00:38:31] Radar: flashpoint9: I could never get into it.
[00:38:34] flashpoint9: havent played overwatch, is it anygood?
[00:38:46] Radar: flashpoint9: If you liked TF2 then you'll like Overwatch.
[00:40:21] Radar: flashpoint9: Quite a few of those commits on my contributing graph would be from when I have been working on my book. I make lots of little commits of single word changes as I tie those changes back to issues.
[00:40:37] Radar: or commits on side projects, like github.com/radar/logs.ex
[00:40:46] jstransky: has joined #RubyOnRails
[00:41:06] flashpoint9: My work is all private on bitbucket, I guess that would add a dent into my contributions
[00:41:12] flashpoint9: its still impressive looking
[00:41:53] calmchaos: has joined #RubyOnRails
[00:43:47] Darmani: Radar: I guess if they are actually ordering "variants" then my shirts don't even need attributes like color or size right?
[00:44:01] Radar: Darmani: Yes, that's right.
[00:45:07] arooni-mobile: has joined #RubyOnRails
[00:45:31] weaksauce: has joined #RubyOnRails
[00:50:03] allcentury: has joined #RubyOnRails
[00:50:20] atrius: has joined #RubyOnRails
[00:50:29] shilon: has left #RubyOnRails: ()
[00:51:09] fl4sh_: has joined #RubyOnRails
[00:51:33] sarink: has joined #RubyOnRails
[00:53:10] rickmasta: has joined #RubyOnRails
[00:53:23] blackmesa: has joined #RubyOnRails
[00:55:12] Radar: flashpoint9: Thank you.
[01:00:47] gopz: has joined #RubyOnRails
[01:04:19] pyemkey: has joined #RubyOnRails
[01:04:30] ekinmur: has joined #RubyOnRails
[01:04:48] pur3eval: has joined #RubyOnRails
[01:07:30] SteenJobs: has joined #RubyOnRails
[01:07:36] zacts: has joined #RubyOnRails
[01:09:30] pawnbox: has joined #RubyOnRails
[01:12:25] mrkhlm: has joined #RubyOnRails
[01:15:37] jstransky: has joined #RubyOnRails
[01:16:38] ekinmur: has joined #RubyOnRails
[01:17:54] mrkhlm: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[01:18:06] jmignault: has joined #RubyOnRails
[01:18:37] Oliphaunte: has joined #RubyOnRails
[01:18:40] arooni-mobile: has joined #RubyOnRails
[01:22:04] SteenJobs: has joined #RubyOnRails
[01:24:11] arooni-mobile: has joined #RubyOnRails
[01:26:00] Ropeney: has joined #RubyOnRails
[01:26:20] jenrzzz: has joined #RubyOnRails
[01:26:20] jenrzzz: has joined #RubyOnRails
[01:26:40] gopz: has joined #RubyOnRails
[01:27:04] ElFerna: has joined #RubyOnRails
[01:28:09] Rodya_: has joined #RubyOnRails
[01:29:29] roamingdog: has joined #RubyOnRails
[01:30:05] Contigi: has joined #RubyOnRails
[01:31:49] Oliphaunte: has joined #RubyOnRails
[01:32:33] sevenseacat: has joined #RubyOnRails
[01:32:55] flashpoint9: has joined #RubyOnRails
[01:34:20] Darmani: Radar: Hmm. I nested variants as a resource under shirts but it's also in the admin namespace... The helper methods are getting to be a little long
[01:34:32] Darmani: example: edit_admin_shirt_variant_path
[01:36:47] Radar: that's alright.
[01:37:59] Darmani: roger that.
[01:39:28] JoshGlzB_: has joined #RubyOnRails
[01:47:06] JoshGlzBrk: has joined #RubyOnRails
[01:49:21] Darmani: Radar: <%= simple_form_for([:admin, @shirt, @variant]) do |f| %>
[01:49:29] Darmani: Is that about right? Lol
[01:49:33] Radar: Seems fine to me.
[01:49:42] chipotle: has joined #RubyOnRails
[01:50:00] Darmani: Okay lol I'm getting an error but I'll keep working on it.
[01:50:57] Darmani: Simple_form thinks I mean admin_variant_path.
[01:54:45] blackmesa: has joined #RubyOnRails
[02:01:47] macsteps: has joined #RubyOnRails
[02:04:16] allcentury: has joined #RubyOnRails
[02:04:55] moring: has left #RubyOnRails: ()
[02:05:01] pyemkey: has joined #RubyOnRails
[02:05:33] pur3eval: has joined #RubyOnRails
[02:06:17] Darmani: https://gist.github.com/mfifth/ca06e590077cd60dabf5df13e2c91dc2
[02:06:38] Darmani: Error says there is no route that matches, don't know why.
[02:08:05] chipotle: has joined #RubyOnRails
[02:09:53] rubyonrailed: has joined #RubyOnRails
[02:10:35] Darmani: Is this the right way to create a post form? <%= simple_form_for(admin_shirt_variant_path(@shirt, @variant)) do |f|, method: :post %>
[02:12:33] asheinfeld: has joined #RubyOnRails
[02:14:38] crdpink: has joined #RubyOnRails
[02:17:09] Darmani: fixed it thanks guys :p
[02:17:26] chipotle: has joined #RubyOnRails
[02:17:51] pawnbox: has joined #RubyOnRails
[02:22:00] arooni-mobile: has joined #RubyOnRails
[02:23:09] michael8fefe983f: has joined #RubyOnRails
[02:23:17] jishankai: has joined #RubyOnRails
[02:25:19] hahuang61: has joined #RubyOnRails
[02:30:45] akira616: has joined #RubyOnRails
[02:33:35] chouhoulis: has joined #RubyOnRails
[02:38:40] benlieb: has joined #RubyOnRails
[02:39:06] rogue_koder: has joined #RubyOnRails
[02:39:40] Oliphaunte: has joined #RubyOnRails
[02:42:21] quazimodo: has joined #RubyOnRails
[02:45:04] upsell5: has joined #RubyOnRails
[02:49:21] jahbrews1i: has joined #RubyOnRails
[02:52:49] calmchaos: has joined #RubyOnRails
[02:54:12] sarink: has joined #RubyOnRails
[02:55:11] pragmatism: has joined #RubyOnRails
[02:55:47] blackmesa: has joined #RubyOnRails
[02:59:24] jstransky: has joined #RubyOnRails
[03:00:01] Devalo: has joined #RubyOnRails
[03:02:25] justrohu: has joined #RubyOnRails
[03:03:32] zacts: has joined #RubyOnRails
[03:10:45] pawnbox: has joined #RubyOnRails
[03:16:40] pyemkey: has joined #RubyOnRails
[03:16:47] dc4: has joined #RubyOnRails
[03:19:56] wethu: has joined #RubyOnRails
[03:23:58] akira616: has joined #RubyOnRails
[03:38:33] wldcordeiro: has joined #RubyOnRails
[03:43:38] chipotle_: has joined #RubyOnRails
[03:43:38] djbkd: has joined #RubyOnRails
[03:51:31] sarink: has joined #RubyOnRails
[03:52:17] Devalo: has joined #RubyOnRails
[03:58:54] blackmesa: has joined #RubyOnRails
[04:03:11] duncannz: has joined #RubyOnRails
[04:03:47] Or1on: has joined #RubyOnRails
[04:04:36] duncannz: has joined #RubyOnRails
[04:05:11] duncannz: has joined #RubyOnRails
[04:05:55] Oliphaunte: has joined #RubyOnRails
[04:06:12] duncannz: has joined #RubyOnRails
[04:06:43] sypheren: has joined #RubyOnRails
[04:07:43] FCser: has joined #RubyOnRails
[04:10:42] justrohu: has joined #RubyOnRails
[04:13:20] pickandmix: has joined #RubyOnRails
[04:21:18] sarink: has joined #RubyOnRails
[04:26:02] hahuang61: has joined #RubyOnRails
[04:27:18] zeroreg: has joined #RubyOnRails
[04:27:22] arooni-mobile: has joined #RubyOnRails
[04:32:09] arooni-mobile: has joined #RubyOnRails
[04:33:21] Axsuul: has joined #RubyOnRails
[04:34:35] arooni-mobile: has joined #RubyOnRails
[04:34:48] xcesariox: has joined #RubyOnRails
[04:35:12] arooni-mobile: has left #RubyOnRails: ()
[04:35:49] okdas: has joined #RubyOnRails
[04:35:49] okdas: has joined #RubyOnRails
[04:40:32] sarink: has joined #RubyOnRails
[04:41:53] deecross: has joined #RubyOnRails
[04:52:07] arooni-mobile: has joined #RubyOnRails
[04:52:42] arooni-mobile: has joined #RubyOnRails
[04:54:38] arooni-mobile: has joined #RubyOnRails
[04:54:47] sarink: has joined #RubyOnRails
[04:57:46] dminuoso: has joined #RubyOnRails
[05:00:21] blackmesa: has joined #RubyOnRails
[05:00:29] Oliphaunte: has joined #RubyOnRails
[05:04:32] arooni-mobile: has joined #RubyOnRails
[05:07:19] yfeldblum: has joined #RubyOnRails
[05:08:28] pawnbox: has joined #RubyOnRails
[05:09:49] atomx: has joined #RubyOnRails
[05:09:58] calmchaos: has joined #RubyOnRails
[05:10:51] atomx: Hi, I'm just starting to learn RoR, and came across ApplicationRecord - I wanted to learn something more about it but couldn't find it in the Rails API page? Is it elsewhere?
[05:10:52] sarink: has joined #RubyOnRails
[05:14:32] arooni-mobile: has joined #RubyOnRails
[05:18:41] Or1on: has joined #RubyOnRails
[05:24:18] mytrile: has joined #RubyOnRails
[05:24:33] arooni-mobile: has joined #RubyOnRails
[05:25:47] rvanlieshout: has joined #RubyOnRails
[05:27:53] jenrzzz: has joined #RubyOnRails
[05:27:53] jenrzzz: has joined #RubyOnRails
[05:28:08] Dimik: has joined #RubyOnRails
[05:28:21] calmchaos: has joined #RubyOnRails
[05:31:19] zacts: has joined #RubyOnRails
[05:33:13] Radar: atom_: It's defined in your app, in app/models/application_record.rb.
[05:34:34] arooni-mobile: has joined #RubyOnRails
[05:35:34] upsell5: has joined #RubyOnRails
[05:36:51] pawnbox: has joined #RubyOnRails
[05:37:55] hahuang61: has joined #RubyOnRails
[05:39:04] pyemkey: has joined #RubyOnRails
[05:43:03] Fuzai: Hi there, is it possible to use an array of strings as a list of possible constraints for a route?
[05:43:24] calmchaos: has joined #RubyOnRails
[05:43:32] Fuzai: http://guides.rubyonrails.org/v3.0.3/routing.html seems to suggest a class, but I feel like that is overkill
[05:43:44] Fuzai: (Section 3.10)
[05:44:35] arooni-mobile: has joined #RubyOnRails
[05:45:16] Fuzai: get 'business/:id' => 'businesses#static', constraints: { id: static_sites } where static_sites is an array of keyword strings
[05:45:42] atomx: Radar: right, thanks! ;)
[05:48:06] yardenbar: has joined #RubyOnRails
[05:54:36] arooni-mobile: has joined #RubyOnRails
[05:54:42] jahbrewski: has joined #RubyOnRails
[05:54:49] Oliphaunte: has joined #RubyOnRails
[05:57:19] dminuoso: has joined #RubyOnRails
[06:01:40] blackmesa: has joined #RubyOnRails
[06:02:19] alfiemax: hi and Good Morning :)
[06:02:45] Macaveli: has joined #RubyOnRails
[06:03:29] alfiemax: i'm facing an issue while using wicked_pdf to generate a pdf
[06:04:08] alfiemax: not exactly in generating pdf, but rendering svg images
[06:04:23] alfiemax: this is the line i'm using
[06:04:29] alfiemax: = wicked_pdf_image_tag asset_url('Logo.svg'), type: "image/svg+xml", style: "height: auto;width:125px;"
[06:05:02] alfiemax: the image doesn't show up in the pdf
[06:05:19] alfiemax: but when i use the debug option and render as html, it shows up
[06:06:53] alfiemax: just let me know if you need any more info, i dnt know what else to provide
[06:10:20] roshanavand: has joined #RubyOnRails
[06:10:44] tfitts: anyone here use the Peddler or excon gems?
[06:12:01] jenrzzz: has joined #RubyOnRails
[06:13:39] Radar: tfitts: excon yes
[06:14:45] jgt1: has joined #RubyOnRails
[06:17:47] zacts: has joined #RubyOnRails
[06:18:52] tfitts: have you used a newish version of it (like since january?) They added an expects class that swallows up the errors I was looking at before and I haven't been able to figure out how to pass the errors down the chain. https://gist.github.com/tfitts/4ca5d3d4a75a34697a7cb33a73a9cf5f that has the differences rescuing exceptions.
[06:20:06] Radar: Nope, I haven't used it in quite a while.
[06:25:22] the_drow: has joined #RubyOnRails
[06:26:28] pur3eval: has joined #RubyOnRails
[06:26:40] dminuoso: has joined #RubyOnRails
[06:27:37] rubyonrailed: has joined #RubyOnRails
[06:28:27] calmchaos: has joined #RubyOnRails
[06:31:55] njero: has joined #RubyOnRails
[06:32:25] pawnbox: has joined #RubyOnRails
[06:34:37] the_drow: has joined #RubyOnRails
[06:35:23] tvw: has joined #RubyOnRails
[06:37:46] pawnbox: has joined #RubyOnRails
[06:39:50] pyemkey: has joined #RubyOnRails
[06:40:44] calmchaos: has joined #RubyOnRails
[06:43:00] Velizar: has joined #RubyOnRails
[06:46:12] GoranPavlovic: has joined #RubyOnRails
[06:49:22] comrad: has joined #RubyOnRails
[06:50:38] sneep: I have a system that runs some old Rails 3 apps on an old Ruby 1.9. Is it generally safe to update the Ruby version from 1.9 to, say, 2.3?
[06:51:00] Radar: sneep: Yes, that should be fine.
[06:51:08] Radar: sneep: You've got a lot of tests in that app so you can just run them and if they all pass then it is OK.
[06:51:20] guest56: has joined #RubyOnRails
[06:51:30] sevenseacat: you may have some issues from 1.9 -> 2.0. from there should be okay.
[06:51:48] zeroreg: has left #RubyOnRails: ()
[06:51:52] sevenseacat: depends on the version of Rails, 3.2 should be okay.
[06:52:35] mark_66: has joined #RubyOnRails
[06:53:35] sneep: Cool. Thanks!
[06:53:36] dminuoso: has joined #RubyOnRails
[07:03:06] blackmesa: has joined #RubyOnRails
[07:08:40] siaw23: has joined #RubyOnRails
[07:09:03] deecross: has joined #RubyOnRails
[07:10:09] aganov: has joined #RubyOnRails
[07:10:10] ur5us: has joined #RubyOnRails
[07:10:31] sarink: has joined #RubyOnRails
[07:12:54] Ergo: has joined #RubyOnRails
[07:13:06] darutoko: has joined #RubyOnRails
[07:17:14] jeromelanteri: has joined #RubyOnRails
[07:17:25] jeromelanteri: https://gist.github.com/jerome-diver/81c7c4b2bee6a2b38635d83cb10de1a6
[07:17:50] jeromelanteri: i'm not able to have jqery-ui working now...
[07:18:05] Radar: jeromelanteri: Did you add the jquery-ui-rails gem to your Gemfile?
[07:18:20] Radar: Also check for JS errors in your browser's console
[07:19:26] Coldblackice: has joined #RubyOnRails
[07:20:02] jeromelanteri: Radar, i just remove the () from datepicker for remove a little error, but nothing more. No jquery-ui
[07:20:12] Radar: jeromelanteri: hard to know without seeing the issue myself
[07:20:17] jeromelanteri: Radar, from console firebug
[07:20:27] jeromelanteri: Radar, there is no issue
[07:20:35] jeromelanteri: but there is a problem
[07:21:09] jeromelanteri: do you arrive to use bootstrap and jaquery-ui together ? (maybe it is the problem ?)
[07:21:16] etiago: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[07:22:51] Radar: steps to reproduce the issue in a new app, kthx
[07:22:59] helpa: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[07:23:06] Radar: Can't help you if I can't see it happening on my own machine.
[07:24:21] sarink: has joined #RubyOnRails
[07:24:44] jeromelanteri: Radar, sure (i know that), but when there is no error it is difficult (ok, you need a demo... i understand). I'm sorry, but i asked because maybe it is a problem strange some other had before and have idea. So Raar, thank you for try, maybe a other one will have an idea.
[07:24:56] Radar: They will likely ask for the same thing.
[07:25:57] jeromelanteri: Don't trash people please, serve nothing. Okj, now you can not help from that, i understand. just stop to make the law.
[07:28:49] antgel: has joined #RubyOnRails
[07:29:06] deecross: has joined #RubyOnRails
[07:29:42] dionysus69: has joined #RubyOnRails
[07:39:26] neilfse: has joined #RubyOnRails
[07:39:30] calmchaos: has joined #RubyOnRails
[07:39:38] ngw: has joined #RubyOnRails
[07:40:39] artto: has joined #RubyOnRails
[07:40:57] pyemkey: has joined #RubyOnRails
[07:42:57] Oliphaunte: has joined #RubyOnRails
[07:45:08] rubyonrailed: has joined #RubyOnRails
[07:48:42] abhvl: has joined #RubyOnRails
[07:49:44] abhvl: if i called model method from controller like object.method then can i use self inside method to refer to "object" ??
[07:49:44] sarink: has joined #RubyOnRails
[07:49:47] njero: has joined #RubyOnRails
[07:52:25] rvanlieshout: abhvl: it doesn't really mater from where you call it
[07:52:36] rvanlieshout: self refers to self
[07:53:42] Devalo: has joined #RubyOnRails
[07:55:25] blackmesa: has joined #RubyOnRails
[07:59:52] Silthias1: has joined #RubyOnRails
[08:00:18] calmchaos: has joined #RubyOnRails
[08:00:49] pyemkey: has joined #RubyOnRails
[08:01:05] artto: has joined #RubyOnRails
[08:02:30] pawnbox: has joined #RubyOnRails
[08:06:41] andywww: has joined #RubyOnRails
[08:08:07] calmchaos: has joined #RubyOnRails
[08:09:26] lxsameer: has joined #RubyOnRails
[08:10:20] raldu: has joined #RubyOnRails
[08:11:59] sarink: has joined #RubyOnRails
[08:12:15] GorillaApe: has joined #RubyOnRails
[08:12:29] GorillaApe: Hello I am trying to search on associated model with ransack
[08:12:41] GorillaApe: However it doesnt work and I cant find out why
[08:14:17] jenrzzz: has joined #RubyOnRails
[08:15:15] hahuang61: has joined #RubyOnRails
[08:16:51] calmchaos: has joined #RubyOnRails
[08:19:12] finnnnnnnnnnn: has joined #RubyOnRails
[08:20:31] helpa-bot: has joined #RubyOnRails
[08:20:52] dminuoso: has joined #RubyOnRails
[08:22:31] helpa: has joined #RubyOnRails
[08:24:00] hck89: has joined #RubyOnRails
[08:26:13] the_drow: has joined #RubyOnRails
[08:26:57] davidklsn: has joined #RubyOnRails
[08:27:02] pawnbox: has joined #RubyOnRails
[08:27:40] Ayey_: has joined #RubyOnRails
[08:31:01] Palsson: has joined #RubyOnRails
[08:36:53] Oliphaunte: has joined #RubyOnRails
[08:37:53] yfeldblum: has joined #RubyOnRails
[08:39:39] calmchaos: has joined #RubyOnRails
[08:39:52] marr: has joined #RubyOnRails
[08:41:30] srinidhi: has joined #RubyOnRails
[08:45:40] Kedare: has joined #RubyOnRails
[08:45:40] DoubleMalt: has joined #RubyOnRails
[08:48:32] Sashimi: has joined #RubyOnRails
[08:49:24] triptec: has joined #RubyOnRails
[08:50:52] harfangk: has joined #RubyOnRails
[08:51:28] finnnnnnnnnnn: has joined #RubyOnRails
[08:52:39] blackmesa: has joined #RubyOnRails
[08:58:38] BillyParadise: has joined #RubyOnRails
[08:59:28] BillyParadise: hi folks, i'm having a brainfart trying to build a scope where an association_id is not equal to an integer in the same model. Please see line 12: https://gist.github.com/BillyParadise/845920e8046d10084b3b54e8fe6cfb3c
[08:59:40] qejk: has joined #RubyOnRails
[09:03:42] kitsuneyo: has joined #RubyOnRails
[09:04:07] mark_66: has joined #RubyOnRails
[09:06:48] alfiemax: BillyParadise, try : where('requestedplan != ?',plan_id)
[09:07:59] BillyParadise: thanks, but still no: Profile.changereq NameError: undefined local variable or method `plan_id' for #<Class:0x007f90b2b1c9d0>
[09:09:10] pawnbox: has joined #RubyOnRails
[09:10:34] sevenseacat: BillyParadise: so what was the error with your original code?
[09:10:51] BillyParadise: same. I'll revert to double check
[09:11:02] sevenseacat: i dont think so.
[09:12:14] BillyParadise: well aint that cool
[09:12:25] BillyParadise: same error i meant
[09:12:33] BillyParadise: Now it wants to work.
[09:12:54] BillyParadise: Not complaining, but I just cut and pasted my original gist back in, and all good. weird
[09:13:06] BillyParadise: 2.3.0 :117 > Profile.changereq Profile Load (0.6ms) SELECT "profiles".* FROM "profiles" WHERE (requestedplan != plan_id)
[09:13:08] sevenseacat: indeed, the code looks fine.
[09:13:34] BillyParadise: bombed 100 times in irb, i put in your code, put mine back, and it works.
[09:14:16] BillyParadise: thanks for doing a fonzie for me.
[09:19:03] artto: has joined #RubyOnRails
[09:20:14] AimlessRAven: has joined #RubyOnRails
[09:20:48] AimlessRAven: how to calculate Post.comment.created_at what be difference to Date.today in 5min ago, 1 day ago..
[09:21:14] finnnnnnnnnnn: has joined #RubyOnRails
[09:24:38] alfiemax: AimlessRaven, i has used this gem to achieve that some time back
[09:24:38] alfiemax: https://github.com/radar/dotiw
[09:24:54] pvertenten: has joined #RubyOnRails
[09:25:11] pawnbox: has joined #RubyOnRails
[09:27:38] srinidhi: has joined #RubyOnRails
[09:27:52] dtzuzu: has joined #RubyOnRails
[09:28:28] Ayey_: has joined #RubyOnRails
[09:31:00] Oliphaunte: has joined #RubyOnRails
[09:31:44] shtirlic: has joined #RubyOnRails
[09:36:56] Ropeney: has joined #RubyOnRails
[09:39:21] abhvl: can i convert an object to params?
[09:39:47] Palsson_: has joined #RubyOnRails
[09:42:58] shtirlic: has joined #RubyOnRails
[09:45:42] Ropeney: has joined #RubyOnRails
[09:47:58] alfiemax: abhvl, as_json ??
[09:48:09] abhvl: will check
[09:50:13] artto: has joined #RubyOnRails
[09:54:28] roelof: has joined #RubyOnRails
[09:54:46] finnnnnnnnnnn_: has joined #RubyOnRails
[09:55:40] roelof: How can I solve this error : undefined local variable or method `schema' for #<ValidateAccountService:0x00000003f6a448 on this code : https://gist.github.com/rwobben/fdb161e680919c0a72dba14f4d27dabe
[09:56:40] alfiemax: roelof, set it as a class object as @@schema
[09:57:40] roelof: sorry, then I see this message : uninitialized class variable @@schema in ValidateAccountService
[09:57:57] roelof: or must I change both to @@schema ?
[09:58:29] blackmesa: has joined #RubyOnRails
[09:58:54] alfiemax: yeah, and i'd probably define schema as an instance variable as @schema in the initialize method
[09:58:55] roelof: oke, I do and have to change more
[09:59:08] alfiemax: and use that within other methods
[09:59:33] shtirlic: has joined #RubyOnRails
[10:01:13] tvw: has joined #RubyOnRails
[10:03:27] roelof: alfiemax: I do not see what you mean exactly
[10:03:53] roelof: but I have now another problem. In the last line I have this : @account.create!(@params)
[10:04:05] roelof: but @account is not defined there :(
[10:04:21] harfangk: has joined #RubyOnRails
[10:04:38] abhvl: how can i object1 = object2 except id of object2
[10:04:57] dminuoso: abhvl: When do you consider the objects to be equal?
[10:05:29] alfiemax: roelof, i think you need to look into the difference between instance variables and class variables
[10:05:49] abhvl: dminuoso, same object except few changes. id being one
[10:05:49] dminuoso: abhvl: here is the ruby convention:
[10:06:06] alfiemax: roelof, yeah, obviously what is @account ?
[10:06:14] sevenseacat: dminuoso: i think abhvl is looking for cloning or duping, not equality
[10:06:17] dminuoso: abhvl: #equal? should test for object id, while == should use something generic that you override.
[10:06:26] abhvl: sevenseacat, yes!
[10:06:31] dminuoso: sevenseacat: oh!
[10:06:50] roelof: @account schould contain a "member" of the account model
[10:07:15] bruce_lee: has joined #RubyOnRails
[10:08:21] abhvl: using .dup
[10:08:29] roelof: alfiemax: I thought I know the difference a instance variable I can use outside the class, a class variable I can use only within the class
[10:08:38] binaryplease1: has joined #RubyOnRails
[10:09:19] alfiemax: i don't think so, you really need to look it up
[10:09:47] roelof: I try to validate a json request which if it's validates will be stored into the database
[10:10:05] Sylario: DOes anuone know a gem doing float to words, in French ?
[10:15:12] workmad3: has joined #RubyOnRails
[10:17:23] roelof: oke, when using instance variables they are only work for instances of a class not the class itself. the class variables works for instances and classes. This better, alfiemax ?
[10:20:37] Pupeno: has joined #RubyOnRails
[10:25:12] Oliphaunte: has joined #RubyOnRails
[10:25:42] artto: has joined #RubyOnRails
[10:27:44] rubyonrails118: has joined #RubyOnRails
[10:27:54] rubyonrails118: has left #RubyOnRails: ()
[10:29:23] Ayey_: has joined #RubyOnRails
[10:29:46] Fuzai: has joined #RubyOnRails
[10:31:38] zacts: has joined #RubyOnRails
[10:31:58] flashpoint9: has joined #RubyOnRails
[10:34:34] artto: has joined #RubyOnRails
[10:36:13] Ayey_: has joined #RubyOnRails
[10:38:35] mostlybadfly: has joined #RubyOnRails
[10:40:15] artto: has joined #RubyOnRails
[10:42:31] Fuzai: has left #RubyOnRails: ()
[10:42:49] GodFather: has joined #RubyOnRails
[10:45:13] artto_: has joined #RubyOnRails
[10:45:19] pur3eval: has joined #RubyOnRails
[10:47:12] c355E3B: has joined #RubyOnRails
[10:47:39] artto: has joined #RubyOnRails
[10:48:16] JulienITARD: has joined #RubyOnRails
[10:48:54] roelof: no body who wants to work with me to make this service object work ?
[10:49:19] Ponyo: has joined #RubyOnRails
[10:49:24] frojnd: has joined #RubyOnRails
[10:51:50] rodfersou: has joined #RubyOnRails
[10:52:36] allcentury: has joined #RubyOnRails
[10:55:28] srinidhi: has joined #RubyOnRails
[10:55:29] raldu: learning rails is hard
[10:56:12] Ponyo: has joined #RubyOnRails
[10:56:55] roelof: raldu : I know\
[10:59:33] artto_: has joined #RubyOnRails
[11:02:08] JamieD: has joined #RubyOnRails
[11:03:32] roelof: when I do this : https://gist.github.com/rwobben/66a045db37bef89864643e3db2e4c22c. I see this error message : Invalid schema - must be either a string or a hash
[11:03:47] frojnd: has joined #RubyOnRails
[11:03:54] frojnd: Hi there.
[11:04:13] roelof: frojnd: hi
[11:04:14] AzaToth: has joined #RubyOnRails
[11:04:16] Lingo: has joined #RubyOnRails
[11:04:17] frojnd: I'm having trouble with routes ans link_to.
[11:04:25] frojnd: hi roelof
[11:05:40] dionysus69: I have this in show view <%= debug(params[:news_title]) %> but when I post or update an object this shows just _ _ _
[11:06:30] roelof: frojnd: can you show the code and the errors you see ?
[11:06:35] frojnd: This is my rake routes about GET /about(.:format) static_pages#about and this is how I call link_to: <li><%= link_to "About", 'about_path' %></li> but when I click on a link I get: No route matches [GET] "/about_path"
[11:07:14] frojnd: Also this is routes.rb get '/about', to: 'static_pages#about'
[11:08:09] roelof: try this <%= link_to "About", about_path %> , frojnd
[11:09:12] frojnd: thank you roelof o_O
[11:09:52] roelof: the problem is that 'about_path` is a string which contains about_path
[11:09:56] frojnd: I was going through docs and I did not see it should be without quotes
[11:10:03] roelof: and not the real path
[11:10:18] pyemkey: has joined #RubyOnRails
[11:12:57] AimlessRAven: = f.select :user_id_eq_any, User.all.collect{|x| [x.name, x.id]}, {include_blank: :true}, class: 'form-control'
[11:13:01] AimlessRAven: here map all of my users
[11:13:19] AimlessRAven: i want to map only theese users which in @post.comments.map(&:user)
[11:13:26] AimlessRAven: but dont repeat if have 2 equal
[11:15:12] frojnd: I ran I rake test and I saw this line: ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of database myblog_test I've created myblog_test for user myblog like this: sudo -u postgres createdb -O myblog myblog_test
[11:15:51] jokke: i'm experiencing a very strange bug: I generate a link in my rails app, it's rendered on the page but if i click it i get a 403 error page with the single string "Forbidden". This link is to another webapp (sinatra) and in its logs i can see that it actually responded with 200. The weirdest part: If i click the address bar of the browser when on the forbidden page and then hit enter the response comes
[11:15:58] frojnd: Any ideas why I get this error?
[11:17:01] jokke: both apps are plain http
[11:17:21] AimlessRAven: = f.select :user_id_eq_any, @comments.map(&:user).collect{|x| [x.name, x.id]}, {include_blank: :true}, class: 'form-control'
[11:17:32] AimlessRAven: theese return me all users who have comments in my post
[11:17:38] AimlessRAven: but if user make 2 comment
[11:17:46] AimlessRAven: return me 2 time his name
[11:17:52] AimlessRAven: ho to singularize :D this
[11:18:23] jokke: also very weird: if i copy and paste the link into a static html file, open it in the browser and click the link it works
[11:19:57] JakFrist: has joined #RubyOnRails
[11:20:49] abhvl: can i loop throup object associations without knowing them? for duplicating it to new object purpose
[11:21:12] alfiemax: for duplicating you don't have to loop
[11:21:41] alfiemax: https://github.com/amoeba-rb/amoeba
[11:22:06] abhvl: alfiemax, i need to duplicate assosications also without usintg any gem.
[11:22:19] alfiemax: why not use a gem?
[11:22:33] abhvl: cause boss said so...
[11:22:43] jokke: tell your boss he's a moron
[11:22:48] abhvl: i need job.
[11:23:12] abhvl: its already a big size complex project and i am just working on one of small task
[11:23:35] jokke: i bet it's big and complex if you're not allowed to use any gems :D
[11:24:05] alfiemax: big size complex project + immature code to clone = disaster
[11:24:52] alfiemax: well, the only work around i find is to add the gem to vendor in you app and use it :P
[11:25:58] jokke: abhvl: you can also print out the code of the gem and manually type it into your project. I think your boss will be very pleased!
[11:26:12] roelof: alfiemax: when I do what you said and make schema , @schema I see this error message : Invalid schema - must be either a string or a hash
[11:26:26] kitsuneyo: has joined #RubyOnRails
[11:26:32] bbrowning: has joined #RubyOnRails
[11:26:44] alfiemax: roelof, can you gist me your current code
[11:27:27] harfangk: has joined #RubyOnRails
[11:28:02] roelof: alfiemax: here you have : https://gist.github.com/rwobben/7b4dfb43b728f98dcd18ebc4ecf3c126
[11:30:45] alfiemax: roelof, see the comment
[11:31:36] roelof: which comment. I do not see any?
[11:31:45] alfiemax: in the gist
[11:32:05] roelof: now I see it
[11:33:03] DX1: has joined #RubyOnRails
[11:33:28] AimlessRAven: = f.select :user_id_eq_any, @comments.collect{|x| [x.user.name, x.user.id]},
[11:33:33] AimlessRAven: how to use distinct here
[11:33:39] AimlessRAven: to remove duplications of name
[11:34:06] ldnunes: has joined #RubyOnRails
[11:34:19] roelof: alfiemax: thanks, now I see this one again : undefined method `create!' for nil:NilClass
[11:34:37] roelof: Im getting the feeling that im running around in circles :(
[11:34:48] h7br1x: has joined #RubyOnRails
[11:35:00] benlieb: has joined #RubyOnRails
[11:35:22] alfiemax: @account.assign_attributes(@params)
[11:35:33] alfiemax: then do @account.save!
[11:36:37] alfiemax: AimlessRaven, i'm guessing you need to get an array ot user name and id who have commented before?
[11:36:47] AimlessRAven: alfiemax: yeah
[11:36:50] Ergo__: has joined #RubyOnRails
[11:37:00] AimlessRAven: but if user comment 2 times.. i get 2 times him name
[11:37:08] AimlessRAven: @comments.collect{|x| [x.user.name, x.user.id]}
[11:37:09] alfiemax: is @comments = Comment.all ?
[11:37:18] AimlessRAven: @comments = @post.comments.all
[11:37:18] Ayey_: has joined #RubyOnRails
[11:38:19] wethu: has joined #RubyOnRails
[11:38:38] alfiemax: can you gist me your Post Comment and User models ?
[11:38:39] roelof: alfiemax: same error message. Maybe I have to find a better way to validate json request
[11:39:13] alfiemax: roelof, i haven't use json-schema before so can't help you with that
[11:39:27] AimlessRAven: alfiemax: ill made it :)
[11:39:32] roelof: no problem. Thanks for the help so far
[11:39:33] AimlessRAven: @comments.map(&:user).uniq.collect{|x| [x.name, x.id]}
[11:39:46] alfiemax: AimlessRaven, just the model associations and relevant foreign keys
[11:40:12] alfiemax: AimlessRaven, yeah, that would be a way to do it. but i wouldn't do that
[11:40:18] pawnbox: has joined #RubyOnRails
[11:40:35] alfiemax: it uses ruby, map, uniq and collect.... slow....
[11:40:53] hck89: has joined #RubyOnRails
[11:40:54] alfiemax: you need to use the db level join, distinct and select
[11:40:55] h7br1x: Hey guys, I'm having trouble only displaying items that belong to a namespaced model. Here's what I've got so far https://gist.github.com/ktdmedia/0042ab7044c3ad91248520af17ed54ed I want to only display Episodes belonging to the series. But my current code returns an undefined method error.
[11:41:09] frojnd: How can I fix this one? When I run rake test I see this line: ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of database myblog_test I've created myblog_test for user myblog like this: sudo -u postgres createdb -O myblog myblog_test
[11:41:15] MissionCritical: has joined #RubyOnRails
[11:41:48] TvL2386: has joined #RubyOnRails
[11:43:05] alfiemax: h7br1x, what's the specific error?
[11:43:25] alfiemax: i can only guess it has something to do with "@episode.series"
[11:43:36] alfiemax: is it undefined method series for nil class?
[11:44:05] h7br1x: Yes, however every @episode has an associated series_id
[11:46:08] h7br1x: I am using URL slugs with the friendly_id gem.. not sure if that has something to do with it.
[11:46:18] hahuang65: has joined #RubyOnRails
[11:51:06] h7br1x: alfiemax, and ideas?
[11:51:17] tvw: has joined #RubyOnRails
[11:51:42] pyemkey: has joined #RubyOnRails
[11:53:57] frojnd: has joined #RubyOnRails
[11:54:31] pawnbox: has joined #RubyOnRails
[11:54:50] ariejan: has joined #RubyOnRails
[11:56:11] pawnbox: has joined #RubyOnRails
[11:57:06] frojnd: When I run rake test I get: rake aborted! Followed by: ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of database myblog_test Here is whole log https://gist.github.com/anonymous/67214349434891cca887fc7e43c499cf Any ideas how can I fix this? Or what might be the problem?
[11:58:15] Palsson: has joined #RubyOnRails
[11:59:03] jhack: has joined #RubyOnRails
[12:00:16] artto: has joined #RubyOnRails
[12:00:16] dminuoso: frojnd: Which part of that error message did you not understand?
[12:00:28] alfiemax: h7br1x, what is @episode? where does it get the value? should you be including index action to your before_filter ?
[12:00:38] Palsson: has joined #RubyOnRails
[12:00:55] frojnd: dminuoso: must be owner of database myblog_test _WHO_ must be owner of that database?
[12:01:02] dminuoso: frojnd: the database user.
[12:01:38] Akuma: has joined #RubyOnRails
[12:01:38] dminuoso: frojnd: ALTER DATABASE whatever OWNER TO whoever; in your psql will do the trick.
[12:01:45] dminuoso: It evidently is not.
[12:01:56] frojnd: Then I use command line wrong :)
[12:02:20] pawnbox: has joined #RubyOnRails
[12:02:20] fox_mulder_cp: hi. i want replace Get/Post/Patch into line "req = Net::HTTP::("#{method}").new(URI(uri), headers)" by my variable. how i can do that?
[12:02:20] frojnd: I did it like this: sudo -u postgres createdb -O myblog myblog_test
[12:02:21] Pumukel: has joined #RubyOnRails
[12:02:48] dminuoso: frojnd: and what user do you have configured in your database.yml?
[12:03:26] diego1: has joined #RubyOnRails
[12:03:30] frojnd: dminuoso: don't know why but somehow \l does not show any rights for myblog owner.
[12:03:50] benlieb: has joined #RubyOnRails
[12:03:55] frojnd: access privileges, that is
[12:05:28] h7br1x: alfiemax, an episode belongs to a series. Since I'm indexing it I don't want to include the before_filter to my index action.
[12:06:27] alfiemax: ok, i get that. but you are not assigning any episode object to @episode instance variable
[12:06:42] alfiemax: so @episode in your index action is nil
[12:06:43] mdw: has joined #RubyOnRails
[12:06:49] alfiemax: and hence the error
[12:07:08] frojnd: dminuoso: https://gist.github.com/anonymous/00c86f0cbb9abf6ba1d2c27880cb835c this is output.. I guess I must assign access privileges to myblog user for test and development db
[12:07:11] alfiemax: i doubt anyone here can help you further unless you provide more info on what exactly you are trying to achieve
[12:07:18] mdw: has joined #RubyOnRails
[12:08:06] h7br1x: There was a typo, it said @episodes but @episode is the same result. I'm trying to look up an episode based on it's series_id so when I visit xyz.com/:series_id/episodes/ it displays all episodes with that series_id.
[12:09:03] Pupeno: has joined #RubyOnRails
[12:09:19] flashpoint9: has joined #RubyOnRails
[12:10:06] alfiemax: h7br1x, so shouldn't it be :
[12:10:19] alfiemax: Episode.where(series_id: params[:series_id])
[12:11:29] tknz: has joined #RubyOnRails
[12:12:24] h7br1x: alfiemax, aha! so I was over complicating it. That works.
[12:12:34] ldnunes_: has joined #RubyOnRails
[12:13:25] h7br1x: One last thing, since I'm using url slugs in addition to IDs if i do xyz.com/1/episodes it works but xyz.com/news/episodes does not.. any suggestions?
[12:13:47] alfiemax: you mentioned you are using friendly_id right?
[12:14:16] h7br1x: yes sir..or ma'am...
[12:14:28] h7br1x: Yes, sir. lol
[12:14:36] alfiemax: https://github.com/norman/friendly_id#rails-quickstart
[12:14:53] alfiemax: its right there in the docs
[12:15:35] h7br1x: I get the basic use of friendly_id for a model, but still lost on how to work it into that .where condition.
[12:15:41] pawnbox: has joined #RubyOnRails
[12:15:48] deecross: has joined #RubyOnRails
[12:16:08] quazimodo: has joined #RubyOnRails
[12:16:33] alfiemax: you can't directly use it in where, you'll have to find the series and then use the actual id in your where
[12:16:56] fox_mulder_cp: mee... can some helps me with replacing Post method via variable in Net::HTTP::("#{method}").new(URI(uri), headers) ?
[12:17:38] jmignault: has joined #RubyOnRails
[12:19:38] alfiemax: fox_mulder_cp, "Net::HTTP::#{method}".classify.constantize.new(URI(uri), headers)
[12:20:02] jenrzzz: has joined #RubyOnRails
[12:20:02] jenrzzz: has joined #RubyOnRails
[12:24:57] finnnnnnnnnnn: has joined #RubyOnRails
[12:25:32] dblessing: has joined #RubyOnRails
[12:27:17] h7br1x: alfiemax, I see... any suggestions for finding the exact id regardless of the friendly url?
[12:28:36] frojnd: Ok this one one is hard. When I run rake test I see: rake aborted! ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of database myblog_test which is funny since myblog OWNS myblog_test as seen from \l https://gist.github.com/anonymous/00c86f0cbb9abf6ba1d2c27880cb835c Any ideas what I might have missed?
[12:28:52] alfiemax: h7br1x, Series.friendly.find_by(params[:series_id]) || Series.find(params[:series_id])
[12:29:47] roamingdog: has joined #RubyOnRails
[12:29:54] alfiemax: frojnd, drop the database, create new one and make sure this time your user owns it...
[12:31:20] frojnd: alfiemax: I dropped it and I'm gonna repeat it in psql and paste it here as I might be doing it wrong. When you say my user you mean pg user defined in database.yml for test right?
[12:32:11] alfiemax: are you setting this up for a CI server?
[12:32:15] alfiemax: or just locally?
[12:32:41] h7br1x: alfiemax, that threw back: PG::DatatypeMismatch - ERROR: argument of WHERE must be type boolean, not type integer
[12:33:10] h7br1x: https://gist.github.com/ktdmedia/0042ab7044c3ad91248520af17ed54ed
[12:34:06] h7br1x: alfiemax, update..
[12:34:07] pur3eval: has joined #RubyOnRails
[12:34:07] frojnd: alfiemax: https://gist.github.com/anonymous/1007bd01a5507bc8789d6173d4754d72 and I still get: ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of database myblog_test
[12:34:47] alfiemax: h7br1x, see commnet on gist
[12:35:34] h7br1x: alfiemax, same results..
[12:35:50] alfiemax: frojnd, i see, you are the owner, but you don't have any access previlages
[12:36:14] alfiemax: h7br1x, error stack trace please
[12:36:48] alfiemax: frojnd, if you are setting this up locally, just use the `postgres` default user, and use rake db:create
[12:37:02] h7br1x: alfiemax, see gist.
[12:37:04] h7br1x: https://gist.github.com/ktdmedia/0042ab7044c3ad91248520af17ed54ed
[12:37:22] alfiemax: frojnd, btw, why are you creating the db manually? why not use the rake command?
[12:37:28] the_drow: has joined #RubyOnRails
[12:37:50] frojnd: alfiemax: about not any privileges not being listed 14:20 < depesz> it's not listed, because there is no point in listing owners privileges
[12:38:29] frojnd: alfiemax: I don't know because I don't know how to use rake? I just cloned project and then creating user and then databases according to database.yml
[12:38:48] frojnd: alfiemax: I'm using locally
[12:39:02] alfiemax: just like you migrate, rake db:create uses the database.yml and creates the db
[12:39:14] matthewd: frojnd: The obvious answer would seem to be that you're not connecting as the user you think you are
[12:39:28] frojnd: alfiemax: Ok...but do I have to create manaually user?
[12:40:02] alfiemax: yes, but for local purposes i prefer using the default postgres user since it has full access
[12:40:05] matthewd: h7br1x: find_by wants a hash (or an SQL string); params[:series_id] is (hopefully!) not that
[12:40:51] alfiemax: h7br1x, yeah, sorry about that, i forgot to change that, it shoud be find_by(id: params[:series_id])
[12:41:03] alfiemax: thanks matthewd for noting that
[12:41:31] frojnd: alfiemax: I went to psql as postgres like this: sudo -u postgres psql
[12:41:50] frojnd: so I'm using the postgres default user
[12:41:51] max1: has joined #RubyOnRails
[12:42:11] frojnd: I'm gonna drop database once again and run rake db:create with myblog user being already created
[12:42:30] umdstu: has joined #RubyOnRails
[12:42:57] h7br1x: alfiemax & matthewd. A small change to find_by(slug: params[...]) fixed the issue. Everything is working correctly now. Thank you guys!
[12:44:31] alfiemax: h7br1x, that is equivalent to friendly.find()
[12:44:47] JakFrist: has joined #RubyOnRails
[12:45:06] nettoweb: has joined #RubyOnRails
[12:45:26] abhvl: in emacs robe, how to come back to curret line when i went away to functino definition using M - . ??
[12:45:36] h7br1x: alfiemax, duly noted. Thank you, bud!
[12:46:17] alfiemax: abhvl, ctrl + G ??
[12:48:42] Pupeno: has joined #RubyOnRails
[12:48:44] frojnd: alfiemax: https://gist.github.com/anonymous/9673218967d7f1195ee36309ef27d3c8 I run this as worker from linux
[12:49:45] basex_: has joined #RubyOnRails
[12:50:23] frojnd: alfiemax: database.yml https://gist.github.com/anonymous/56294d6d2679ae990c4e808dbefb72fb
[12:51:11] alfiemax: frojnd, you haven't set a user ?
[12:52:27] frojnd: I did with sudo -u postgres createuser myblog -s
[12:52:31] frojnd: but Let me do it again
[12:53:26] alfiemax: i meant in your config
[12:53:41] frojnd: https://gist.github.com/anonymous/a78e346d9813d45c1b8111241019532d
[12:54:06] frojnd: I only set it for production
[12:54:22] alfiemax: i dont see config for development
[12:55:04] l4v2: has joined #RubyOnRails
[12:55:50] frojnd: I've accidently removed it with comments it's the same as tsest only name of databse is: myblog_development
[12:56:05] alfiemax: ok, you need to set the username for it
[12:56:10] alfiemax: and then do rake db:create
[12:56:27] alfiemax: just to be sure that no db exists, do rake db:drop
[12:56:51] frojnd: alfiemax: https://gist.github.com/anonymous/9de3b150535ed33ea39aaa098b1f86c0
[12:57:39] alfiemax: frojnd, set username: myblog in default
[12:57:47] alfiemax: so that its set for all env
[12:58:07] aegis3121: has joined #RubyOnRails
[12:58:20] eljimmy: has joined #RubyOnRails
[13:00:54] ekinmur: has joined #RubyOnRails
[13:00:58] frojnd: alfiemax: I did it. alfiemax FATAL: Peer authentication failed for user "myblog"
[13:01:07] frojnd: after I try to db:drop
[13:01:33] ramortegui: has joined #RubyOnRails
[13:01:51] frojnd: When I try to drop user "myblog" I get: https://gist.github.com/anonymous/04e9e8dbd2df444a91876cc519e39cd5 could not change directory to "/home/worker/coding/rails/myblog": Permission denied
[13:01:53] dminuoso: frojnd: that again is postgresql complaining.
[13:02:13] frojnd: But I'm running this as -u postgres
[13:02:16] alfiemax: awesome, you need to change type of postgresql authentication to md5 ans use password or just set it as trust if you don't care
[13:02:28] alfiemax: you are running what as postgres?
[13:02:36] frojnd: drop user command
[13:02:42] dminuoso: alfiemax: what?
[13:03:02] alfiemax: why are you trying to drop user ?
[13:03:10] hck89: has joined #RubyOnRails
[13:03:16] upsell5: has joined #RubyOnRails
[13:03:29] yellow5: has joined #RubyOnRails
[13:03:32] alfiemax: dminuoso, i mis read the error
[13:03:33] frojnd: I figure since I dropped all the databases I'll also users
[13:03:43] dionysus69: any ideas why this gets submitted as empty all the time? f.file_field :news_images, multiple: true, news_images is a different model but is related to the news model. here I also permit nested params but still gets submitted as an empty array no matter how many images I submit params.require(:news).permit(:news_title, :news_body, news_images: [:image, :news_id])
[13:03:44] frojnd: and then recreate one
[13:04:47] frojnd: when I try to create it: sudo -u postgres createuser myblog -s
[13:05:03] alfiemax: dionysus69, i think the parameter name you should be permitting is mews_images_attributes or something similar
[13:05:29] frojnd: could not change directory to "/home/worker/coding/rails/myblog": Permission denied and then createuser: creation of new role failed: ERROR: role "myblog" already exists
[13:06:09] dionysus69: but there are no errors in console saying that attributes are not permited or something. if I remove news_images: [] array then there appears an error saying :news_images not permitted
[13:06:09] Oliphaunte: has joined #RubyOnRails
[13:06:19] frojnd: But when doing rake db:create I get https://gist.github.com/anonymous/d9586f33e2138136ba455199545f6fa8
[13:07:07] matthewd: dionysus69: Does your form have an enctype set?
[13:08:09] dionysus69: <%= form_for([:admin, admin_news], multipart: true) do |f| %>
[13:08:12] dionysus69: what is enctype?
[13:08:16] orolo: has joined #RubyOnRails
[13:08:57] alfiemax: frojnd, change the authentication method from peer to trust in pg_hba.conf file for postgresql
[13:08:59] matthewd: It's the HTML attribute that multipart should set
[13:09:01] rvanlieshout: dionysus69: see the generated html?
[13:09:39] dionysus69: of the form? yes i see it or what are you asking
[13:09:56] fmcgeough: has joined #RubyOnRails
[13:10:17] dionysus69: the form in generated html says accept-charset="UTF-8"
[13:10:22] dionysus69: I suppose thats fine
[13:10:40] dionysus69: I have been working with single paperclip file uploads and the images were submitted just fine
[13:10:59] jgt2: has joined #RubyOnRails
[13:11:11] dionysus69: but now since I hit nested attributes stuff, these are new waters.
[13:11:41] matthewd: dionysus69: !gist all the things, please
[13:11:41] helpa: dionysus69: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[13:11:43] rvanlieshout: accept-charset != enctype
[13:12:42] dionysus69: enctype="multipart/form-data" this too sorry missed this one
[13:12:51] dionysus69: ok I ll gist stuff thats the only way I suppose
[13:12:56] frojnd: alfiemax: I did and I also restarted postgresql service after it yet I get this: https://gist.github.com/anonymous/a0ac8c1338931ebcc2fc5c2949561ecd this is /etc/postgresql/9.5/main/pg_hba.conf https://gist.github.com/anonymous/89810cf10932632d4cf253e9278f3869
[13:14:15] alfiemax: frojnd, check comment
[13:14:38] hck89: has joined #RubyOnRails
[13:15:31] dionysus69: https://gist.github.com/webzorg/41dec030ee68e43e58036ce006474962
[13:16:01] dionysus69: I really need some hint on this. I dont want to switch to carrierwave just for multi file upload feature, I have this setup on multiple models already
[13:16:37] boogie: has joined #RubyOnRails
[13:16:47] utal: has joined #RubyOnRails
[13:17:05] frojnd: alfiemax: what comment?
[13:17:56] frojnd: awesome :) checking it now
[13:18:35] matthewd: dionysus69: `news_images: [:image, :news_id]` sounds unlike what the form is submitting
[13:19:20] matthewd: dionysus69: What's the generated HTML for the news_images control-group?
[13:19:24] dionysus69: ok I have tried without news_id too
[13:19:42] matthewd: .. and the logs for the post request, I guess
[13:19:47] frojnd: alfiemax: finally thank you so much! you also mentioned about password nad md5 before
[13:19:57] h7br1x: alfiemax, one more thing, when I visit, xyz.com/foo/episodes/1/edit or xyz.com/bar/episodes/1/edit both links let me edit the episode regardless of the :series_id in the url. I would like to restrict episodes to only be edited from the correct series url.. This is probably a routing issue, any ideas?
[13:19:59] dionysus69: <input multiple="multiple" name="news[news_images][]" id="news_news_images" type="file">
[13:20:08] frojnd: alfiemax: currently I don't have any passwords set for any db and I don't think this is a good idea
[13:21:50] dionysus69: matthewd: I added post log to the same gist
[13:22:03] artto: has joined #RubyOnRails
[13:22:34] alfiemax: frojnd, i'd only advice this for local development purposes
[13:22:42] pawnbox: has joined #RubyOnRails
[13:22:56] Or1on: has joined #RubyOnRails
[13:23:18] alfiemax: h7br1x, how are you finding the episode?
[13:23:46] alfiemax: you need to do something like, @series.episodes.find(params[:episode_id])
[13:23:48] chouhoulis: has joined #RubyOnRails
[13:24:46] aegis3121: has joined #RubyOnRails
[13:25:51] matthewd: dionysus69: You're not checking for failure, so you should be using create!
[13:26:50] andywww: has joined #RubyOnRails
[13:28:09] dionysus69: hmm ok will try
[13:28:31] dionysus69: but I do have if @admin_news.save
[13:28:31] dionysus69: if params[:news_images]
[13:28:31] dionysus69: params[:news_images].each do |n_img|
[13:28:31] dionysus69: @admin_news.news_images.create(image: n_img)
[13:28:38] rafaelfranca: has joined #RubyOnRails
[13:28:38] rafaelfranca: has joined #RubyOnRails
[13:29:09] matthewd: Right; you're checking for failure there, but not on the news_images.create
[13:30:22] h7br1x: alfiemax, gotcha, I'll give that a try. Thanks!
[13:30:34] dionysus69: but params shouldn't empty nevertheless ? I just checked and still returns empty
[13:31:10] blackmesa: has joined #RubyOnRails
[13:31:26] asheinfeld: has joined #RubyOnRails
[13:31:34] matthewd: Which are you looking at? The debug is using the filtered parameter, but the loop is pulling straight from params
[13:31:36] frojnd: Why are my tests failing? https://gist.github.com/anonymous/bc7f08ee4e144e4f0138cdbc46dc0011 I can access root_path or about_path with link_to but with tests it's failing ActionController::UrlGenerationError: ActionController::UrlGenerationError: No route matches {:action=>"/", :controller=>"static_pages"}
[13:31:48] roamingdog: has joined #RubyOnRails
[13:31:52] AimlessRaven_: has joined #RubyOnRails
[13:32:14] dionysus69: ye both cases are empty
[13:32:33] AimlessRaven_: someone knows why when i use middleman build .. the paths of my css, js, img is wrong and need to update manualy
[13:33:18] dionysus69: are these equivalent? params.require(:news).permit(:news_title, :news_body, news_images:[:news_images]) &&& and this <input multiple="multiple" name="news[news_images][]" id="news_news_images" type="file">
[13:33:56] dionysus69: if I put empty array like this news_images:[] then I get not permitted param error
[13:34:06] matthewd: But it doesn't matter, because you're not reading from the permitted one
[13:34:15] dionysus69: NewsImage(#70067831341140) expected, got String(#18186340)
[13:34:31] GodFather: has joined #RubyOnRails
[13:34:41] matthewd: > I get not permitted param error
[13:34:50] matthewd: > [error that has nothing to do with permitted parameters]
[13:35:38] dionysus69: I was getting that error too actually, when param names don't coincide
[13:36:00] dionysus69: anyways this case news_images:[] gives an error I posted
[13:36:50] Pupeno: has joined #RubyOnRails
[13:36:50] Pupeno: has joined #RubyOnRails
[13:36:53] GodFather: has joined #RubyOnRails
[13:37:42] chrisarcand: dionysus69: So what exactly did you put to give you such an error? Seems like your syntax is just wrong.
[13:37:56] null__: when deploying multiple rails apps on a server, should I create a unique user account for each app?
[13:38:25] ekinmur: has joined #RubyOnRails
[13:38:35] dionysus69: chrisarcand: params.require(:news).permit(:news_title, :news_body, news_images:[]) gives NewsImage(#70067831341140) expected, got String(#18186340)
[13:40:23] Ergo: has joined #RubyOnRails
[13:40:37] hck89: has joined #RubyOnRails
[13:40:54] shinnya: has joined #RubyOnRails
[13:41:03] dionysus69: Unpermitted parameter: news_images in case of this params.require(:news).permit(:news_title, :news_body, :news_images)
[13:46:07] allcentury: has joined #RubyOnRails
[13:48:08] JamieD: has joined #RubyOnRails
[13:48:34] blackmesa: has joined #RubyOnRails
[13:49:09] michaelh: has joined #RubyOnRails
[13:52:20] allcentury: has joined #RubyOnRails
[13:53:37] pawnbox: has joined #RubyOnRails
[13:54:56] macsteps: has joined #RubyOnRails
[13:55:07] JakFrist: has joined #RubyOnRails
[13:55:41] chrisarcand: dionysus69: Your error is unrelated to strong parameters, that's correct.
[13:56:29] pawnbox: has joined #RubyOnRails
[13:59:16] dionysus69: then what is it to?
[13:59:40] sled: has joined #RubyOnRails
[14:00:26] braincrash: has joined #RubyOnRails
[14:00:42] dionysus69: heres the post request https://gist.github.com/webzorg/4a88f76b9862b73766b7a82866aed11c you can see unpermitted param errors
[14:02:21] Ayey_: has joined #RubyOnRails
[14:04:17] agit0: has joined #RubyOnRails
[14:08:24] mrbubbles: has joined #RubyOnRails
[14:10:39] mrbubbles: hey folks, what's the best way to deploy rails apps these days? at the moment I am starting with an empty vps, then manually setting up deploy user, postgres, installing rails, disabling root account, configuring iptables, setting up nginx, etc but all manually. I know that capistrano can help with the deployment bit of the process but is there something that can help do this repetitive tasks? other than just
[14:10:39] mrbubbles: a bash script ;)
[14:11:09] mrbubbles: I read about chef but I wasn't sure if it's worth learning that with things like docker around now
[14:13:33] Oliphaunte: has joined #RubyOnRails
[14:13:44] sypheren: has joined #RubyOnRails
[14:13:56] braincrash: has joined #RubyOnRails
[14:15:55] raldu: mrbubbles: isn't paas services like heroku are exactly about solving this problem?
[14:15:57] DoubleMalt: has joined #RubyOnRails
[14:16:06] mrbubbles: Yes but they get expensive
[14:16:22] raldu: you can automate the whole process with a bash script.
[14:17:04] raldu: ... or docker?
[14:18:58] jahbrewski: has joined #RubyOnRails
[14:20:46] rubyonrailed: has joined #RubyOnRails
[14:21:43] JakFrist: has joined #RubyOnRails
[14:22:47] pur3eval: has joined #RubyOnRails
[14:24:33] boogie: Hi guys anyone have time to help out a beginner who got an error messege?
[14:25:49] jhack: has joined #RubyOnRails
[14:26:23] jhass: boogie: just ask
[14:28:16] boogie: has joined #RubyOnRails
[14:28:26] jhass: boogie: !rule12
[14:28:26] helpa: boogie: Do not PM members of the channel without first asking if that is OK.
[14:28:29] jhass: boogie: !gist
[14:28:29] helpa: boogie: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[14:28:57] boogie: sorry for that
[14:35:35] max1: has joined #RubyOnRails
[14:36:31] kies: has joined #RubyOnRails
[14:37:08] diegoviola: has joined #RubyOnRails
[14:38:03] fermonkus: has joined #RubyOnRails
[14:39:06] digitalfiz: has joined #RubyOnRails
[14:42:53] dminuoso: has joined #RubyOnRails
[14:47:21] akira616: has joined #RubyOnRails
[14:49:33] dionysus69: here there are no :news_images yet since I am just creating a record. so <%= f.fields_for :news_images do |image| %> doesn
[14:50:57] tbuehlmann: dionysus69: you would build news_images first
[14:51:06] n90b0jjf: has joined #RubyOnRails
[14:51:28] dionysus69: but it should be empty at first build how?
[14:51:57] dionysus69: this is create action, this is where I am planning on building
[14:52:09] jhack: has joined #RubyOnRails
[14:52:13] tbuehlmann: I assume you have a parent object, is that right?
[14:52:33] dionysus69: but both parent object and related object are going to be created in this form
[14:52:41] tbuehlmann: `3.times { parent_object.news_images.build }` in your controller then
[14:52:56] tbuehlmann: (in the new action, not create)
[14:53:07] dionysus69: ok let me try :) thanks
[14:53:11] jhass: boogie: so, going to post your error in a gist, publicly? ;)
[14:54:22] mostlybadfly: has joined #RubyOnRails
[14:54:50] ekinmur: has joined #RubyOnRails
[14:55:30] GorillaApe: Hello I am having trouble with before_type_cast.
[14:55:47] prithaj: has joined #RubyOnRails
[14:55:56] GorillaApe: In case field is invalid it is converted to nil automatically
[14:56:26] GorillaApe: So in case someone inputs invalid input record is going to be the same no validation occurs
[14:56:40] tyul: has joined #RubyOnRails
[14:56:48] GorillaApe: even if I force it it is going to run but before_type_cast would be nil too
[14:57:00] GorillaApe: validates_associated forces it
[14:58:05] tyul: Using npm it is possible to define alias to run commands like "npm start", "npm test", "npm run_custom_script", etc... is there a way to do something like that with rails? something like "rails mytask"
[14:58:42] matthewd: tyul: Define a rake task
[14:59:58] tyul: matthewd: hmm, I am going to google that, thanks
[15:00:24] jhass: mmh, there is a way to hook into rails's thor app too, no?
[15:01:10] Malgorath: has joined #RubyOnRails
[15:01:10] matthewd: jhass: As of 5.0, 'rails foo' will delegate to rake for unknown commands
[15:01:31] jhass: ugh, I had hoped they had a cleaner solution than that
[15:01:50] matthewd: (and if you're not on 5.0, by far the sanest option would be to just use rake directly)
[15:02:00] matthewd: Yeah, we're not there yet, but that's the goal
[15:02:10] matthewd: Want proper command line argument processing
[15:02:35] jhass: so I guess the engine integration is only for generators
[15:02:37] matthewd: We had to do the rake fallback anyway for compatibility, so that came first, and is all that's finalized for now
[15:02:44] polishdub: has joined #RubyOnRails
[15:03:04] Ayey_: has joined #RubyOnRails
[15:03:06] matthewd: Yeah, that sounds believable
[15:04:26] mrbubbles: anyone deploying rails apps in production using docker?
[15:05:02] camonz: has joined #RubyOnRails
[15:05:18] jhass: mrbubbles: OpenShift 3 does it
[15:05:51] mrbubbles: Cool was just wondering what the workflow is up to the point where you deploy
[15:06:19] mrbubbles: They'll obviously just mirror a base image but I was wondering whether the average developer uses something like Ansible to provision the server
[15:06:23] camonz: I'm having an issue trying to instantiate a model with geo data from PostGIS on Heroku. When selecting any of the fields with geo data or all the fields of the instance I get an (Object doesn't support #inspect) error
[15:06:30] camonz: any clues?
[15:06:56] aegis3121: has joined #RubyOnRails
[15:07:00] greenhat|: tyul: Another option is to create simple bash scripts in the projects bin/ directory.
[15:07:41] camonz: here's a gist with the heroku console output https://gist.github.com/CamonZ/ea34ec1609e2b997608b7f252673986b
[15:07:55] camonz: running the same on dev works fine
[15:08:02] kriptonium: has joined #RubyOnRails
[15:08:37] triptec_: has joined #RubyOnRails
[15:09:00] mdw: has joined #RubyOnRails
[15:10:28] one_zero: has joined #RubyOnRails
[15:13:52] reckoner: has joined #RubyOnRails
[15:14:41] pawnbox: has joined #RubyOnRails
[15:14:41] kriptonium: Hi everyone!
[15:15:03] kriptonium: I'm very interested with RoR
[15:15:25] SteenJobs: has joined #RubyOnRails
[15:15:28] kriptonium: should I learn ruby first or jump straight to RoR?
[15:16:32] SteenJobs: hey all - if anyone has ever added a wordpress app as a subdir to their rails app, did you then build the wordpress app directly on your prod server or did you do it on a staging server first and then migrate?
[15:17:31] havenwood: kriptonium: Learn Ruby!
[15:18:26] ekinmur: has joined #RubyOnRails
[15:21:42] mrbubbles: ^^ yep learn ruby
[15:24:59] SteenJobs: has joined #RubyOnRails
[15:25:53] allcentury: has joined #RubyOnRails
[15:26:33] roelof: has joined #RubyOnRails
[15:28:20] Devalo: has joined #RubyOnRails
[15:28:40] roelof: how can I validate that a json value is not allowed to be a hash or a array. I thought a json-scheme of "name" => {"type" => "string"} would do the job but that one accepts {test} which schould not be validated
[15:29:42] bga57: has joined #RubyOnRails
[15:32:52] camonz: kriptonium: learn ruby through Rails
[15:33:06] dblessing: has joined #RubyOnRails
[15:33:33] camonz: roelof: show us the schema def
[15:35:08] camonz: SteenJobs: why would you want to do that?
[15:35:25] SteenJobs: CamonZ: which part is “that” referring to?
[15:35:43] camonz: wordpress alongside rails
[15:35:51] camonz: but fair enough, I'd do it straight in production
[15:35:53] camonz: it's 2 different apps
[15:35:59] roelof: CamonZ : here you have the whole validate_account_service : https://gist.github.com/rwobben/6f40490def79a8764f8b3bf912b468d1
[15:36:07] Sylario: I am looking for example/tutorial on how to consume a paginated API
[15:36:12] camonz: proxy through them with nginx or apache
[15:36:30] dionysus69: has joined #RubyOnRails
[15:37:17] watersoul: has joined #RubyOnRails
[15:37:28] roelof_: has joined #RubyOnRails
[15:37:28] SteenJobs: yea, have it set up on staging (did it there first since i was messing with my nginx config), but now that i got it working, i’m setting it up on prod and wondering if it’s safe to allow the designer to just builld it straight on production
[15:37:41] fox_mulder_cp: how i can drop model A association with model B without dropping model B from database? update(b: nil) fails 'foreign key exists in table b', b = nil; save fails too
[15:37:57] SteenJobs: CamonZ: the reason for having it alongside is the designer doesn’t know the first thing about development, front or backend, but wants to add a blog to our site and control how it looks, the content, etc.
[15:38:11] reckoner: has left #RubyOnRails: ()
[15:38:36] camonz: roelof: validate!( schema, strict: true)
[15:38:39] Sylario: It look like i will have to query the API twice as soon as i will use pagination
[15:38:41] camonz: have you tried that?
[15:38:59] fox_mulder_cp: SteenJobs: hm. how i think, can we mount php-based application as ruby gem?
[15:39:03] finnnnnnnnnnn_: has joined #RubyOnRails
[15:39:25] Sylario: All i kind find is how to make a paginated API, nothing on how to consume/it
[15:39:25] fox_mulder_cp: SteenJobs: hey all - if anyone has ever added a wordpress app as a subdir to their rails app
[15:39:33] SteenJobs: the wordpress app is already up and running as a subdirectory. that’s all done.
[15:39:54] fox_mulder_cp: SteenJobs: and how u maunt it? on another server redirect?
[15:39:55] camonz: SteenJobs: Then I'd have a staging env as well
[15:40:15] camonz: in case the designer breaks something up
[15:40:22] SteenJobs: fox_mulder_cp: now the designer is gonna build it, the frontend, and add content. wanted to know if it was unsafe to do it directly on prod
[15:40:30] SteenJobs: CamonZ: right that’s what i was thinnking, buttttt
[15:40:34] camonz: should be straightforward with capistrano
[15:40:38] camonz: different stages
[15:40:44] SteenJobs: what could he possibly break? he doesn’t have access to anything codelevel
[15:40:49] SteenJobs: yea so cap is set up for staging/prod
[15:40:56] SteenJobs: but the wordpress contents aren’t associated with git
[15:41:06] roelof_: CamonZ: I see then this : <ActionController::Parameters {"name"=>"{test}", "category"=>"Bezittingen langer dan 1 jaar"} permitted: true>
[15:41:17] SteenJobs: *wordpress app isn’t a git repo
[15:41:21] roelof_: which looks to me it validated
[15:42:19] watersoul_: has joined #RubyOnRails
[15:42:26] camonz: roelof_: shouldn't params[:name] be run through JSON.parse first?
[15:42:40] artto: has joined #RubyOnRails
[15:42:59] camonz: that is, not by you but by the controller
[15:43:21] camonz: it should happen automatically, unless you're sending on the JSON: {"name": "{test}"}
[15:43:26] camonz: then that's a valid string
[15:44:20] camonz: SteenJobs: how's he changing the styles. straight into the wordpress app?
[15:44:36] SteenJobs: yea i presume so, through the wp admin panel
[15:44:55] SteenJobs: but the wp blog app has nothing to do with the rails app
[15:45:10] SteenJobs: so assuming he doesn’t touch the nginx.conf, which he wouldn’t even know how to anyway, it shouldn’t matter
[15:45:32] camonz: unless he has ssh access to the server
[15:45:42] camonz: or worst-case scenario the wordpress gets hacked
[15:46:41] pur3eval: has joined #RubyOnRails
[15:46:42] camonz: imo, I'd run a locomotive instance instead of wordpress but it's not as cost-effective as simply doing a wordpress install
[15:48:56] camonz: roelof: if one of the fields on the JSON received has invalid chars then you need to clean it up
[15:50:00] Macaveli: has joined #RubyOnRails
[15:51:52] Sylario: I am looking for documentation on how to consume a json API with header/link pagination
[15:52:19] Sylario: I can read the data but it seems very convoluted as soon as you start to browse previous pages
[15:53:57] Sylario: because if i am at page 7, and want to read page 8, the link of the API is useless, i should learn to build the link to page 8 because if i do not, i have to query the api 8 time to browse the results
[15:54:03] Sylario: seems pretty uselesss
[15:54:27] SteenJobs: has joined #RubyOnRails
[15:55:08] Ergo: has joined #RubyOnRails
[15:55:11] Sylario: I get that everybody is about bulding API, but,there must be some use case where people use them right?
[15:56:31] crdpink: has joined #RubyOnRails
[15:59:36] Sylario: At least, does anybody has any hint on how to search google for reading/using API and not bulding them ?
[16:01:11] finnnnnnnnnnn: I’m struggling with date formatting. How can I convert the string "2015-09-29T00:00:00+00:00" to the string “29 September 2015”
[16:01:56] roelof_: CamonZ: postman sends this as request : curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'account[category]=Bezittingen langer dan 1 jaar&account[name]={test}' "
[16:02:19] roelof_: there it looks if test is not a string or am I mistaken ?
[16:02:37] camonz: roelof: it is a string, "{test}"
[16:03:17] camonz: look at the difference with 'account[category]=Bezittingen langer dan 1 jaar'
[16:03:52] roelof_: oke, then postman is too blame here, I hit the books to look if I can tell postman to not convert things to a string
[16:04:03] camonz: postman = https://www.getpostman.com/?
[16:04:05] Ayey_: has joined #RubyOnRails
[16:04:20] roelof_: CamonZ: yep, that one
[16:05:22] camonz: ok, it's interesting that it's sending the {} as well
[16:05:36] finnnnnnnnnnn: (the answer to my above question)
[16:06:10] roelof_: CamonZ: that is not wierd, Im entering {test} to test the validation
[16:06:40] camonz: ahh, I thought you were sending test and receiving {test}
[16:06:41] roelof_: Do you know how I can send the curl command with the test as hash and the second one as string
[16:08:32] calmchaos: has joined #RubyOnRails
[16:10:02] roelof_: CamonZ: no, im sending {test} and recieving "{test}"
[16:10:31] Peteykun: has joined #RubyOnRails
[16:10:52] meoblast001: has joined #RubyOnRails
[16:11:21] jgt2: has joined #RubyOnRails
[16:11:39] tvw: has joined #RubyOnRails
[16:13:45] FastJack: has joined #RubyOnRails
[16:14:52] AndrewIsHere: has joined #RubyOnRails
[16:15:15] chouhoulis: has joined #RubyOnRails
[16:17:41] [Butch]: has joined #RubyOnRails
[16:18:35] basex__: has joined #RubyOnRails
[16:19:28] khelair: I was working on a tutorial project, and all of a sudden rails (4.x) started hanging when I tried to generate controllers on anything. The error that it's giving me when I ^C out of it is /var/lib/gems/2.0.0/gems/spring-1.7.2/lib/spring/client/run.rb:117:in `gets': Interrupt
[16:19:45] khelair: this is after trying to run rails generate controller demo index, for instance
[16:20:21] khelair: anybody have any suggestions on what might be happening here?
[16:20:28] nettoweb: has joined #RubyOnRails
[16:20:38] khelair: it's literally the first thing I've encountered after setting up the database and the like. :P
[16:21:57] artto: has joined #RubyOnRails
[16:22:15] calmchaos: has joined #RubyOnRails
[16:23:08] jenrzzz: has joined #RubyOnRails
[16:23:31] Hyuk: has joined #RubyOnRails
[16:27:37] agent_white: has joined #RubyOnRails
[16:27:40] jgt2: has joined #RubyOnRails
[16:27:43] Pazician: has joined #RubyOnRails
[16:27:43] Pazician: has joined #RubyOnRails
[16:29:12] whathappens: has joined #RubyOnRails
[16:31:44] wldcordeiro: has joined #RubyOnRails
[16:34:37] AnoHito: has joined #RubyOnRails
[16:35:05] eljimmy: has joined #RubyOnRails
[16:35:28] milesmatthias: has joined #RubyOnRails
[16:43:07] fermonkus: has joined #RubyOnRails
[16:43:20] fermonku1: has joined #RubyOnRails
[16:44:06] khelair: okay so actually it looks like I'm able to do 'rails generate controller xxx yyy' successfully in a different project but not the one I just created; does routes.rb or something have to be set up first?
[16:47:20] manfrin_: has joined #RubyOnRails
[16:47:25] flashpoint9: has joined #RubyOnRails
[16:48:11] khelair: could my commenting out of the default gems have something to do with the havoc I have created here, perhaps?
[16:48:45] milesmatthias: has joined #RubyOnRails
[16:49:07] jhass: khelair: try bin/spring stop; killall ruby
[16:49:20] ybart: has joined #RubyOnRails
[16:49:40] ybart: has left #RubyOnRails: ()
[16:51:18] whathappens: has joined #RubyOnRails
[16:52:17] SteenJobs: has joined #RubyOnRails
[16:53:39] AndrewIsHere: has joined #RubyOnRails
[16:54:57] artto: has joined #RubyOnRails
[16:55:08] morfin: has joined #RubyOnRails
[16:56:05] khelair: trying that now, jhass; thank you
[16:57:02] khelair: it worked. may the universe shower you with wonderful things. thank you!
[16:57:09] arBmind: has joined #RubyOnRails
[16:59:27] sneakers: has joined #RubyOnRails
[16:59:34] nettoweb: has joined #RubyOnRails
[17:03:11] tvw: has joined #RubyOnRails
[17:04:08] arBmind: has joined #RubyOnRails
[17:04:52] Ayey_: has joined #RubyOnRails
[17:08:08] whathappens: has joined #RubyOnRails
[17:13:46] Oliphaunte: has joined #RubyOnRails
[17:14:49] macsteps: has joined #RubyOnRails
[17:20:59] arooni-mobile: has joined #RubyOnRails
[17:22:38] cschneid_: has joined #RubyOnRails
[17:26:26] Pupeno: has joined #RubyOnRails
[17:31:24] adlerdias: has joined #RubyOnRails
[17:34:03] Devalo: has joined #RubyOnRails
[17:35:30] pur3eval: has joined #RubyOnRails
[17:36:13] evansbee: has joined #RubyOnRails
[17:38:05] cnk: has joined #RubyOnRails
[17:38:10] beingjohnm: I'm trying to deploy to EB and have an error I just cannot figure out. When the deploy process runs "bundle install" I get the following error: "Your Ruby version is 2.2.5, but your Gemfile specified 2.2.3". For the life of me I cannot find where it is getting ruby version 2.2.5. This gist has my Gemfile and some of the other data and things I've tried: https://gist.github.com/willjohnson/a2a7a6b7845fcc00602c295228014e1f
[17:39:03] beingjohnm: is it possible that a gem might specify a specific version of ruby that bunle is picking up on?
[17:40:39] jhass: beingjohnm: run rbenv rehash a dozen or so times
[17:41:01] arooni-mobile: has joined #RubyOnRails
[17:41:36] Detch: has joined #RubyOnRails
[17:42:57] zacts: has joined #RubyOnRails
[17:43:51] beingjohnm: jhass: same error. gist updated to include output of gem environment. https://gist.github.com/willjohnson/a2a7a6b7845fcc00602c295228014e1f
[17:44:32] deecross: has joined #RubyOnRails
[17:44:42] arooni-mobile: has joined #RubyOnRails
[17:45:24] jhass: bundle exec ruby -v ?
[17:45:41] beingjohnm: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[17:45:47] jowiar: has joined #RubyOnRails
[17:46:01] jhass: should work
[17:46:05] jhass: ACTION blames rbenv
[17:46:07] beingjohnm: rbenv doesn't seem to offer 2.2.5 so not sure where it is coming from and would update just to move past this
[17:46:28] milesmatthias: has joined #RubyOnRails
[17:46:39] SteenJobs: has joined #RubyOnRails
[17:46:48] havenwood: beingjohnm: Update ruby-build for the new definitions or you could install for rbenv with ruby-install, which can update definitions without updating the tool.
[17:46:49] roamingdog: has joined #RubyOnRails
[17:47:17] jhass: actually what's the exact command throwing the error?
[17:47:26] havenwood: beingjohnm: ruby-install --latest --install-dir ~/.rbenv/versions/2.2.5 ruby-2.2.5
[17:47:33] jhass: given bundle exec didn't
[17:48:05] beingjohnm: jhass: when eb runs "bundle install" the error shows up
[17:48:19] havenwood: beingjohnm: Sanity check `command -v bundle` and `gem which bundler` just to be sure?
[17:48:20] blackmesa: has joined #RubyOnRails
[17:48:20] jhass: never heard of eb
[17:48:33] rails: has joined #RubyOnRails
[17:48:35] jhass: what's that?
[17:48:42] rails: Hello guys
[17:48:55] Coldblackice: has joined #RubyOnRails
[17:49:20] rails: Can you provide me a guide on how to upgrade gems to be compatible with rails 5
[17:49:28] beingjohnm: havenwood: /home/xxx/.rbenv/shims/bundle and /home/xxx/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler.rb
[17:49:38] beingjohnm: jhass: elastic beanstalk
[17:49:45] rails: I want to contribute on some of the gems out there
[17:50:09] akira616: has joined #RubyOnRails
[17:50:39] rails: hello @havenwood
[17:51:19] jhass: are you sure when it does that the environment is comparable at all?
[17:52:07] markin: has joined #RubyOnRails
[17:52:33] rails: can you provide me a guide?
[17:52:48] markin: I'm trying to do a find_in_batches with a join and a select and it doesn't seem to respect the select clause :/
[17:53:34] matthewd: Rails: I'm not sure what you're asking for. To upgrade gems to work with Rails 5, you need to work out what's incompatible, and then fix it.
[17:54:15] rails: @matthewd how can I know if a rails 4 gems is compatible with rails 5?
[17:54:19] beingjohnm: jhass: I thought it is supposed to operate the same as heroku in that is uses your gemfile to build the environment but I'll have to do more reading to confirm that.
[17:54:26] jhass: Rails: you try to use it in a rails 5 app
[17:54:29] matthewd: Rails: Try it, I guess.
[17:54:34] sebstrax: has joined #RubyOnRails
[17:54:43] arooni-mobile: has joined #RubyOnRails
[17:54:51] jhass: beingjohnm: so you local environment is actually completely irrelevant?
[17:55:03] rails: Try then if something fails I will send a PR to the github repo?
[17:55:09] AndrewIsHere: has joined #RubyOnRails
[17:55:22] JakFrist: has joined #RubyOnRails
[17:55:52] matthewd: markin: Sounds like it's expected to work: https://github.com/rails/rails/blob/ac027338e4a165273607dccee49a3d38bc836794/activerecord/lib/active_record/relation/batches.rb#L212
[17:56:00] rails: Oh I see. Ok thanks guys I will gonna find some gems so I can contribute on it
[17:56:09] jhass: Rails: some projects might have Gemfile you can upgrade to rails 5 and then a testsuite you can run
[17:56:10] Fernando-Basso: I have an app deployed on heroku. When in production, it gives an 500 error saying "my_method" is not defined. That does not happen in production. This method was created in the controller by me, so, it is not provided by rails itself or a gem. Any hints to deal with a problem like this?
[17:56:14] matthewd: markin: Does the same query without batching respect your custom select?
[17:56:19] beingjohnm: jhass: if it is trying to replicate my local environment then it wouldn't be irrelevant. Since I don't have 2.2.5 anywhere that I can tell that is why I asked if gems might specify a version of ruby that bundler was picking up on.
[17:56:29] Fernando-Basso: I mean, that does not happen "development" env.
[17:56:37] jhass: beingjohnm: no
[17:56:39] rails: Ok got it @jhass. Thanks
[17:57:01] jhass: beingjohnm: only a requirement that fails everything if it's not met, but no auto switch magic
[17:57:39] matthewd: Fernando-Basso: Try running your application locally in production mode
[17:58:04] Fernando-Basso: I will. Thanks.
[17:59:15] beingjohnm: jhass: okay. thanks.
[18:03:39] Pupeno: has joined #RubyOnRails
[18:04:44] arooni-mobile: has joined #RubyOnRails
[18:05:40] Ayey_: has joined #RubyOnRails
[18:08:39] markin: matthewd: it does not
[18:09:00] triptec: has joined #RubyOnRails
[18:09:18] manfrin_: has joined #RubyOnRails
[18:10:55] Fernando-Basso: matthewd: Running in production but locally presents no single problem.
[18:11:09] arooni-mobile: has joined #RubyOnRails
[18:12:52] matthewd: markin: Okay, so that simplifies the reproduction a bit. You said you're using #joins... you're not using #includes / #eager_load at all?
[18:13:10] beingjohnm: havenwood: updated ruby-build and installed 2.2.5. Not sure what the issue was there but past it now. Thanks.
[18:14:10] matthewd: Fernando-Basso: That eliminates a configuration issue.. my default assumption would now be that [the version of] the code running on Heroku doesn't match what you have locally
[18:14:11] markin: matthewd: you got me doing an eager_load
[18:14:45] arooni-mobile: has joined #RubyOnRails
[18:14:53] matthewd: Ah, that'll do it. eager_load has to combine columns from multiple classes and then separate them again to rebuild the object structure, so it's incompatible with custom select
[18:15:16] markin: ah cool then I'll figure that out
[18:17:27] Fernando-Basso: matthewd: I added a feature, tested (manually since this is an app that I inherited and has no single test written), everything workd for this feature, then I commited the changes and pushed to heroku. I don't see how verions of code could differ (I'm not saying it cannot, just saying I don't understand how it could be).
[18:20:12] Fernando-Basso: Searches on the web show this problem when it is a method from a gem or rails itself.
[18:21:52] agit0: has joined #RubyOnRails
[18:23:30] dc4: has joined #RubyOnRails
[18:24:46] arooni-mobile: has joined #RubyOnRails
[18:25:44] yfeldblum: has joined #RubyOnRails
[18:26:07] macsteps: has joined #RubyOnRails
[18:27:26] pur3eval: has joined #RubyOnRails
[18:30:21] M-shine: has joined #RubyOnRails
[18:34:17] arooni-mobile: has joined #RubyOnRails
[18:35:54] moei: has joined #RubyOnRails
[18:37:25] zave: has joined #RubyOnRails
[18:38:37] jstransky: has joined #RubyOnRails
[18:39:41] Guest_94857: has joined #RubyOnRails
[18:39:43] Velizar: has joined #RubyOnRails
[18:42:02] calmchaos: has joined #RubyOnRails
[18:43:45] flashpoint9: has joined #RubyOnRails
[18:44:18] arooni-mobile: has joined #RubyOnRails
[18:45:07] Guest_94857: Allah is doing
[18:45:14] Guest_94857: Sun is not doing Allah is doing
[18:45:23] Guest_94857: moon is not doing Allah is doing
[18:45:26] soule: has joined #RubyOnRails
[18:45:31] Guest_94857: stars are not doing Allah is doing
[18:45:43] Guest_94857: planets are not doing Allah is doing
[18:45:54] Guest_94857: galaxies are not doing Allah is doing
[18:46:01] Guest_94857: oceans are not doing Allah is doing
[18:46:09] Guest_94857: mountains are not doing Allah is doing
[18:46:18] Guest_94857: trees are not doing Allah is doing
[18:46:28] dopamean_: has joined #RubyOnRails
[18:46:38] macsteps: has joined #RubyOnRails
[18:46:58] Guest_94857: mom is not doing Allah is doing
[18:47:00] SteenJobs: has joined #RubyOnRails
[18:47:08] Guest_94857: dad is not doing Allah is doing
[18:47:16] Guest_94857: boss is not doing Allah is doing
[18:47:23] Guest_94857: job is not doing Allah is doing
[18:47:30] Guest_94857: dollar is not doing Allah is doing
[18:47:37] Guest_94857: degree is not doing Allah is doing
[18:47:47] Guest_94857: medicine is not doing Allah is doing
[18:47:59] Guest_94857: customers are not doing Allah is doing
[18:52:45] Dimik: has joined #RubyOnRails
[18:54:19] arooni-mobile: has joined #RubyOnRails
[18:55:25] zacts: has joined #RubyOnRails
[18:59:24] banisterfiend: has joined #RubyOnRails
[18:59:48] ChanServ: +o havenwood
[19:02:06] Guest_94857: has left #RubyOnRails: ()
[19:04:20] arooni-mobile: has joined #RubyOnRails
[19:05:39] calmchaos: has joined #RubyOnRails
[19:06:24] Ayey_: has joined #RubyOnRails
[19:06:58] calmchaos: has joined #RubyOnRails
[19:08:30] mdw: has joined #RubyOnRails
[19:09:53] jowiar: has joined #RubyOnRails
[19:10:43] triptec: has joined #RubyOnRails
[19:14:21] arooni-mobile: has joined #RubyOnRails
[19:14:26] smathy: has joined #RubyOnRails
[19:14:39] blackmesa: has joined #RubyOnRails
[19:15:18] smathy: has left #RubyOnRails: ()
[19:15:33] macsteps: has joined #RubyOnRails
[19:15:58] ChanServ: -o havenwood
[19:16:23] finnnnnnnnnnn: has joined #RubyOnRails
[19:17:11] creature: has joined #RubyOnRails
[19:17:11] creature: has joined #RubyOnRails
[19:17:35] shinnya: has joined #RubyOnRails
[19:17:49] dionysus70: has joined #RubyOnRails
[19:17:53] finnnnnnnnnnn: I’m doing something stupid. in my rails console if I create a model using Portfolio.create(total: '123') it creates a model but then if I do Portfolio.last.total I get nil
[19:18:14] disgrntld: has joined #RubyOnRails
[19:19:32] finnnnnnnnnnn: ahh, forgot permitted params
[19:20:02] jowiar: has joined #RubyOnRails
[19:22:41] finnnnnnnnnnn: nope, that’s not it. I’m not using a controller
[19:24:17] srinidhi: has joined #RubyOnRails
[19:24:22] arooni-mobile: has joined #RubyOnRails
[19:26:09] pawnbox: has joined #RubyOnRails
[19:27:39] Synthead: is there a way to pass an explicit null value via URI params?
[19:27:49] Olipro: has joined #RubyOnRails
[19:28:37] fermonkus: has joined #RubyOnRails
[19:30:26] fox_mulder_cp: finnnnnnnnnnn: last - created_at
[19:30:48] fox_mulder_cp: if u use uuid as id - this fails
[19:31:00] finnnnnnnnnnn: fox_mulder_cp: sorry, I figured it out. I had added attr_accessors that were fucking up my save
[19:31:43] finnnnnnnnnnn: didn’t realise they’d override the setter and getter methods that Rails automatically generates 
[19:31:56] finnnnnnnnnnn: learn somethign new...
[19:32:03] fox_mulder_cp: so, anybody can help me with clearing foreign key for modelA in modelB, when i try to clean ModelA.modelB = nil
[19:32:08] atrius: has joined #RubyOnRails
[19:32:38] fox_mulder_cp: my app block destroy modelA because modelB.modelA_id - not nil
[19:33:08] fox_mulder_cp: without destroying modelB
[19:34:23] arooni-mobile: has joined #RubyOnRails
[19:35:33] JoshGlzBrk: has joined #RubyOnRails
[19:35:57] akira616: has joined #RubyOnRails
[19:38:49] GodFather: has joined #RubyOnRails
[19:38:54] pur3eval: has joined #RubyOnRails
[19:39:45] roamingdog: got a json building question, what structure do i need to filter multiple boolean terms: https://gist.github.com/chrislerum/f8569dd37d1a279ee88383343e9cfc85
[19:39:52] acovrig: has joined #RubyOnRails
[19:41:56] solars: has joined #RubyOnRails
[19:43:55] arooni-mobile: has joined #RubyOnRails
[19:44:24] kitsuneyo: has joined #RubyOnRails
[19:49:08] acovrig: does anyone know of any good docs for devise (or alternatives to devise), I need *API* auth, not HTTP (no browser, providing API for an app)
[19:49:48] fl4sh_: has joined #RubyOnRails
[19:50:12] ekinmur: has joined #RubyOnRails
[19:51:19] ChanServ: +q Guest_94857!*@*
[19:52:14] whathappens: has joined #RubyOnRails
[19:53:52] arooni-mobile: has joined #RubyOnRails
[19:54:53] Pupeno: has joined #RubyOnRails
[19:57:11] tjbiddle: has joined #RubyOnRails
[19:58:08] rafaelfranca: has joined #RubyOnRails
[19:58:08] rafaelfranca: has joined #RubyOnRails
[19:58:12] tjbiddle: Anyone here using Amazon ECS? I’m researching setting up Docker on my application with an Nginx/Puma/Rails setup - Using Amazon RDS as my backend and just wanted to see how others were using it.
[20:00:17] dtzuzu: has joined #RubyOnRails
[20:00:44] weaksauce: has joined #RubyOnRails
[20:02:05] kitsuneyo: has joined #RubyOnRails
[20:03:24] arooni-mobile: has joined #RubyOnRails
[20:06:44] macsteps: has joined #RubyOnRails
[20:07:13] roshanavand: has joined #RubyOnRails
[20:07:22] Ayey_: has joined #RubyOnRails
[20:08:02] oystersauce8: has joined #RubyOnRails
[20:09:26] jenrzzz: has joined #RubyOnRails
[20:10:18] adavia: has joined #RubyOnRails
[20:11:18] hck89: has joined #RubyOnRails
[20:11:56] arooni-mobile: has joined #RubyOnRails
[20:12:44] Pupeno: has joined #RubyOnRails
[20:12:44] Pupeno: has joined #RubyOnRails
[20:13:33] pawnbox: has joined #RubyOnRails
[20:14:22] workmad3: has joined #RubyOnRails
[20:14:58] dc4: has joined #RubyOnRails
[20:15:01] Jon30: has joined #RubyOnRails
[20:15:01] Jon30: has joined #RubyOnRails
[20:15:44] Synthead: is there a way to check if there's a "not null" constraint in a model reflection?
[20:16:45] Oliphaunte: has joined #RubyOnRails
[20:18:22] Spami: has joined #RubyOnRails
[20:19:59] pawnbox: has joined #RubyOnRails
[20:20:19] Spami: Quick question, how can I include a helper in a self method?
[20:21:57] arooni-mobile: has joined #RubyOnRails
[20:22:10] arBmind: has joined #RubyOnRails
[20:24:07] fox_mulder_cp: Synthead: .nil? .present?
[20:24:52] Synthead: fox_mulder_cp: something like ThatModel.reflections[that_reflection].not_null? (but working)
[20:25:42] nettoweb: has joined #RubyOnRails
[20:25:57] Pupeno: has joined #RubyOnRails
[20:26:06] drojas: has joined #RubyOnRails
[20:26:12] USvER: has joined #RubyOnRails
[20:27:05] drojas: Hello USvER
[20:27:06] USvER: When i try to change attribute in after_update, my attribute does not get saved
[20:27:22] Synthead: that's cause it's already been updated :)
[20:27:29] Synthead: hence after_update
[20:27:35] Synthead: you probably want a before_update or something
[20:27:37] USvER: I was trying to use *_will_change! dirty flag.. still no luck
[20:28:08] drojas: Anyone here knows how to properly call `build` on a `BelongsToPolymorphicAssociation` ?, I can't find documentation on how to tell AR the class I want to instantiate
[20:28:11] pur3eval: has joined #RubyOnRails
[20:28:13] fox_mulder_cp: Synthead: User.posts.nil? Post.comments.present>
[20:28:39] fox_mulder_cp: drojas: read about nested models
[20:29:02] Synthead: fox_mulder_cp: I'm not looking if one reflection on a model is nil, but if the reflection itself supports nil values
[20:29:23] Synthead: USvER: what are you trying to do?
[20:29:40] arooni-mobile: has joined #RubyOnRails
[20:29:47] USvER: Synthead i try to change model based on updated atribute
[20:29:54] mentalic: has joined #RubyOnRails
[20:29:59] Synthead: why are you changing that model?
[20:30:04] Synthead: what's the end goal?
[20:30:09] Synthead: ACTION brb
[20:30:28] nogic: has joined #RubyOnRails
[20:30:31] USvER: Synthead, i want to atomicaly, change the related attribute
[20:30:35] acovrig: does anyone know of any good docs for devise (or alternatives to devise), I need *API* auth, not HTTP (no browser, providing API for an app)
[20:30:44] USvER: Synthead, something like computed attribute
[20:31:15] nogic: has joined #RubyOnRails
[20:32:02] drojas: fox_mulder_cp: can't find anything about "nested models" involving polymorphic associations
[20:34:00] dc4: has joined #RubyOnRails
[20:38:08] arooni-mobile: has joined #RubyOnRails
[20:39:19] mwlang: has joined #RubyOnRails
[20:40:01] mwlang: hmmm….looks like the social network tools for Rails have largely died… https://www.ruby-toolbox.com/categories/social_networking
[20:40:51] mwlang: are there some newer ones out there that are based on or at least ported to Rails 4?
[20:44:23] drojas: has joined #RubyOnRails
[20:44:54] JamieD: has joined #RubyOnRails
[20:47:16] postapocallyptic: has joined #RubyOnRails
[20:50:08] Pupeno: has joined #RubyOnRails
[20:51:37] neanderslob: has joined #RubyOnRails
[20:52:42] Darmani: Hey guys, so I have a T shirt website I'm building. I have a shirt model and a "variant" model where I have different versions of "shirts" (small, medium, etc).
[20:53:21] Darmani: When a customer tries to buy something what should I be adding to the order? The shirt or the variant instance?
[20:53:49] whathappens: has joined #RubyOnRails
[20:54:16] blackmesa: has joined #RubyOnRails
[20:54:19] jhass: does each shirt have their own variants or are they shared?
[20:54:55] Darmani: jhass: each shirt has their own variants.
[20:55:17] ur5us: has joined #RubyOnRails
[20:55:19] jhass: then I would argue the variants are your actual products and the shirts are just categories thereof
[20:55:43] Darmani: jhass: May I show you something?
[20:55:54] Ayey_: has joined #RubyOnRails
[20:56:07] jhass: I think I have a pretty clear picture, is there something you don't understand in my answer? :)
[20:56:37] Darmani: jhass: No I understand what you are saying. But that leads me to a different problem which would be easier for you to understand if you see the live application.
[20:56:53] triangles: has joined #RubyOnRails
[20:57:09] jhass: if you want to show some code just do it, no need for my permission
[20:57:22] Darmani: jhass: It's not code. https://tshirtshop-mfifth.c9users.io/shirts/1
[20:58:34] Darmani: jhass: How do I tell the "order" which variant the customer wants to add?
[20:58:48] jhass: that shirt does not have 6 variants?
[20:59:09] Darmani: jhass: yes it does.
[20:59:19] jhass: so just add the correct one?
[20:59:43] Darmani: jhass: But how do I narrow it down? The form won't do that for me will it?
[21:00:11] Darmani: What I'm trying to say is I need to isolate the @variant but I don't know how to get it.
[21:00:39] jhass: Variant.find_by(size: params[:size], color: params[:color]) ?
[21:01:01] Darmani: jhass: Ohhhhh.
[21:01:24] Darmani: That makes sense. I don't know why that never occurred to me.
[21:01:41] Darmani: thanks ^.^
[21:03:53] chouhoul_: has joined #RubyOnRails
[21:12:41] blackmesa: has joined #RubyOnRails
[21:13:28] Darmani: jhass: Hey I just realized... the @variant doesn't actually appear until I add the order to the cart so I can't use it within the form :[
[21:13:29] Darmani: https://gist.github.com/mfifth/2725fffcdcd3c37ff0cec247a66bcad9
[21:13:49] sdwrage: has joined #RubyOnRails
[21:14:13] jahbrewski: has joined #RubyOnRails
[21:16:55] artisangoose: has joined #RubyOnRails
[21:17:09] artisangoose: Hello - trying to implement OmniAuth into OpenProject. Anyone available to help me debug via screen-share?
[21:17:19] pawnbox: has joined #RubyOnRails
[21:17:50] tvw: has joined #RubyOnRails
[21:18:19] jhass: Darmani: uh well your add_shirt_order_path wouldn't take the variant id but figure the variant out from the submitted params
[21:19:19] Darmani: jhass: But I get the nil-class error o.o
[21:19:29] Darmani: I assume it's because Rails doesn't see the params until I submit them o.o
[21:20:30] jhass: keep in mind I don't see what you're doing
[21:21:22] finnnnnnnnnnn: has joined #RubyOnRails
[21:21:24] Darmani: jhass: My apologies, bear with me.
[21:22:26] Darmani: jhass: https://gist.github.com/mfifth/2725fffcdcd3c37ff0cec247a66bcad9
[21:22:38] Darmani: If there's anything I'm missing let me know.
[21:22:52] artisangoose: Hello - trying to implement OmniAuth into OpenProject. Anyone available to help me debug via screen-share?
[21:23:42] jhass: Darmani: try to understand my last suggestion
[21:23:50] Darmani: That's the best way to get an answer around here.
[21:23:53] jhass: "your add_shirt_order_path wouldn't take the variant id but figure the variant out from the submitted params"
[21:24:00] Darmani: artisangoose: I'll tell you from experience I doubt anyone is willing to do that. Post your code on Gist and ask a question.
[21:24:17] Darmani: ACTION scratches head
[21:24:38] artisangoose: Really, I just need someone who can do this for me: https://www.openproject.org/open-source/development/create-omniauth-plugin/
[21:24:55] Darmani: jhass: I get what you're saying but I guess I don't know what that looks like o.o
[21:25:36] jhass: Darmani: 1) remove the id from your route 2) remove passing the id from your form_tag 3) move finding the variant to the right action
[21:29:57] Darmani: jhass: I don't know what the route is supposed to look like anymore :[
[21:30:59] jhass: I don't even know what it looks like right now ;)
[21:31:19] kitsuneyo: has joined #RubyOnRails
[21:31:49] Darmani: jhass: it looks like that :p https://gist.github.com/mfifth/2725fffcdcd3c37ff0cec247a66bcad9
[21:32:09] Darmani: I added my routes too just in case.
[21:32:34] jhass: so just member -> collection
[21:32:37] moresilenter: has joined #RubyOnRails
[21:32:59] Darmani: jhass: o.O?
[21:32:59] jhass: passing the variant id was semantically wrong there already anyway, a variant id is not a order id
[21:33:34] Darmani: o-oh okay.
[21:34:10] bruce_lee: has joined #RubyOnRails
[21:36:26] nettoweb: has joined #RubyOnRails
[21:36:40] flashpoint9: has joined #RubyOnRails
[21:36:53] Jayson_Virissimo: has joined #RubyOnRails
[21:37:40] Pupeno: has joined #RubyOnRails
[21:38:03] fox_mulder_cp: how to save nested object after destroying relation with :nullify. wich says that All associated objects' foreign keys are set to NULL without calling their save callbacks
[21:38:10] eljimmy: has joined #RubyOnRails
[21:38:13] Darmani: jhass: So far so good! Thanks (:
[21:39:09] allcentury: has joined #RubyOnRails
[21:46:05] ketherah: has joined #RubyOnRails
[21:47:43] kitsuneyo: has joined #RubyOnRails
[21:50:16] ketherah: How can I move my glyphicon to be on the same line as my rendered notification partial? https://gist.github.com/damiong28/30755ff310af26bca0d7d3ef08249c80#file-index-html-erb
[21:50:39] triptec: has joined #RubyOnRails
[21:50:44] mustmodify: has joined #RubyOnRails
[21:50:52] calmchaos: has joined #RubyOnRails
[21:53:39] fermonkus: has joined #RubyOnRails
[21:54:09] banisterfiend: has joined #RubyOnRails
[21:54:36] quazimodo: has joined #RubyOnRails
[21:57:36] cd-rum: has joined #RubyOnRails
[22:02:24] mustmodify: I have a monolith. Not as bit as some. Bigger than many. We're implementing Twilio... we'll be receiving text messages at an endpoint. The text messages won't be stored... or, at least, I don't plan on persisting them. It's basically 'c' to 'confirm' or presumably some people will reply with messages because they can't follow instructions. So those other messages will be persisted in notes somewhere. Part of me doesn't like adding at least three end
[22:02:26] rubyonrails654: has joined #RubyOnRails
[22:02:36] jowiar: has joined #RubyOnRails
[22:04:06] mustmodify: So my options, as I see them, are (a) add these endpoints, in addition to some I've already added for voice call confirmations (b) write a microapp that would call the monolith's actual API, adding overhead but keeping the monolith more domain-centric; or (c) ... hm... seemed like there was a third option but it isn't coming to me now.
[22:04:18] mustmodify: yeah option C is bad.
[22:05:32] mustmodify: has left #RubyOnRails: ()
[22:06:25] jenrzzz: has joined #RubyOnRails
[22:06:25] jenrzzz: has joined #RubyOnRails
[22:10:40] ur5us: has joined #RubyOnRails
[22:10:47] pawnbox: has joined #RubyOnRails
[22:13:20] Darmani: jhass: What do I pass to my route path again?
[22:13:47] Darmani: jhass: Nothing??
[22:14:34] Darmani: jhass: Can you show me? ._.
[22:15:38] jhass: form_tag add_shirt_order_path, method: :post
[22:16:33] Darmani: But.... wha.... doesn't... how does it... whaaaaa
[22:16:59] Ayey_: has joined #RubyOnRails
[22:17:48] Darmani: Well it works... I have no idea how it works... But it does.
[22:17:50] Darmani: so thanks.
[22:18:06] jhass: not sure what you're confused about :)
[22:18:24] SteenJobs: has joined #RubyOnRails
[22:18:42] one_zero: has joined #RubyOnRails
[22:20:07] Darmani: jhass: Okay wait... So the order is created when I press submit... and the params find the correct variation... So... It doesn't need the variable right away...
[22:21:58] rodfersou: has joined #RubyOnRails
[22:22:23] xlegoman: has joined #RubyOnRails
[22:27:17] jowiar: has joined #RubyOnRails
[22:27:19] ensyde__: has joined #RubyOnRails
[22:32:47] ur5us: has joined #RubyOnRails
[22:35:34] n90b0jjf: has joined #RubyOnRails
[22:42:20] phon: has joined #RubyOnRails
[22:42:56] kevr: has joined #RubyOnRails
[22:43:25] spectra: has joined #RubyOnRails
[22:46:07] rubyonrailed: has joined #RubyOnRails
[22:49:29] macsteps: has joined #RubyOnRails
[22:50:14] pawnbox: has joined #RubyOnRails
[22:51:34] mustmodify: has joined #RubyOnRails
[22:52:13] ur5us: has joined #RubyOnRails
[22:52:42] mustmodify: has left #RubyOnRails: ()
[22:54:47] catphish: has joined #RubyOnRails
[22:55:34] hardtail: has joined #RubyOnRails
[22:55:56] catphish: is there any way for a file upload field to have its data automatically read and applied to an activerecoed binary field? rather than doing a params[:file],read in the controller?
[22:57:09] catphish: ie by passing a params.require().permit() block containing a file upload to ActiveRecord#create
[22:58:31] catphish: i guess the model can do it with an attr_accessor and a before_validation block
[22:58:46] Hobogrammer: has joined #RubyOnRails
[22:59:33] jstransky: has joined #RubyOnRails
[23:03:56] n90b0jjf: has joined #RubyOnRails
[23:06:47] wethu: has joined #RubyOnRails
[23:07:32] wethu: has joined #RubyOnRails
[23:08:38] AndrewIsHere: has joined #RubyOnRails
[23:08:42] Oliphaunte: has joined #RubyOnRails
[23:08:53] catphish: has left #RubyOnRails: ("Leaving")
[23:10:15] dalbuschat: has joined #RubyOnRails
[23:13:26] flashpoint9: has joined #RubyOnRails
[23:14:36] n90b0jjf: has joined #RubyOnRails
[23:17:47] Ayey_: has joined #RubyOnRails
[23:19:42] pawnbox: has joined #RubyOnRails
[23:23:01] unreal: has joined #RubyOnRails
[23:24:51] cd-rum_: has joined #RubyOnRails
[23:29:47] PlasmaStar: has joined #RubyOnRails
[23:30:35] roamingdog: has joined #RubyOnRails
[23:30:43] tfitts: anyone working on migrating to rails 5 and actually planning to use turbolinks 5?
[23:38:50] Fernando-Basso: I have posts, and categories of posts. what is the proper way to add the post category as the select box for posts form? I did something like f.select and got a select field with the name post_post_category_id (instead of just post_category_id).
[23:40:35] pawnbox: has joined #RubyOnRails
[23:41:56] siaw23: has joined #RubyOnRails
[23:42:28] Fernando-Basso: I used select_tag instead of f.select and it is working. I just don't know if it is the proper way.
[23:42:40] siaw23: hello how do i get rid of these deprecation warnings? https://gist.github.com/siaw23/58167615059f2930a47d7e9616d7fdb7
[23:50:03] matthewd: siaw23: Stop calling `serialized_attributes`
[23:54:54] stardiviner: has joined #RubyOnRails
[23:55:19] basex: has joined #RubyOnRails