« Back to channel list

#RubyOnRails - 24 February 2016

« Back 1 day Forward 1 day »
[01:25:04] helpa: has joined #RubyOnRails
[01:25:22] Radar: !botsnack
[01:25:22] helpa: Nom nom. Thanks, Radar!
[01:25:24] Radar: platzhirsch: !rails5
[01:25:24] helpa: platzhirsch: lol
[01:25:35] tweeeaks: sleungcy: haml itself is very popular, but i haven't heard much of hamljs, is that even a thing?
[01:25:44] platzhirsch: !rubyonrails5
[01:25:50] platzhirsch: ACTION kicks helpa
[01:26:37] sleungcy: Its for javascript templating, like EJS, but you can write it in haml style
[01:26:43] matthewd: I'm typing as fast as I can :P
[01:26:55] mikecmpbll: has joined #RubyOnRails
[01:28:31] soahccc: OT: anyone by accident knows what ctrl+[ is for in terminals? Just discovered it by accident and what it does (as far as I can see) is accepting a number + a character printing that character N times into the current prompt... what is the use case? :D
[01:34:11] lessless: has joined #RubyOnRails
[01:34:36] aloneintheworld: has joined #RubyOnRails
[01:34:49] sleungcy: has joined #RubyOnRails
[01:35:20] pawnbox: has joined #RubyOnRails
[01:36:14] uris: has joined #RubyOnRails
[01:38:59] DiCablo: has joined #RubyOnRails
[01:40:53] moei: has joined #RubyOnRails
[01:47:54] DLSteve: has joined #RubyOnRails
[01:47:58] _Tariq: has joined #RubyOnRails
[01:48:55] Jeremy1023: has joined #RubyOnRails
[01:54:15] xxx1337: has joined #RubyOnRails
[01:54:17] xxx1337: anyone here ever work for a startup that has no consistent revenue but received some funding?
[01:55:43] pyemkey: has joined #RubyOnRails
[01:55:47] _Tariq: has joined #RubyOnRails
[01:56:50] raunicolae: has joined #RubyOnRails
[02:01:51] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[02:01:56] ekinmur: has joined #RubyOnRails
[02:02:40] greghoggard: has joined #RubyOnRails
[02:03:08] havenwood: xxx1337: yes, folk here have
[02:03:24] arBmind1: has joined #RubyOnRails
[02:05:52] sadaf2605: has joined #RubyOnRails
[02:08:59] goodcodeguy: has joined #RubyOnRails
[02:09:09] Arcaire: sevenseacat: Have you convinced your work to start using Phoenix yet?
[02:09:38] sevenseacat: Arcaire: I need to skill up more on it, but maybe.
[02:10:15] Arcaire: I'm torn between "ActionCable makes me physically ill" and "Rails feels nicer to read and write".
[02:10:36] Arcaire: I have no directive either way which makes it worse. I could use BrainFuck for all my work cares as long as I document it.
[02:10:38] sevenseacat: I can't justify it when I can't write much more than a really basic crud app in it.
[02:11:33] Arcaire: Wow, my face.
[02:12:20] Arcaire: Oh I just totally remembered that Rails 5 has Turbolinks 3.
[02:12:23] Arcaire: Looks like it's decided.
[02:12:24] nogic: has joined #RubyOnRails
[02:12:31] sevenseacat: phoenix it is?
[02:12:58] Arcaire: brew install elixir
[02:13:04] Arcaire: welp, wrong window. Thanks Chrome.
[02:14:18] DmitryBochkarev: has joined #RubyOnRails
[02:16:15] bklane: has joined #RubyOnRails
[02:18:39] Arcaire: Radar: Do you use Babel et al. with React?
[02:28:07] baweaver: has joined #RubyOnRails
[02:30:54] Radar: Arcaire: yes
[02:31:20] willharrison: has joined #RubyOnRails
[02:31:51] rafaelfranca: has joined #RubyOnRails
[02:32:24] willharrison: hey guys, looking for some quick anecdotal data. are jobs/salaries for rails developers still good like a few years ago?
[02:32:41] Radar: willharrison: yes
[02:32:53] sevenseacat: "it depends" but generally, yes
[02:33:10] willharrison: I do c# dev and rails dev but I am wanting to specialize a little more and I'm not sure which to go with
[02:33:25] sevenseacat: go with the one you enjoy more.
[02:33:35] rafaelfranca: has joined #RubyOnRails
[02:33:36] willharrison: I enjoy them both a lot :P
[02:33:51] willharrison: so I've come down to employability
[02:33:52] platzhirsch: has left #RubyOnRails: ()
[02:34:12] Radar: willharrison: Good Rails people are severely employable.
[02:34:27] Radar: willharrison: e.g. I had to craft this page especially for recruiters http://ryanbigg.com/recruiters/
[02:34:43] bricker: has joined #RubyOnRails
[02:35:18] willharrison: Radar: good to know, this helps me make up my mind a bit more
[02:35:36] bklane_: has joined #RubyOnRails
[02:35:50] sadaf2605: has joined #RubyOnRails
[02:36:01] Ropeney: I think you carry a bit of name in the community though, I dont think this is the case for 90% of devs
[02:36:11] matthewd: ACTION doesn't get contacted by random recruiters
[02:36:33] sevenseacat: matthewd: thats surprising
[02:36:46] matthewd: But I probably am a bit more under the radar... ba-dum tish
[02:37:08] Radar: matthewd: Were you at Rubyconf?
[02:37:30] rohit: has joined #RubyOnRails
[02:37:33] sevenseacat: I hope he was, or I met a convincing stranger wearing his name tag
[02:37:36] Radar: Ropeney: Yes, that's right I do. I worked hard on this Cult of Personality and you can pry it from my cold dead hands.
[02:38:03] Ropeney: what about your warm dead hands?
[02:38:11] matthewd: Radar: We spoke, like, more than once :P
[02:38:35] Radar: matthewd: Yeah, I thought so. Just wanted confirmation that you are who I thought you are.
[02:38:44] Radar: IRC's lack of avatars is nard
[02:39:02] Mdrz_92: has joined #RubyOnRails
[02:39:15] sevenseacat: omg we should all use slack instead *runs
[02:39:59] mauro_: has joined #RubyOnRails
[02:40:08] uris: has joined #RubyOnRails
[02:40:14] matthewd: https://avatars.githubusercontent.com/u/1034?s=120
[02:40:14] willharrison: is there a rails slack?
[02:40:20] Radar: oh yeah totally
[02:40:59] willharrison: ah nice, might need to get in on that
[02:41:11] sevenseacat: its... weird.
[02:41:19] Jeremy1023: has joined #RubyOnRails
[02:41:19] willharrison: never used slack until 6 months ago, still a fan of IRC
[02:41:20] Radar: matthewd: Ah! Now I've put an avatar to the face.
[02:41:26] sevenseacat: though there may be more than one slack
[02:41:47] willharrison: http://www.rubyonrails.link/ <-- this is the one I found
[02:41:57] sevenseacat: thats the one i'm part of
[02:43:06] nerium: has joined #RubyOnRails
[02:43:50] Radar: E_TOO_MANY_SLACKS
[02:44:04] Radar: Ropeney: preferably not. I like my hands.
[02:47:24] bklane: has joined #RubyOnRails
[02:50:26] Ropeney: so many questions to join this slack compared to iRC :(
[02:51:29] sevenseacat: indeed, the barrier to entry is much higher.
[02:51:33] Arcaire: Why is there a Rails slack
[02:51:46] sevenseacat: because all the cool kids use slack, don't you kno
[02:52:13] Arcaire: "I'll take 'what is something that really does not need to exist' for $450, Alice."
[02:52:39] sevenseacat: same as the elixir slack, and the slack for every other OS project
[02:52:50] Arcaire: They all have one major similarity in that I don't join any of them.
[02:53:05] Arcaire: If I wanted people's toxicity to become more personal I'd simply go outside.
[02:53:46] Arcaire: At least here people have to put in a modicum of effort to address me by name, call me rude things, and question my sexuality.
[02:56:10] baweaver: has joined #RubyOnRails
[02:56:20] uris: has joined #RubyOnRails
[02:57:14] Ropeney: so after that whole form, it took me to sign up to type forms and no indication if i can join?
[02:57:39] sevenseacat: yeah you have to wait for an invite :D ._.
[02:57:54] sevenseacat: they're an inclusive bunch
[02:58:00] Arcaire: You can start counting down the minutes until people yell at you *personally*, Ropeney!
[02:58:01] Ropeney: okay cool, hopefully i just didn't read that somewhere
[02:58:02] Arcaire: It's great fun.
[02:58:24] dopie: has joined #RubyOnRails
[02:58:45] DEA7TH: has joined #RubyOnRails
[02:59:10] uris: has joined #RubyOnRails
[02:59:11] FFValdivia92: has joined #RubyOnRails
[02:59:22] D9-: has left #RubyOnRails: ()
[03:00:40] Mdrz_92: has joined #RubyOnRails
[03:00:55] bklane_: has joined #RubyOnRails
[03:01:05] kies^: has joined #RubyOnRails
[03:02:24] D9: has joined #RubyOnRails
[03:02:42] nachoman: has joined #RubyOnRails
[03:03:19] jenrzzz: has joined #RubyOnRails
[03:07:59] uris: has joined #RubyOnRails
[03:09:22] trosborn: has joined #RubyOnRails
[03:12:39] uris: has joined #RubyOnRails
[03:12:55] kirillzh: has joined #RubyOnRails
[03:16:57] kirillzh: has joined #RubyOnRails
[03:17:40] uris: has joined #RubyOnRails
[03:20:03] _Tariq: has joined #RubyOnRails
[03:32:04] chagel: has joined #RubyOnRails
[03:32:17] uris: has joined #RubyOnRails
[03:34:31] uglybandersnatch: has joined #RubyOnRails
[03:34:58] pawnbox: has joined #RubyOnRails
[03:36:11] brycesenz: has joined #RubyOnRails
[03:37:39] jfelchner: has joined #RubyOnRails
[03:43:12] pawnbox: has joined #RubyOnRails
[03:46:18] ppinkerton: has joined #RubyOnRails
[03:49:53] Meow-J: has joined #RubyOnRails
[03:52:54] barhum2013: has joined #RubyOnRails
[03:54:45] pawnbox: has joined #RubyOnRails
[03:55:26] Surt_Q: has joined #RubyOnRails
[03:57:27] alexhartley: has joined #RubyOnRails
[03:58:56] monque: has joined #RubyOnRails
[03:59:16] pyemkey: has joined #RubyOnRails
[03:59:41] _Tariq: has joined #RubyOnRails
[04:02:56] bricker: has joined #RubyOnRails
[04:08:38] baweaver: has joined #RubyOnRails
[04:10:09] myraft_: has joined #RubyOnRails
[04:12:03] unreal_: has joined #RubyOnRails
[04:16:05] uglybandersnatch: has joined #RubyOnRails
[04:17:41] braincrash: has joined #RubyOnRails
[04:18:46] myraft: has joined #RubyOnRails
[04:18:47] blackmes1: has joined #RubyOnRails
[04:19:18] nachoman: has joined #RubyOnRails
[04:19:33] my: has joined #RubyOnRails
[04:21:29] myraft: has joined #RubyOnRails
[04:21:31] my: hello world
[04:21:47] krzkrz: has joined #RubyOnRails
[04:23:33] arup_r: has joined #RubyOnRails
[04:23:55] myraft02: has joined #RubyOnRails
[04:25:36] _djbkd: has joined #RubyOnRails
[04:27:00] IrishGringo: has joined #RubyOnRails
[04:27:22] techsethi: has joined #RubyOnRails
[04:28:29] pawnbox: has joined #RubyOnRails
[04:30:09] hinbody: has joined #RubyOnRails
[04:33:01] djellemah_: has joined #RubyOnRails
[04:34:17] htmldrum: has joined #RubyOnRails
[04:37:26] jetpack_joe: has joined #RubyOnRails
[04:37:29] fedexo: has joined #RubyOnRails
[04:40:18] jeanre: has joined #RubyOnRails
[04:40:19] jeanre: has joined #RubyOnRails
[04:43:57] kirillzh: has joined #RubyOnRails
[04:46:23] krzkrz: has joined #RubyOnRails
[04:50:12] y2mq37: has joined #RubyOnRails
[04:51:13] packet: has joined #RubyOnRails
[04:53:22] treaki_: has joined #RubyOnRails
[04:54:23] htmldrum: has joined #RubyOnRails
[04:54:37] Chagel_: has joined #RubyOnRails
[04:55:31] ppinkerton: has joined #RubyOnRails
[04:55:45] Cohedrin: has joined #RubyOnRails
[04:57:03] brycesenz: has joined #RubyOnRails
[04:59:25] godzillaenlacasa: has joined #RubyOnRails
[04:59:36] chagel: has joined #RubyOnRails
[05:04:37] chagel: has joined #RubyOnRails
[05:06:50] nachoman: has joined #RubyOnRails
[05:06:55] p1k: has joined #RubyOnRails
[05:07:34] sp1rs: has joined #RubyOnRails
[05:09:18] arup_r: has joined #RubyOnRails
[05:09:37] chagel: has joined #RubyOnRails
[05:11:39] sleungcy: has joined #RubyOnRails
[05:13:08] htmldrum: has joined #RubyOnRails
[05:13:34] n00bDev: has joined #RubyOnRails
[05:14:55] chagel: has joined #RubyOnRails
[05:17:02] pawnbox: has joined #RubyOnRails
[05:19:02] arup_r: has joined #RubyOnRails
[05:19:44] Eswar: has joined #RubyOnRails
[05:19:55] chagel: has joined #RubyOnRails
[05:20:26] johnflux: has joined #RubyOnRails
[05:20:26] johnflux: has joined #RubyOnRails
[05:22:51] sevenseacat: hmm, if i have a tracking URL that issues a 301 redirect to my app, why does my app say request.referer is nil
[05:24:56] chagel: has joined #RubyOnRails
[05:25:36] jfelchner: has joined #RubyOnRails
[05:26:06] ppinkerton: has joined #RubyOnRails
[05:26:10] uris: has joined #RubyOnRails
[05:28:59] lemur: has joined #RubyOnRails
[05:29:00] htmldrum: has joined #RubyOnRails
[05:29:05] sadaf2606: has joined #RubyOnRails
[05:30:13] chagel: has joined #RubyOnRails
[05:32:42] Arcaire: RFC doesn't define that HTTP Referer should happen for 301s.
[05:33:08] sevenseacat: that foils my dastardly plans
[05:34:10] Arcaire: I've seen behaviour where HTTPS => HTTP results in Referer drops.
[05:34:30] Arcaire: 301s "sometimes" maintain the Referer. It's kind of the semi-accepted norm I think.
[05:34:45] quazimodo: compiling my assets is taking some extra stops
[05:34:52] quazimodo: but i'd like to keep assets:precompile
[05:35:00] quazimodo: any simple way to extend it?
[05:35:13] chagel: has joined #RubyOnRails
[05:38:16] arup_r: has joined #RubyOnRails
[05:39:46] techsethi: has joined #RubyOnRails
[05:42:47] Radar: quazimodo: that question didn't make sense to me
[05:42:56] Radar: quazimodo: I read it like 6 times
[05:45:25] Eswar: has joined #RubyOnRails
[05:47:57] chipotle: has joined #RubyOnRails
[05:51:42] rubyonrailed: has joined #RubyOnRails
[05:52:10] itsgokul: has joined #RubyOnRails
[05:55:44] wethu: has joined #RubyOnRails
[05:56:10] quazimodo: Radar: sure, make assets:precompile task do more things. The 'enhance' method does do it in a sort of before/after hook style
[05:56:17] quazimodo: how's your day
[05:56:27] DoctorMonocular: has joined #RubyOnRails
[05:56:57] Radar: I'd add it as a middle dependency of a parent task
[05:58:05] apotry: has joined #RubyOnRails
[05:58:19] ppinkerton: has joined #RubyOnRails
[05:59:13] rogue_koder: has joined #RubyOnRails
[06:00:58] pyemkey: has joined #RubyOnRails
[06:01:46] wethu: Hey, I'm trying to write a request spec, I'm calling `post "/v1/users", params, headers` when i load up a pry session from the controllers' create action, and call params, my params are missing, however if i remove the headers from post, and just have `post "/v1/users", parameters it does.. is this expected?
[06:02:12] wethu: https://gist.github.com/wethu/29c74e8cd2de80f72d3c
[06:06:06] sleungcy: has joined #RubyOnRails
[06:06:50] armyriad: has joined #RubyOnRails
[06:09:37] arup_r: wethu: why sending those headers, what if you try post "/v1/users", format: :json, user_params ?
[06:10:17] czerasz: has joined #RubyOnRails
[06:10:27] wethu: good question, arup_r
[06:13:43] LudicrousMango: has joined #RubyOnRails
[06:14:43] wethu: arup_r: thats syntax erroring, I'm trying to find the docs for post now
[06:16:29] arup_r: wethu: post "/v1/users", user_params, format: :json ?
[06:17:51] nachoman: has joined #RubyOnRails
[06:19:23] wethu: arup_r, that works thanks !
[06:20:01] arup_r: yeah, I forgot the ordering. :) wc
[06:21:53] SteenJobs: has joined #RubyOnRails
[06:23:04] srinidhi: has joined #RubyOnRails
[06:23:43] kies^: has joined #RubyOnRails
[06:24:58] SteenJobs: has joined #RubyOnRails
[06:25:21] bios: has joined #RubyOnRails
[06:25:40] arup_r: has joined #RubyOnRails
[06:28:30] nachoman: has joined #RubyOnRails
[06:28:42] sled: has joined #RubyOnRails
[06:31:10] rafaelfranca: has joined #RubyOnRails
[06:31:40] aganov: has joined #RubyOnRails
[06:32:48] bios: hey * .. I want to have an image model that has about 12 records that are upated with new images every second from an external device. I'm thinking of paperclip to handle the images. Any feedback on this design and concerns about performance?
[06:34:44] htmldrum: has joined #RubyOnRails
[06:35:02] dionysus69: has joined #RubyOnRails
[06:35:34] uglybandersnatch: will you store the images on the filesystem?
[06:36:48] chagel: has joined #RubyOnRails
[06:36:52] rvanlieshout: has joined #RubyOnRails
[06:37:14] trosborn: has joined #RubyOnRails
[06:38:05] techsethi: has joined #RubyOnRails
[06:39:11] arup_r: bios: I use carrierwave, never tried paperclip..
[06:40:56] yfeldblum: has joined #RubyOnRails
[06:41:10] bios: I'm just familiar with paperclip and it should do the trick for what I'm needing (I think).
[06:41:29] bios: but I'm not married to it.. if I need to change I will
[06:41:46] bios: uglybandersnatch: think that will work?
[06:41:47] chagel: has joined #RubyOnRails
[06:45:10] norc: bios: Here are my concerns about performance. Write code that works. Write tests for your code. Profile your code. Optimize (i.e. care about performance).
[06:45:12] norc: In that order.
[06:45:35] bios: norc: that makes sense..
[06:46:06] bios: just build it, test it and make it better... rinse repeat
[06:46:30] bios: ok.. probaby a bad question.. thanks for the feedback *
[06:46:39] norc: bios: The important bit here is to *profile* before your *optimize*.
[06:46:57] chagel: has joined #RubyOnRails
[06:47:10] norc: By profiling you actually determine which part needs to be improved - if any.
[06:47:13] bios: to see where the performance bottlenecks are
[06:47:16] norc: Exactly.
[06:48:47] blackmes1: has joined #RubyOnRails
[06:49:56] ur5us: has joined #RubyOnRails
[06:51:36] ur5us: has joined #RubyOnRails
[06:53:15] chagel: has joined #RubyOnRails
[06:56:40] bronson: has joined #RubyOnRails
[06:58:16] chagel: has joined #RubyOnRails
[06:58:31] htmldrum: has joined #RubyOnRails
[07:02:22] duncannz: has joined #RubyOnRails
[07:03:18] chagel: has joined #RubyOnRails
[07:03:31] fn2187: has joined #RubyOnRails
[07:04:14] trosborn: has joined #RubyOnRails
[07:06:16] yardenbar: has joined #RubyOnRails
[07:07:51] tvw: has joined #RubyOnRails
[07:08:16] chagel: has joined #RubyOnRails
[07:12:04] jfelchner: has joined #RubyOnRails
[07:13:21] mhoungbo: has joined #RubyOnRails
[07:14:03] konsolebox: has joined #RubyOnRails
[07:15:31] wethu: has joined #RubyOnRails
[07:15:31] lxsameer: has joined #RubyOnRails
[07:15:36] chagel: has joined #RubyOnRails
[07:17:50] sandstrom: has joined #RubyOnRails
[07:19:06] comrad: has joined #RubyOnRails
[07:20:36] chagel: has joined #RubyOnRails
[07:23:32] frans3011: has joined #RubyOnRails
[07:23:57] TwinkleHood: has joined #RubyOnRails
[07:25:36] chagel: has joined #RubyOnRails
[07:27:20] Pazician: has joined #RubyOnRails
[07:28:19] jeanre: has joined #RubyOnRails
[07:28:19] DoubleMalt: has joined #RubyOnRails
[07:28:19] jeanre: has joined #RubyOnRails
[07:28:57] frans3011: Hello. I was using RoR for a while and I was messing with docker on my computer and now for some weird reason my rake does not work anymore. I trying re-installing ruby but I get the same error.
[07:29:02] frans3011: `load': cannot load such file -- /usr/share/rubygems-integration/all/specifications/bin/rake (LoadError)
[07:29:02] frans3011: from /usr/local/bin/rake:23:in `<main>'
[07:29:06] htmldrum: has joined #RubyOnRails
[07:29:43] frans3011: forgive me if this is a stupid question as I am fairly new to rails.
[07:30:54] chagel: has joined #RubyOnRails
[07:32:18] mwlang: has joined #RubyOnRails
[07:33:14] G: has left #RubyOnRails: ()
[07:33:35] Ropeney: has joined #RubyOnRails
[07:35:19] mwlang: Does Devise require emails to be populated or was that a developer’s choice to make emails required?
[07:35:43] bronson: has joined #RubyOnRails
[07:35:54] chagel: has joined #RubyOnRails
[07:37:10] JohnBat26: has joined #RubyOnRails
[07:38:31] djsmentya: has joined #RubyOnRails
[07:38:41] arup_r: mwlang: it is your choice. by default is email
[07:39:00] arup_r: you can see it in the devise.rb inside the config/initializer file
[07:39:04] TwinkleHood: has joined #RubyOnRails
[07:39:17] arup_r: i mean config/initializer/devise.rb
[07:39:18] mwlang: yeah, I see that.
[07:39:29] mwlang: more to the point: I want to implement gradual engagement
[07:39:54] mwlang: the previous developer sort of implemented it, but he fills email with bogus random email addresses
[07:40:25] mwlang: which is kind of dumb and polluting. I’d rather the email just remain blank until it becomes known.
[07:41:00] arup_r: I think you are talking about authentication keys.
[07:41:36] arup_r: https://github.com/plataformatec/devise/blob/49cf804c62b259af24291ca14b58bd32a905fa9e/lib/devise/models/authenticatable.rb#L13
[07:43:04] mwlang: can devise handle email being the auth key AND records with blank email fields if I make the email field nullable?
[07:43:30] mwlang: a user record with blank email will never authenticate, obviously.
[07:43:33] jas02: has joined #RubyOnRails
[07:45:17] sevenseacat: that doesnt make sense to do
[07:45:18] chagel: has joined #RubyOnRails
[07:45:28] sevenseacat: you'll have a lot of issues if you make the email field nullable
[07:46:42] theunraveler: has joined #RubyOnRails
[07:46:44] sevenseacat: gradual engagement usually means storing things in the session until a user record is created
[07:47:13] jeanre: has joined #RubyOnRails
[07:47:13] jeanre: has joined #RubyOnRails
[07:47:44] arup_r: mwlang: create the user records, and trun on confirmation module, which will prevent users to sign in until they confirm the sign up ?
[07:48:25] arup_r: in that case, you don't need the email field to be blank..
[07:49:36] mwlang: sevenseacat: what sort of issues are you thinking of?
[07:49:39] ur5us: has joined #RubyOnRails
[07:50:24] chagel: has joined #RubyOnRails
[07:50:35] arup_r: or keep something else as the authentication key except email, and then I think you can keep the email field as blank.
[07:50:55] arup_r: Never tried, but hoping it can be done
[07:53:24] Palsson: has joined #RubyOnRails
[07:53:36] arup_r: devise sets up required field by the authentication_keys settings. if you remove email from there, DB will allow you to set up user record without email https://github.com/plataformatec/devise/blob/master/lib/devise/models/database_authenticatable.rb#L37
[07:54:03] sleungcy: has joined #RubyOnRails
[07:55:41] chagel: has joined #RubyOnRails
[07:56:14] sp1rs: has joined #RubyOnRails
[07:56:27] mdw: has joined #RubyOnRails
[07:57:02] pyemkey: has joined #RubyOnRails
[07:59:10] alexhartley: has joined #RubyOnRails
[08:00:17] mwlang: ok, that answers the question I had. thanks!
[08:00:51] sandstrom: has joined #RubyOnRails
[08:01:10] theunraveler: has joined #RubyOnRails
[08:01:17] adac: has joined #RubyOnRails
[08:02:47] theunraveler: has joined #RubyOnRails
[08:03:11] baweaver: has joined #RubyOnRails
[08:05:02] chagel: has joined #RubyOnRails
[08:05:37] neanderslob: hi all, I was wondering if there was a "rails way" to comma-delimit numerical text inputs for ease of entry
[08:05:45] trosborn: has joined #RubyOnRails
[08:05:49] ferr: has joined #RubyOnRails
[08:05:59] neanderslob: up until now, I've been using javascript and custom setter getter methods to prevent an error when saving
[08:06:16] neanderslob: is there an easier (less hacky) way to do this?
[08:06:16] robbyoconnor: has joined #RubyOnRails
[08:06:42] mary5030_: has joined #RubyOnRails
[08:07:12] techsethi_: has joined #RubyOnRails
[08:07:53] artto: has joined #RubyOnRails
[08:08:01] jeanre: has joined #RubyOnRails
[08:08:01] jeanre: has joined #RubyOnRails
[08:08:35] theunraveler: has joined #RubyOnRails
[08:08:57] chridal_: has left #RubyOnRails: ()
[08:10:09] chridal: has joined #RubyOnRails
[08:11:22] chagel: has joined #RubyOnRails
[08:12:30] solars: has joined #RubyOnRails
[08:13:35] jeanlinux: has joined #RubyOnRails
[08:13:54] djsmentya: has left #RubyOnRails: ()
[08:14:03] P_deClown: has joined #RubyOnRails
[08:14:36] Cork: is there a way to decode Encryptor strings from before the iv key was added?
[08:14:43] Cork: i only get gibrish out of it...
[08:15:31] P_deClown: Hello. I'm relatively new to Rails and having an issue, which I can't solve. I have a User model. The model has_many friendships and has_many friends, through: :friendships. The friendships table has a user_id and a friend_id. Friend is a self reference to User. All works fine, except for one minor detail: This construction shows the friends for where friendships.user_id equals the particular user.
[08:16:01] P_deClown: What I actually want is friends show everything when user_id OR friend_id equals the particular user
[08:16:59] ppinkerton: has joined #RubyOnRails
[08:19:15] frans3011: So I had a problem with rake earlier and it turns out that I had a older version of ruby that was messing with the newer version of rake. RVM fixed everything :DDDD
[08:20:14] quazimodo: has joined #RubyOnRails
[08:20:26] sevenseacat: first time I've heard someone say that
[08:20:27] darutoko: has joined #RubyOnRails
[08:22:04] frans3011: well I will never use the apt-get package managers shit anymore thats for sure
[08:22:42] pawnbox: has joined #RubyOnRails
[08:24:16] Majadon: has joined #RubyOnRails
[08:25:30] jenrzzz: has joined #RubyOnRails
[08:26:58] chagel: has joined #RubyOnRails
[08:27:00] sandstrom: has joined #RubyOnRails
[08:27:42] nerium: has joined #RubyOnRails
[08:29:07] pawnbox_: has joined #RubyOnRails
[08:31:51] chagel: has joined #RubyOnRails
[08:35:37] jfelchner_: has joined #RubyOnRails
[08:35:41] srinidhi: has joined #RubyOnRails
[08:36:50] chagel: has joined #RubyOnRails
[08:41:50] chagel: has joined #RubyOnRails
[08:44:20] silverdust: has joined #RubyOnRails
[08:44:51] sandstrom: has joined #RubyOnRails
[08:45:06] Majadon: has joined #RubyOnRails
[08:46:20] sandstrom: has joined #RubyOnRails
[08:46:50] wmdrossard: has joined #RubyOnRails
[08:46:52] chagel: has joined #RubyOnRails
[08:49:06] sandstrom: has joined #RubyOnRails
[08:49:49] Dbugger: has joined #RubyOnRails
[08:49:53] Dbugger: Hi fellas.
[08:50:21] mark1: has joined #RubyOnRails
[08:50:50] Dbugger: Would anyone have a "gitlab-ci.yml" file, with the whole "install ruby, install bundler, rails nodejs, bla bla bla"?
[08:51:05] Dbugger: I am trying to write it myself, but it is kinda messy, not really my kind of thing :P
[08:51:38] xhoy: any good wysiwyg for rails apps?
[08:51:46] adac: Wonderin why rake assets:precompile calls the initializers?
[08:51:57] chagel: has joined #RubyOnRails
[08:52:40] xhoy: (a verry verry basic one will do)
[08:54:37] 17WAADLHR: has left #RubyOnRails: ()
[08:54:45] srinidhi: has joined #RubyOnRails
[08:54:47] kirillzh: has joined #RubyOnRails
[08:55:07] AzaToth: has joined #RubyOnRails
[08:55:25] artto: has joined #RubyOnRails
[08:55:50] gregf_: has joined #RubyOnRails
[08:55:51] rohit: has joined #RubyOnRails
[08:55:58] futilegames: has joined #RubyOnRails
[08:56:31] arup_r: has joined #RubyOnRails
[08:56:52] chagel: has joined #RubyOnRails
[08:56:59] bobbobbins: has joined #RubyOnRails
[08:57:31] tbuehlmann: xhoy, I'd give https://trix-editor.org/ a try. what about you try it and report back?
[08:59:05] Puffball: has joined #RubyOnRails
[08:59:23] trosborn: has joined #RubyOnRails
[09:01:05] bobbobbins: has joined #RubyOnRails
[09:01:58] chagel: has joined #RubyOnRails
[09:02:10] bronson: has joined #RubyOnRails
[09:03:29] mikecmpbll: has joined #RubyOnRails
[09:04:35] jeanlinux: has joined #RubyOnRails
[09:05:15] defsdoor: has joined #RubyOnRails
[09:08:44] jsrn_: has joined #RubyOnRails
[09:09:05] shibly: has joined #RubyOnRails
[09:09:15] shibly: has left #RubyOnRails: ("Leaving")
[09:09:44] Eswar: has joined #RubyOnRails
[09:13:07] jeanre: has joined #RubyOnRails
[09:13:07] jeanre: has joined #RubyOnRails
[09:14:00] moei: has joined #RubyOnRails
[09:17:14] DoubleMalt: has joined #RubyOnRails
[09:18:26] nfk: has joined #RubyOnRails
[09:18:36] alexhartley: has joined #RubyOnRails
[09:18:47] blackmes1: has joined #RubyOnRails
[09:18:53] sp1rs: has joined #RubyOnRails
[09:22:41] jfelchner: has joined #RubyOnRails
[09:22:56] herbst: has joined #RubyOnRails
[09:24:30] laith: has joined #RubyOnRails
[09:26:01] algernop_k: has joined #RubyOnRails
[09:28:55] TDJACR: has joined #RubyOnRails
[09:29:29] Ergo: has joined #RubyOnRails
[09:35:04] xhoy: tbuehlmann: ill have a look
[09:35:08] xhoy: tbuehlmann: looks nice :D
[09:39:26] marr: has joined #RubyOnRails
[09:41:09] marr: has joined #RubyOnRails
[09:42:14] sleungcy: has joined #RubyOnRails
[09:45:05] BaNzounet: Hey, I want to let the possibility to my users to create customn URL example.com/WhatEver but I don't want to create a catch all a the end of routes.rb, how whould you do that ?
[09:45:37] xhoy: update the routes file?
[09:45:55] nerium: has joined #RubyOnRails
[09:46:30] BaNzounet: What do you mean?
[09:48:02] chridal: Is there any way to see the SQL-query that an ActiveRecord lookup produces?
[09:48:16] chridal: Currently doing User.where(username: collection).joins(:device_token) but I want to see that query
[09:48:52] durexlw: has joined #RubyOnRails
[09:50:00] kichawa: has left #RubyOnRails: ()
[09:50:27] TDJACR: has joined #RubyOnRails
[09:50:33] snowy: has joined #RubyOnRails
[09:50:59] dalpo: has joined #RubyOnRails
[09:52:53] arup_r: BaNzounet: at the end of routes.rb `match "/*", via: :get` or something like that.
[09:54:07] bruce_lee: has joined #RubyOnRails
[09:54:07] bruce_lee: has joined #RubyOnRails
[09:54:43] nerium: has joined #RubyOnRails
[09:55:18] triangles: has joined #RubyOnRails
[09:55:25] BaNzounet: arup_r: I dont really like that solution, One of the problem I had is that some gems using specific route are not reachable anymore
[09:56:30] arup_r: BaNzounet: cool. no issue. So when someone types random url, after receiving that what you want to show them.. 404 ??
[09:58:24] tbuehlmann: BaNzounet, I guess you have to use a catchall-like route after all other routes to avoid that. also, don't allow users to create the routes your application uses
[09:58:25] neanderslob_: has joined #RubyOnRails
[09:58:28] arup_r: all controllers and routes are there to deal with business usecases.. Any thing outside of the mapped urls, should be 404
[09:58:39] kirillzh: has joined #RubyOnRails
[09:59:05] alexhart_: has joined #RubyOnRails
[09:59:16] arup_r: so no need to catch anything from outside... if doesn't match with expected url show them 404 page
[10:00:31] moeabdol3: has joined #RubyOnRails
[10:00:42] FooMunki: has joined #RubyOnRails
[10:01:32] Guest34101: has joined #RubyOnRails
[10:01:43] BaNzounet: tbuehlmann: it was my last route, but the gem is an engine and his routes are not inside the routes.rb
[10:01:55] P_deClown: Still trying to solve my problem. Here is a part of my user model: http://dpaste.com/3GE0BJ3 All the has_many associations are working fine, except for the two lines with _not_blocked. Where there is a NOT on the where command. It always returns a result even when a user isnt blocked by the friend. I'm not expert on SQL, but this might be because and INNER JOIN is used by has_many. So would there be a way to use LEFT JOIN instead of INNER JOIN?
[10:02:10] ql6wlld: has joined #RubyOnRails
[10:02:23] hugoangelo: has joined #RubyOnRails
[10:02:33] tbuehlmann: BaNzounet, well, not allowing these routes for users should work then?
[10:04:42] jeanre: has joined #RubyOnRails
[10:04:42] jeanre: has joined #RubyOnRails
[10:04:54] TwinkleHood: has joined #RubyOnRails
[10:05:25] BaNzounet: I may have badly explained my problem, when I was using a catch all at the end of the routes.rb it makes my engine inaccessible
[10:05:29] neanderslob: has joined #RubyOnRails
[10:05:36] baweaver: has joined #RubyOnRails
[10:06:21] BaNzounet: So that's why I'm trying to figure out another solution
[10:06:56] uglybandersnatch: has joined #RubyOnRails
[10:07:20] sandstrom: has joined #RubyOnRails
[10:08:28] tbuehlmann: does it have to be /:foo or could it also be /whatnot/:foo?
[10:08:41] rikkipitt: has joined #RubyOnRails
[10:08:59] tbuehlmann: circumventing the problem, I know. don't have a solution for the actual problem
[10:09:21] BaNzounet: What I was thinking was catching it in my 404 controllers and do a last check there
[10:09:26] BaNzounet: but it feels dirty
[10:10:47] BaNzounet: in the other hand that's where I'm sure this was not an route used by us :/
[10:12:06] laith: has joined #RubyOnRails
[10:14:27] laith1: has joined #RubyOnRails
[10:16:33] chridal: users = User.includes(:device_token).where(username: mentions)
[10:16:50] chridal: Shouldn't this include the rows from device_token in the User being returned?
[10:16:51] crdpink2: has joined #RubyOnRails
[10:17:20] chridal: Or would I actually have to do user.device_token.sns_endpoint_arn to get the sns_endpoint_arn field from DeviceToken?
[10:17:35] chridal: I was worried that that would in fact load the relation from the DB which is not what I want
[10:18:07] chridal: Can not get this to work, but when writing a pure SQL query using LEFT OUTER JOIN I get the results I want just fine from Postgres
[10:18:09] bobbobbins: has joined #RubyOnRails
[10:18:25] artto: has joined #RubyOnRails
[10:18:44] tbuehlmann: you'll have to call user.device_token.sns_endpoint_arn, yes
[10:19:07] BaNzounet: When you use include, that will allow you to do user.device_token without firing an other query
[10:19:58] chridal: Aha! What would be the best way btw to monitor what queries have happened lately?
[10:19:59] rvanlieshout: use joins if you know the relationships exist
[10:20:05] rvanlieshout: over includes (creating a left join)
[10:20:23] rvanlieshout: but only if you need it in conditions and don't need the separate joined model
[10:20:53] chridal: rvanlieshout: Why should I prefer joins btw? That's an INNER JOIN right?
[10:21:14] rvanlieshout: cause an inner join is way way way faster then a left join
[10:21:24] chridal: Oh. I didn't know that.
[10:21:33] rvanlieshout: but you have to know that's the difference beore you could use it
[10:21:48] jottr: has joined #RubyOnRails
[10:21:53] chridal: The difference of what?
[10:22:00] rvanlieshout: left join vs inner join
[10:22:02] rvanlieshout: different in result
[10:22:04] chridal: Yea, indeed.
[10:22:20] rvanlieshout: there is a reason rails prefers 2 queries when just using includes and not refering to those includes in conditions
[10:22:25] rvanlieshout: cause it's faster then using a left join
[10:22:58] chridal: But if two separate queries is faster than using a left join than what is the thing about left joins that make it worth it?
[10:23:40] chipotle: has joined #RubyOnRails
[10:23:56] rvanlieshout: if you require it in conditions
[10:23:58] rvanlieshout: then you'll have to
[10:24:46] blackmes1: has joined #RubyOnRails
[10:25:21] chridal: But is there a way that I can see what queries were ran? I mean now I'm doing `User.where(username: mentions).joins(:device_token)`
[10:25:34] sp1rs: has joined #RubyOnRails
[10:25:44] chridal: and if I now do user.device_token.endpoint_arn how can I make sure that only the join has been called?
[10:26:08] rvanlieshout: for that use includes
[10:26:20] rvanlieshout: it'll use a single query for the users, not using any join
[10:26:30] rvanlieshout: then 1 query if you access the fist user.device_token.. fetching devise tokens for all users
[10:26:44] chridal: But I will be using the device_token every time
[10:26:50] chridal: that's in fact what I need
[10:27:07] rvanlieshout: and having it fetches in 1 query is the best approach
[10:27:10] rvanlieshout: 2 queries total
[10:27:10] chridal: I have the username, and I want to find the sns_endpoint_arn from DeviceTokens based on user.username
[10:27:24] rvanlieshout: you don't need the users?
[10:27:30] rvanlieshout: then don't start with User.
[10:27:36] rvanlieshout: start with what you need
[10:27:38] chridal: Yea, I just sort of started thinking that when I wrote it xD
[10:27:50] rvanlieshout: DeviceToken.joins(:user).where(users: { username: 'foo' })
[10:28:08] chridal: but won't that include everything from User?
[10:28:16] chridal: since its an inner join?
[10:28:25] rvanlieshout: the select only contains stuff from devicetoken
[10:28:27] chridal: It will select nothing from the user?
[10:29:19] rvanlieshout: DeviceToken.joins(:user).where(users: { username: 'foo' }).to_sql
[10:29:37] arup_r: has joined #RubyOnRails
[10:29:49] chipotle_: has joined #RubyOnRails
[10:30:00] chridal: Yeapp. Looks good.
[10:30:13] chridal: But what about 'seeing the queries that has been ran' part?
[10:30:15] chridal: Is that possible?
[10:30:21] rvanlieshout: in a console or log
[10:30:29] rvanlieshout: it's already in there
[10:30:45] chridal: Currently writing tests and poking a bit with pry
[10:30:55] arBmind: has joined #RubyOnRails
[10:31:14] rvanlieshout: tail -f it while you're poking
[10:32:44] chridal: rvanlieshout: Any way to empty out the log? It's huge atm
[10:33:01] BaNzounet: rm test.log ?
[10:33:01] chridal: I tried deleting the log files before, but when creating new ones they didn't log to them at all...
[10:33:01] rvanlieshout: tail -f will show you new stuff live
[10:33:06] chridal: yea, I know
[10:33:11] chridal: but it's a big file
[10:33:11] rvanlieshout: clear you terminal window?
[10:33:13] chridal: so I want to clean it
[10:33:19] rvanlieshout: oh just rm it
[10:33:25] rvanlieshout: but you'll have to restart your test
[10:34:28] chridal: When I deleted production/development.log once it never wrote to the new ones I created and didn't create themselves again
[10:34:30] chridal: will give it a go tho
[10:34:51] chridal: Seems it worked just fine now though. Thanks.
[10:34:51] rvanlieshout: you'll have to restart the process that is writing to it
[10:35:06] rvanlieshout: you might try emptying it using echo > development.log
[10:35:09] rvanlieshout: that'll keep the same file
[10:35:46] Eswar: has joined #RubyOnRails
[10:37:20] chridal: How can I never have thought about tailing test.log. This is going to make my life a lot easier.
[10:37:52] sleungcy: has joined #RubyOnRails
[10:39:48] uglybandersnatch: has joined #RubyOnRails
[10:41:12] jeanre: has joined #RubyOnRails
[10:41:13] jeanre: has joined #RubyOnRails
[10:42:53] n00bDev: has joined #RubyOnRails
[10:43:34] durexlw: I kinda expect there is a method in ruby that can convert "test string % test" to "test_string__test"? Anyone know what it would be called?
[10:44:09] n00bDev: i need to create a object that depends on the id of a another objcet that is about to be created
[10:44:14] n00bDev: how do i approach this
[10:44:47] xhoy: tbuehlmann: loving trix!
[10:45:17] xhoy: and the maclover7/trix gem makes it easy to implement AND the PR fixes it for formtastic
[10:45:23] xhoy: so was a 5 minute job
[10:45:43] xhoy: (now working on some css stuff since layout is FU by default
[10:46:21] TwinkleHood: has joined #RubyOnRails
[10:46:57] rvanlieshout: durexlw: underscore or parameterize might suit
[10:47:23] durexlw: n00bdev: this might help: http://guides.rubyonrails.org/association_basics.html
[10:47:31] Ergo^: has joined #RubyOnRails
[10:47:32] durexlw: rvanlieshout: I'll check em out. Thanks
[10:48:06] arup_r: "test string % test".tr(" %", "_") # => "test_string___test"
[10:48:16] durexlw: rvanlieshout: parameterize is the one I'm looking for
[10:48:47] xhoy: But we need 1.0 i see :)
[10:49:02] durexlw: arup_r: thanks, I just suspected there would be a method already for it: csv and to_xml uses it already, so rather use those
[10:49:05] uglybandersnatch: has joined #RubyOnRails
[10:49:16] arup_r: yes, go for it.
[10:49:19] xhoy: but works create, H1/H2 and some better (default) css would be great
[10:52:40] lubekpl: has joined #RubyOnRails
[10:52:59] sandstrom: has joined #RubyOnRails
[10:53:52] durexlw: ok this works
[11:02:13] bronson: has joined #RubyOnRails
[11:02:49] jeanre: has joined #RubyOnRails
[11:02:49] jeanre: has joined #RubyOnRails
[11:05:19] trinaldi: has joined #RubyOnRails
[11:08:15] Lingo____: has joined #RubyOnRails
[11:09:15] techsethi: has joined #RubyOnRails
[11:09:29] workmad3: has joined #RubyOnRails
[11:10:30] rodfersou: has joined #RubyOnRails
[11:12:10] jottr: has joined #RubyOnRails
[11:13:03] TwinkleHood: has joined #RubyOnRails
[11:15:18] sp1rs: has joined #RubyOnRails
[11:18:11] Chagel_: has joined #RubyOnRails
[11:19:14] rohit: has joined #RubyOnRails
[11:21:07] durexlw: Nice... finally managed a direct connection from excel to an api
[11:23:07] Ropeney_: has joined #RubyOnRails
[11:23:10] chagel: has joined #RubyOnRails
[11:24:22] sp1rs: has joined #RubyOnRails
[11:28:04] rubyonrails530: has joined #RubyOnRails
[11:28:09] chagel: has joined #RubyOnRails
[11:30:51] sleungcy: has joined #RubyOnRails
[11:32:39] durexlw: Anyone here has experience with storing sensitive data of users in a database, but in a way that the data can be retreived? The app scrapes another website, but it needs login credentials to scrape that website. Given the scraping needs to be done in the background, I have to store the users credentials of the website that is scraped in my db. Can anyone advice on this?
[11:33:10] chagel: has joined #RubyOnRails
[11:35:15] bobbobbins: has joined #RubyOnRails
[11:35:56] ldnunes: has joined #RubyOnRails
[11:36:34] sevenseacat: don't store them in the db, store them in env vars?
[11:36:53] arup_r: or inside a yml ?
[11:38:09] chagel: has joined #RubyOnRails
[11:43:09] chagel: has joined #RubyOnRails
[11:44:13] vedu: Anyone wants to contribute to this discussion https://www.reddit.com/r/rails/comments/47c5pm/how_do_you_secure_and_authenticate_your_rails_api/ ;-)
[11:44:22] rubyonrails530: Hi all. I have a question:
[11:44:31] rubyonrails530: Role.where(contact: user.contacts).includes(contact: [:emails, :events, :activities])
[11:44:51] rubyonrails530: I just want to get counts of relations.
[11:45:03] rubyonrails530: What is the best way to get those?
[11:45:17] rubyonrails530: Except counter_cache
[11:45:20] jeanre: has joined #RubyOnRails
[11:45:21] jeanre: has joined #RubyOnRails
[11:45:54] Macaveli: has joined #RubyOnRails
[11:48:05] Palsson: has joined #RubyOnRails
[11:48:10] chagel: has joined #RubyOnRails
[11:48:46] tbuehlmann: durexlw, if you don't want to ask the user for credentials every time your scrape, I guess you have to persist them in plain text. if it's the database, memory, local files, whatever. that'll be the point of possible failure. and even if you ask the user for credentials everytime, you still have them in memory. if there's an attack, it doesn't matter where the data is stored
[11:50:00] frishi: has joined #RubyOnRails
[11:51:17] rafaelfranca: has joined #RubyOnRails
[11:53:29] chagel: has joined #RubyOnRails
[11:54:00] mary5030: has joined #RubyOnRails
[11:55:03] durexlw: tbuehlmann: plain text seems very vulnorable
[11:55:37] durexlw: It should be possible to store encrypted values in the db, have the 'key' (to decrypt) stored as an environment var
[11:56:52] durexlw: sevenseacat: env vars would be an option, but it wouldn't allow the users to manage their own credentials... also, given 'a user' has many credentials... it would look pretty clumbsy to manage that in env vars
[11:57:18] ElFerna: has joined #RubyOnRails
[11:57:34] sevenseacat: well when you change the requirements, things happen :P
[11:57:54] durexlw: granted :)
[11:59:42] sandstrom: has joined #RubyOnRails
[11:59:43] chagel: has joined #RubyOnRails
[12:00:18] durexlw: anyone know a retreivable encryption algo in ruby?
[12:04:46] workmad3: durexlw: https://github.com/attr-encrypted/attr_encrypted
[12:04:53] Axilla: has joined #RubyOnRails
[12:05:16] durexlw: workmad3: I came across that same gem a while ago. You ever used it.
[12:05:27] workmad3: durexlw: although be warned - the use-case you're protected against by using that is pretty damn limited (you're basically only protected if someone manages to get into your database without managing to touch your app code)
[12:05:58] workmad3: any setup where the encryption secret and the encrypted data are stored on the same system is pretty flawed tbh
[12:06:15] baweaver: has joined #RubyOnRails
[12:07:04] durexlw: workmad3: how I see it, (i'll use heroku), so I'll store a salt or a key in env variables... then in the rails app, call the env's, and the database contains the encrypted fields
[12:07:28] durexlw: workmad3: what would you suggest?
[12:07:31] qejk: has joined #RubyOnRails
[12:07:51] workmad3: durexlw: depends on how sensitive the data really is
[12:08:59] durexlw: it's not financial or anything: it's a login to a kind of reporting data, but that latter reporting website does contain social security numbers of people... so in the end, it could be pretty nasty
[12:09:25] pawnbox: has joined #RubyOnRails
[12:09:57] workmad3: durexlw: in a heroku setup, the most likely avenue of attack/breach would be the app container (as it's the only bit of publicly known data for a specific app), so any breach would reveal both your key and the database credentials
[12:10:14] workmad3: durexlw: so it's dubious whether you gain any extra security from encrypting that data
[12:10:57] suri: has joined #RubyOnRails
[12:10:59] durexlw: workmad3: what do you mean by 'the app container'?
[12:11:04] workmad3: durexlw: your heroku dyno
[12:11:21] bobbobbins: has joined #RubyOnRails
[12:11:25] workmad3: durexlw: as opposed to the database being attacked directly
[12:11:26] durexlw: so then this mean heroku isn't safe, right?
[12:11:32] sandstrom: has joined #RubyOnRails
[12:11:44] workmad3: durexlw: nothing is safe... it's all about degrees of risk
[12:12:30] workmad3: and understanding the areas where you should pay more attention as likely attack vectors (assuming your app would actually contain important enough data to be worth a dedicated attack)
[12:13:42] durexlw: workmad3: I kinda thought decoupling a key to heroku, to encryption in the code using a reference to that key, to end up with encrypted database fields, would be pretty safe.
[12:14:11] durexlw: code is clean, db is clean and only when heroku get's attacked it's all in the open
[12:14:23] durexlw: unless I'm seeing it wrong off course...
[12:14:32] tbuehlmann: durexlw, if you're application server is corrupted, nothing will help you
[12:14:43] blackmes1: has joined #RubyOnRails
[12:14:44] tbuehlmann: no environment variables, local files
[12:14:49] chipotle: has joined #RubyOnRails
[12:15:32] durexlw: tbuehlmann: fair enough. What would be an alternative?
[12:15:51] workmad3: durexlw: which is why you assess risks - if heroku is breached, everything on their infra is on the line (databases, dynos, server configs, etc.) but it's also going to be the hardest bit of this setup to attack... it's also quite out of your control
[12:16:29] workmad3: durexlw: but your individual app is resting on your own security setup, not heroku's... so it's vulnerable to your own machine being breached and your SSH keys or heroku account being stolen
[12:16:50] workmad3: and if that's lost, then your app's entire config is vulnerable - including the environment variables containing the keys
[12:17:23] durexlw: "my own machine being breached" you mean like say if I loose my password to the heroku account?
[12:17:42] workmad3: durexlw: yup, or your laptop with your heroku oauth token being hacked
[12:18:06] durexlw: workmad3: ok, I see what you're saying
[12:18:44] workmad3: durexlw: so what I'm basically saying is - yes, encrypting your values in the database does add a bit of extra security... but it's against the very specific use-case of heroku being breached, and the attackers making off with the database and *nothing else*
[12:19:04] pawnbox: has joined #RubyOnRails
[12:19:23] sandstrom: has joined #RubyOnRails
[12:19:34] workmad3: it adds no extra security to your machine with access to the heroku app being breached, or to all of heroku's infra being breached... or to heroku's datacenters being raided and their servers being carted off...
[12:19:43] defsdoor: has joined #RubyOnRails
[12:20:07] durexlw: I think in this case the real thread then is my own machine, my own credentials
[12:20:20] FooBarWidget: anybody here using passenger and give me some feedback on the Passenger Library?
[12:20:28] durexlw: the rest is a fair risk, given the data isn't that sensitive
[12:20:32] workmad3: durexlw: that's normally the weak point in many setups :)
[12:21:17] durexlw: workmad3: appart from that vulnerability, would you risk storing user credentials in plain text in a db?
[12:22:08] durexlw: we even encrypt them for our own applications... it seems a bit careless to store credentials of other apps in a less secure way
[12:22:26] workmad3: durexlw: given how easy attr_encrypted is to use and setup, I'd probably do that... and it's possible you'd need to in order to tick some data-protection boxes too
[12:22:41] workmad3: durexlw: just be aware that the security it provides is fairly miniscule :)
[12:23:18] arup_r: I have a model Lead. It has a column called assigned_to which has User id. But, sometimes users are deleted, and model still has the id. which is breaking. I am thinking to guard it like, IxAdmin::User.exists?(2) ? IxAdmin::User.find(2).name : 'unassigned' . Any better way than mine /
[12:23:49] durexlw: I think I understand what you're saying. I hear you saying it only covers the "they steal my db" attack, it doens't cover "they steal my laptopn, i loose my heroku credentials, they hack heroku or my dyno", right?
[12:23:58] FooMunki: has joined #RubyOnRails
[12:23:58] workmad3: durexlw: pretty much
[12:24:58] durexlw: workmad3: say they hack my dyno, they could read my env vars and the code, right?
[12:25:35] workmad3: durexlw: depends on how they manage to gain access, but most paths lead to that, yes
[12:25:59] workmad3: durexlw: and on heroku all they need is your env vars... that would contain your database credentials and your encryption key
[12:26:14] durexlw: workmad3: then I guess a lot of s3 buckets and all their content are either at risk, or it's a pretty accounted risk afterall
[12:27:03] workmad3: most things probably wouldn't stand up to a dedicated attack by someone who knows what they're doing... but most things aren't of enough value to warrant that
[12:27:17] tbuehlmann: I didn't make it clear: having the credentials encrypted in your database is good against attack vectors against your database and you database alone. if your application server is corrupted you're screwed anyway
[12:28:11] workmad3: tbuehlmann: yeah, and in this case the database is heroku postgres - randomised credentials, randomised location, pushed into your app via env vars :)
[12:28:35] workmad3: so attack vector against database is fairly small without the heroku app being compromised first
[12:29:28] futilegames: has joined #RubyOnRails
[12:29:36] durexlw: workmad3: tbuehlmann and that's why you say it add little added value, because of the db being pretty secure already?
[12:29:38] workmad3: durexlw: oh, the other reason to consider encrypting those credentials is if you're using some form of off-site backup
[12:29:49] tbuehlmann: the database is hosted somewhere, so access to that grants access to your stuff. but I get what you're saying, it's lowering possibilities/risks (which is what encryption is about)
[12:29:55] Palsson: has joined #RubyOnRails
[12:30:20] workmad3: durexlw: although ideally you'd encrypt the entire backup in that circumstance, not just some bits of it :)
[12:30:42] tbuehlmann: durexlw, naw. I think of it as two parties that can be attacked, the application server and its infrastructure and the database and its infrastructure
[12:30:47] Axilla: has joined #RubyOnRails
[12:31:11] tbuehlmann: having encrypted credentials in the database protects you from one
[12:31:21] durexlw: tbuehlmann: what I mainly worry about is stuff like rails leaks... say some kind of sql injection is possible, which seems a lot more likely then a heroku-hack, then if credentials are plain in the db, they're visible... whereas there is the key in heroku env's, this kinda eliminates that
[12:31:22] tbuehlmann: so that's a good thing
[12:31:32] workmad3: durexlw: end of the day - it's probably a good idea to encrypt those values, just for a slight increase without introducing much extra complexity in your code (attr_encrypted is very easy to set up and use, doesn't add any real maintenance burden) but don't stop there
[12:31:40] tbuehlmann: that's the application server thing, you're screwed then
[12:31:49] tbuehlmann: what workmad3 says
[12:31:51] workmad3: durexlw: consider the other routes that can be attacked and try to minimes them
[12:32:41] workmad3: durexlw: make sure your machine with heroku access is protected and locked down, make sure you keep on top of vulnerabilities and security patches for rails and any gems you're using, etc.
[12:33:01] durexlw: workmad3: today I see two likely ones: my heroku login credentials / laptop, db views by rails insecurity somehow
[12:33:17] workmad3: durexlw: maybe consider turning on 2fa for your heroku account to make it much harder to brute-force your account
[12:33:33] workmad3: two-factor authentication
[12:33:38] durexlw: *asks his friend google*
[12:33:51] durexlw: yeah, sounds like a good idea indeed
[12:34:06] artto: has joined #RubyOnRails
[12:34:09] chouhoul_: has joined #RubyOnRails
[12:34:48] workmad3: durexlw: it's a shame the app you're integrating with doesn't have some form of oauth mechanism for authentication :(
[12:35:13] tbuehlmann: I also thought of that
[12:35:36] durexlw: workmad3: it's a shame I have to have the app in the first place: if the guys who made it would have made a proper api, this whole shit shouldn't exist
[12:35:42] workmad3: that would reduce some of your burden, as you don't end up storing the user's credentials, just a token that stands in for them (and can be much more easily revoked by either the other app)
[12:35:49] workmad3: hehe :) that too
[12:36:26] durexlw: local government things... not the most open thing when it comes to data
[12:37:14] durexlw: I appreciate the brainstorm workmad3 , tbuehlmann ... it's good to give these things thought indeed
[12:38:14] workmad3: durexlw: no worries :) I like to air these sorts of issues in a public channel every now and then... too many people go 'lets encrypt this! that'll protect me against everything' and stop thinking about security
[12:38:33] workmad3: so a public discussion about the wider-reaching concerns keeps things fresh
[12:38:45] pawnbox: has joined #RubyOnRails
[12:39:07] sp1rs: has joined #RubyOnRails
[12:39:27] tvw: has joined #RubyOnRails
[12:39:50] pyemkey: has joined #RubyOnRails
[12:39:52] durexlw: workmad3: I spend my early years in a cracking community... of all commercial systems to protect software, we had exactly one that wasn't cracked yet at the time... once you've been though that world, you know it's just about slowing down the very dedicated people that are after your info, it's never about "it's safe"
[12:40:02] durexlw: the web is just a whole other story in that department though
[12:40:36] pawnbox: has joined #RubyOnRails
[12:40:36] workmad3: durexlw: haha :) welcome to the other side of the war
[12:40:51] durexlw: way more accessible and when dealing with frameworks, the script kids are just running loose with just about any flaw that turns up
[12:41:17] durexlw: tha's the stuff that worries me most
[12:41:31] workmad3: yeah, more accessible... but also more restrictive, as it's rarer to have immediate access to the entire system in question prior to finding at least some point of attack
[12:41:56] arup_r: no body cares me :p
[12:41:59] durexlw: workmad3: true in some sense, that's why I think that rails itself is the most likely vector
[12:42:06] ferr: Accident belongs_to :truck, truck has_many :accidents, I created truck_id at accidents table, but method Accident.truck= is not valid
[12:42:18] durexlw: arup_r: you forgot an "s" there right? :)
[12:42:20] workmad3: durexlw: misuse of rails is a more common vector :)
[12:42:55] c0defeed: has joined #RubyOnRails
[12:42:55] durexlw: workmad3: agreed
[12:42:59] workmad3: ferr: Accident is the class... you need an instance in order to do anything
[12:43:15] durexlw: workmad3: you been spending much timing thinking about security then?
[12:43:27] workmad3: durexlw: far too much time at some points :/
[12:43:43] c0defeed: How can I figure out which class Ruby is err'ing on when it just gives me a hex number like this: ActionView::Template::Error (undefined local variable or method `entity' for #<#<Class:0x007fc66bb31940>:0x007fc66d9a3d38>)
[12:44:07] rafaelfranca: has joined #RubyOnRails
[12:44:14] durexlw: *in his mind he sees pictures of workmad3 taking his laptop -in a plastic bag- along in the shower so they don't steal it*
[12:44:26] sandstrom: has joined #RubyOnRails
[12:44:27] workmad3: c0defeed: by looking at the stack-trace and seeing where the error is coming from
[12:44:37] workmad3: durexlw: heh :) I'm not quite that paranoid
[12:44:58] c0defeed: Is there no way to map that hex value to a class name
[12:45:04] durexlw: I know, but my mind is that immaginative :)
[12:45:16] workmad3: c0defeed: no, because that is the memory address of an anonymous class
[12:45:58] durexlw: well, thanks man for exchanging your knowledge. It's appreciated. Did a quick search for a few days and nothing really useful came up
[12:46:14] durexlw: gotta run... bank stuff... blah... laterz all
[12:46:34] workmad3: durexlw: full-disk encryption to protect against someone ripping out the drive or reading the bits off disk remotely... password vaults to store various credentials for local use... and I really need to set up 2fa login on my laptop again (OS X update wiped out my local PAM changes and I've not gotten around to putting them back yet)
[12:47:15] chipotle: has joined #RubyOnRails
[12:47:20] durexlw: workmad3: that's pretty safe I think :) oi, cheers :)
[12:47:30] workmad3: durexlw: it's good enough for the low-value stuff I do :D
[12:48:06] sandstrom: has joined #RubyOnRails
[12:49:33] monque: has joined #RubyOnRails
[12:55:01] jenrzzz: has joined #RubyOnRails
[12:55:15] Jeremy1023: has joined #RubyOnRails
[12:57:17] Palsson: has joined #RubyOnRails
[12:58:11] Guest34101: has joined #RubyOnRails
[12:59:44] betax: has joined #RubyOnRails
[13:00:03] _Tariq: has joined #RubyOnRails
[13:00:16] chi6rag: has joined #RubyOnRails
[13:00:46] blackmes1: has joined #RubyOnRails
[13:01:01] dalpo: has joined #RubyOnRails
[13:01:26] rodferso1: has joined #RubyOnRails
[13:01:35] unl0ckd: has joined #RubyOnRails
[13:03:26] betax: Do you recommend RubyMina as a dev enviromnent on Windows?
[13:04:02] bronson: has joined #RubyOnRails
[13:04:23] betax: RubyMine*
[13:05:16] laith: has joined #RubyOnRails
[13:06:02] adaedra: Personally, I wouldn't recommend Windows as a dev environment for Ruby
[13:06:31] LudicrousMango: has joined #RubyOnRails
[13:06:49] betax: I have no choice, hav a Mac at home but only a Win box at work
[13:07:00] betax: VirtualBox is quite laggy
[13:07:06] fernandomm: has joined #RubyOnRails
[13:08:38] tbuehlmann: that's what I'm using, works pretty well for me
[13:09:09] _Tariq: has joined #RubyOnRails
[13:09:44] betax: I'll give the 30 day trial a shot
[13:10:42] mbreedlove: has joined #RubyOnRails
[13:10:51] zworks: has joined #RubyOnRails
[13:13:32] nickjj: betax, have you tried vmware?
[13:14:31] chipotle: has joined #RubyOnRails
[13:17:13] goodcodeguy: has joined #RubyOnRails
[13:18:26] chagel: has joined #RubyOnRails
[13:18:50] sleungcy: has joined #RubyOnRails
[13:18:51] Palsson: has joined #RubyOnRails
[13:19:47] chipotle: has joined #RubyOnRails
[13:20:51] s1|verfox: has joined #RubyOnRails
[13:21:40] krzkrz: has joined #RubyOnRails
[13:24:25] xhoy: rubular.com down?
[13:24:56] xhoy: i cant test a regex, it only posts data no respons
[13:25:15] jeanlinux: has joined #RubyOnRails
[13:25:29] adaedra: I thought you meant the whole site
[13:25:31] xhoy: adaedra: i was confused as well :)
[13:25:47] adaedra: yep, seems to have some issues
[13:25:50] banister: has joined #RubyOnRails
[13:26:06] xhoy: all requests end in a big black hole
[13:27:00] xhoy: alternatives?
[13:27:29] _Tariq: has joined #RubyOnRails
[13:27:45] xhoy: ow i get 504's back now :>
[13:29:48] ppinkerton: has joined #RubyOnRails
[13:31:21] drbayer: has joined #RubyOnRails
[13:31:28] adaedra: There's https://regex101.com/ but it's not ruby-oriented
[13:31:43] xhoy: cli++ :)
[13:32:07] artto: has joined #RubyOnRails
[13:34:19] askhat: has joined #RubyOnRails
[13:37:37] mostlybadfly: has joined #RubyOnRails
[13:40:54] ianfleeton: has joined #RubyOnRails
[13:41:20] chipotle: has joined #RubyOnRails
[13:45:10] nzst: has joined #RubyOnRails
[13:46:22] SeanLazer: has joined #RubyOnRails
[13:53:30] ppinkerton: has joined #RubyOnRails
[13:54:24] moeabdol: has joined #RubyOnRails
[13:56:40] _Tariq: has joined #RubyOnRails
[13:57:34] jenrzzz: has joined #RubyOnRails
[13:57:48] jeanlinux: has joined #RubyOnRails
[14:01:14] nachoman: has joined #RubyOnRails
[14:02:33] Eswar: has joined #RubyOnRails
[14:02:56] jeanre: has joined #RubyOnRails
[14:02:57] jeanre: has joined #RubyOnRails
[14:04:57] nachoman: has joined #RubyOnRails
[14:06:07] bronson: has joined #RubyOnRails
[14:07:10] baweaver: has joined #RubyOnRails
[14:08:04] lacrymology: has joined #RubyOnRails
[14:08:31] _Tariq: has joined #RubyOnRails
[14:10:58] laith: has joined #RubyOnRails
[14:11:54] dalpo: has joined #RubyOnRails
[14:13:06] goodcodeguy: has joined #RubyOnRails
[14:13:49] sleungcy: has joined #RubyOnRails
[14:17:44] Axilla: https://gist.github.com/travisdmathis/8171689fe4043a796092 -- hey guys, i have this issue here where i'm reusing a partial in multiple controllers/views.. in one view it works just fine the link_to that is. In the other view it's submitted as an HTML format, and since it should be submitted as a JS format when doing remote: true there is no tempalte for it. I have tried forcing the format in Rails 4
[14:17:50] Axilla: to be JS, but it has no affect. Any assistance appreciated.
[14:17:59] yellow5: has joined #RubyOnRails
[14:18:45] goodcodeguy: has joined #RubyOnRails
[14:19:11] arup_r: has joined #RubyOnRails
[14:19:50] sonOfRa: has joined #RubyOnRails
[14:20:37] ramortegui_: has joined #RubyOnRails
[14:21:30] jeanre: has joined #RubyOnRails
[14:21:31] jeanre: has joined #RubyOnRails
[14:21:41] mdw: has joined #RubyOnRails
[14:21:43] DmitryBochkarev: has joined #RubyOnRails
[14:23:00] chipotle: has joined #RubyOnRails
[14:24:19] dalpo_: has joined #RubyOnRails
[14:24:45] nzst: Hi, can someone point me to the additional documentation refrenced in this deprecation warning, please? http://paste.lisp.org/display/308126
[14:24:59] sankaber: has joined #RubyOnRails
[14:26:27] chipotle: has joined #RubyOnRails
[14:28:11] barhum2013: has joined #RubyOnRails
[14:28:53] jasmo2: has joined #RubyOnRails
[14:29:47] banister: has joined #RubyOnRails
[14:29:51] BaNzounet: If I do Model.class_method and in class_method I do Model.another_class_method is that normal that Model as the previous scope from class_method applied? -> https://gist.github.com/AlexGaspar/5bff48a46f4bc3859ec3
[14:30:01] sankaber: has joined #RubyOnRails
[14:31:00] uris: has joined #RubyOnRails
[14:31:03] flashpoint9: has joined #RubyOnRails
[14:31:09] crankharder: has joined #RubyOnRails
[14:32:25] durexlw: has joined #RubyOnRails
[14:32:55] artto: has joined #RubyOnRails
[14:34:09] futilegames: has joined #RubyOnRails
[14:35:12] chipotle_: has joined #RubyOnRails
[14:35:22] drbayer: has joined #RubyOnRails
[14:37:44] johnflux: has joined #RubyOnRails
[14:37:44] johnflux: has joined #RubyOnRails
[14:39:02] Pumukel: has joined #RubyOnRails
[14:40:00] bricker: has joined #RubyOnRails
[14:40:36] arup_r: nzst: http://api.rubyonrails.org/classes/Rails/Engine.html
[14:40:38] matthewd: BaNzounet: Yes
[14:41:30] matthewd: BaNzounet: See https://github.com/rails/rails/issues/14003
[14:41:50] artto: has joined #RubyOnRails
[14:42:01] kichawa: has joined #RubyOnRails
[14:42:01] blackmes1: has joined #RubyOnRails
[14:42:10] nzst: arup_r: Thank you :)
[14:43:12] kichawa: hi!, there is no db/migrate dir (https://github.com/opf/openproject-translations)
[14:44:05] kichawa: http://paste.ofcode.org/U4rLM8V44SygvJzsE3K6pc
[14:44:11] kichawa: why is that?
[14:44:27] dopamean_: has joined #RubyOnRails
[14:44:28] BaNzounet: matthewd: thanks for the link
[14:45:08] DmitryBochkarev: has joined #RubyOnRails
[14:45:50] Palsson: has joined #RubyOnRails
[14:47:07] ErhardtMundt: has joined #RubyOnRails
[14:47:16] jeanre: has joined #RubyOnRails
[14:47:17] jeanre: has joined #RubyOnRails
[14:47:54] solars: has joined #RubyOnRails
[14:47:54] ErhardtMundt: I need some help about FactoryGirl
[14:48:26] SteenJobs: has joined #RubyOnRails
[14:48:39] ErhardtMundt: I'm using two transient attributes and I need the first to calculate the second
[14:49:02] ErhardtMundt: do you have any suggestion on how should I implement this?
[14:49:09] arup_r: use block ?
[14:49:19] ErhardtMundt: what do you mean?
[14:50:14] ErhardtMundt: I have `size` and `slot` where `size` is a number and `slot` is [:foo] * `size`
[14:50:49] arup_r: so try slot { [:foo] * size }
[14:51:38] ErhardtMundt: oh, thanks man
[14:51:44] tetraktys: has joined #RubyOnRails
[14:51:44] ErhardtMundt: it did the trick
[14:52:24] arup_r: ahh, Engine is hard.. :/ i don't know why is it working differently in 2 places.. :(
[14:53:27] nzst: Does anyone have a good library or rails / ruby built-in that handles data filtering, possibly within activerecord? I need to build a filter that makes use of multiple tables
[14:53:46] laith: has joined #RubyOnRails
[14:54:23] cabargas: has joined #RubyOnRails
[14:54:23] matthewd: nzst: If you don't want to be pointed to Relation#where, you might need to be a bit more specific
[14:55:02] konsolebox: has joined #RubyOnRails
[14:55:33] allcentury: has joined #RubyOnRails
[14:56:17] nzst: If Relation#where doesn't cut it, what options do I have?
[14:56:44] adaedra: why doesn't Relation#where work?
[14:56:57] rohit: has joined #RubyOnRails
[14:56:57] CLion: has joined #RubyOnRails
[14:57:39] polishdub: has joined #RubyOnRails
[14:57:39] AntiSpamMeta: has joined #RubyOnRails
[14:58:04] ErhardtMundt: has joined #RubyOnRails
[15:01:52] brycesenz: has joined #RubyOnRails
[15:02:11] tambet: has joined #RubyOnRails
[15:02:24] stannard: has joined #RubyOnRails
[15:03:42] Kryptonical: has joined #RubyOnRails
[15:04:04] Guest88505: has joined #RubyOnRails
[15:04:35] dramagods: has joined #RubyOnRails
[15:05:24] Lingo____: has joined #RubyOnRails
[15:05:39] arup_r: has joined #RubyOnRails
[15:05:44] TwinkleHood: has joined #RubyOnRails
[15:07:01] goodcodeguy: has joined #RubyOnRails
[15:08:17] alexhartley: has joined #RubyOnRails
[15:08:32] dramagods: has joined #RubyOnRails
[15:09:26] laith: has joined #RubyOnRails
[15:09:46] ddv: nzst: for searching? https://github.com/activerecord-hackery/ransack
[15:13:10] dramagods: has joined #RubyOnRails
[15:14:47] matt_d_: has joined #RubyOnRails
[15:14:51] VeryBewitching: has joined #RubyOnRails
[15:18:10] tambet: Is there a way to change the key/value used in has_and_belongs_to_many associations in rails 3.2?
[15:18:35] Frem: has joined #RubyOnRails
[15:19:00] tambet: I can change the `foreign_key: 'conversation_id'` option, but it will still use owner object `id` not `conversation_id` for fetching objects
[15:19:23] Ropeney: tambet, can you gist your code so it's more clear?
[15:21:44] codepete: has joined #RubyOnRails
[15:25:12] tenderlove: has joined #RubyOnRails
[15:26:30] flashpoint9: has joined #RubyOnRails
[15:28:34] Ropeney: hows that going tambet?
[15:30:11] tambet: https://codeshare.io/cey4t
[15:30:21] epochwolf: has joined #RubyOnRails
[15:31:19] tambet: I have has_and_belongs_to_many :members defined in Conversation class
[15:32:10] tambet: and it works as expected
[15:32:28] tambet: I want to have same thing on Message
[15:33:34] artto: has joined #RubyOnRails
[15:33:46] durexlw: sup VeryBewitching
[15:34:12] Ropeney: tambet, i think you want association_foreign_key: ?
[15:35:17] rashkov: has joined #RubyOnRails
[15:35:18] tambet: this will still use message id when fetching members
[15:35:24] mary5030: has joined #RubyOnRails
[15:35:31] tambet: but it should use message conversation_id
[15:35:42] xhoy: i have two strings, string.inspect the LOOK the same, but string.length returns 5 chars more.. is there a beter way to look at them?
[15:36:30] rashkov: Do I have to do anything special to receive a request with content-type "multipart/form-data"? It seems to get blocked somewhere upstream of my controller method. Maybe something to do with mime-types?
[15:36:35] xhoy: (a|b).inspect.to_s do look exactly the same! :>
[15:36:50] dima__: has joined #RubyOnRails
[15:36:57] xhoy: but the length differs 15 chars
[15:37:08] xhoy: rashkov: no but the from must be aware
[15:37:31] xhoy: rashkov: have you set remote: true on the form?
[15:37:32] Ropeney: have you tried just member_id ?
[15:37:59] rashkov: xhoy: I'm actually sending it via ajax from an all-javascript app hosted elsewhere. So I am not using the form helper unfortunately
[15:38:00] Ropeney: or does message actually have a conversation_id ?
[15:39:00] xhoy: ooow so you do a request but do not receiven anything back?
[15:39:15] xhoy: you do it in the view?
[15:39:20] xhoy: sounds like a javascript issue?
[15:39:49] tambet: message has conversation_id
[15:40:13] Ropeney: so its no longer a belongs_to_many its just a belongs_to ?
[15:40:21] chubijs: has joined #RubyOnRails
[15:40:54] Ropeney: it can't belong to many if it has a single id field for conversation
[15:40:59] ElFerna: has joined #RubyOnRails
[15:42:48] aegis3121: has joined #RubyOnRails
[15:42:54] workmad3: rashkov: file uploads with ajax are... somewhat annoying
[15:42:58] emachnic: has joined #RubyOnRails
[15:43:38] rashkov: xhoy: well the request definitely reaches the server, and the server responds with a 403 forbidden. It's possible that this is a custom behavior that we set up somewhere upstream. I have to investigate that. The rails log only prints "Started POST "/images" for ::1 at 2016-02-24 10:34:29 -0500" and nothing else, which is unusual
[15:43:40] mary5030: has joined #RubyOnRails
[15:43:41] IFrank00: has joined #RubyOnRails
[15:44:03] solars: has joined #RubyOnRails
[15:44:43] hcnewsom: has joined #RubyOnRails
[15:45:06] workmad3: rashkov: what method are you using for ajax file uploads? hidden iframe upload? is that iframe managing to send the correct authentication headers along?
[15:46:08] workmad3: (a 403 forbidden would imply that your authentication mechanism is rejecting the request :) )
[15:46:14] Ropeney: tambet, or instead of has_many :members, do `delegates :members, to: :conversation`
[15:46:28] xhoy: rashkov: the server is external? since it is hosted somewhere else?
[15:46:39] workmad3: or your authorization mechanism, but I assume from your surprise that the user is meant to be allowed to do this upload
[15:46:45] rashkov: workmad3: I'm using html5's FormData API to pack the data, and $.ajax to send it
[15:46:53] tambet: yep it works, thanks ropeney
[15:47:09] Ropeney: tambet, , u did the has_many or delegate?
[15:47:25] defsdoor: has joined #RubyOnRails
[15:48:01] tambet: has_many :members, through: :conversation
[15:48:23] Ropeney: sweet as, took a bit to understand your structure sorry :)
[15:48:34] rashkov: workmad3: I've set up that controller to not inherit from ApplicationController, which normally has some authenticaiton logic that I should now be bypassing. So I suspect it could be something further upstream. Maybe a CORS issue, or maybe it's a matter of registering the proper mime-type
[15:49:18] goodcodeguy: has joined #RubyOnRails
[15:49:26] workmad3: rashkov: rails wouldn't throw you a 403 for an incorrect mime type
[15:49:40] Ropeney: rashkov, maybe gist some code so we can see :)
[15:50:27] Ergo: has joined #RubyOnRails
[15:50:56] workmad3: rashkov: the absence of logging could indicate CORS issues though... that's probably what I'd investigate first
[15:52:05] pawnbox_: has joined #RubyOnRails
[15:52:59] rashkov: workmad3: thanks, good tips on the 403 and cors.
[15:53:23] rashkov: ropeney & workmad3: here's a paste of the logfile: https://clbin.com/UYgGa
[15:53:30] ferr: I have edit_accident GET /accidents/:id/edit(.:format) accidents#edit, but when I navigate to accidents/1/edit it gets The action '1' could not be found for AccidentsController
[15:56:54] Ropeney: ferr, can you gist the controller view and routes.rb?
[15:59:03] jenrzzz: has joined #RubyOnRails
[15:59:19] jtong: has joined #RubyOnRails
[15:59:31] kies^: has joined #RubyOnRails
[15:59:35] ferr: https://gist.github.com/anonymous/61ab052b4f41152095c3
[15:59:41] Trynemjoel: has joined #RubyOnRails
[15:59:47] Lingo____: has joined #RubyOnRails
[16:02:03] Ropeney: ferr, and the full path your using to access it? code in view?
[16:02:09] dopie: has joined #RubyOnRails
[16:03:47] ferr: localhost:3000/accidents/1/edit
[16:04:40] epochwolf: Hmm... the localhost url gives me: No route matches [GET] "/accidents/1/edit"
[16:05:16] defsdoor: has joined #RubyOnRails
[16:05:27] Ropeney: epochwolf, your running his app on your computer?
[16:05:40] dstarh: has joined #RubyOnRails
[16:05:43] ziyadb: has joined #RubyOnRails
[16:05:45] epochwolf: ropeney: no, I'm running a different one and I'm being a dick.
[16:05:50] Ropeney: ferr, have you tried restarting server? im stumped
[16:05:55] Ropeney: epochwolf, fair enough
[16:06:31] ferr: ropeney: Yea, I did it several times
[16:06:55] blackmes1: has joined #RubyOnRails
[16:06:59] ferr: accidents/new works fine
[16:07:19] Guest34101: has joined #RubyOnRails
[16:07:53] baweaver: has joined #RubyOnRails
[16:08:43] robbyoconnor: has joined #RubyOnRails
[16:08:53] bronson: has joined #RubyOnRails
[16:09:14] DaniG2k: has joined #RubyOnRails
[16:09:38] DaniG2k: hello all. I'm having a small routing problem when running an rspec test.
[16:09:43] DaniG2k: my code is here: https://gist.github.com/DaniG2k/a1eff70c9d9a19e317e5
[16:09:45] Ropeney: ferr, i can't see anything from here; if you create a repo with the whole project i can pull it and take a look
[16:10:00] DaniG2k: basically, im just trying to visit my_article_path(article) within an rspec test
[16:10:31] DaniG2k: but instead of going to the proper page, it's going to this
[16:10:33] DaniG2k: {:action=>"show", :controller=>"articles", :id=>nil, :month=>nil, :section=>#<Article id: 9, title: "Title #1", caption: nil, body: "This is the article body.", created_at: "2016-02-24 16:05:35", updated_at: "2016-02-24 16:05:35", user_id: 8, section: "korea", slug: "title-1", featured: false, editors_pick: false, image: nil, article_attachments: nil, published: true>, :year=>nil}
[16:11:00] epochwolf: DaniG2k: that's a little bit much to paste, please put that in your gist next time.
[16:11:02] DaniG2k: the article object, as you can see from the code, is being generated by FactoryGirl
[16:11:15] DaniG2k: epochwolf: it's already in the gist
[16:11:26] DaniG2k: just wanted to underline the problem :P apologies
[16:12:17] Ropeney: DaniG2k, p artcile.valid? and see if its valid?
[16:12:31] epochwolf: DaniG2k: ApplictionHelper isn't in scope as far as I can tell.
[16:12:34] dalpo: has joined #RubyOnRails
[16:13:00] DaniG2k: ropeney: => true
[16:13:07] epochwolf: ropeney: not relavent. Error is with the path helper. His modified version isn't being called.
[16:13:22] DaniG2k: epochwolf: yea you might be right actually
[16:13:29] Ropeney: as for nvm, its also showing in section: a valid article
[16:13:30] DaniG2k: how do I include them in RSpec do you know?
[16:13:37] epochwolf: DaniG2k: googling now. :)
[16:14:49] epochwolf: DaniG2k: try `include ApplicationHelper` at the top of the file.
[16:15:40] DaniG2k: epochwolf: epic :P that was it
[16:15:43] DaniG2k: shame on me
[16:15:51] epochwolf: I'm not entirely sure that's the *correct* way but it should work.
[16:16:04] epochwolf: You're welcome. :)
[16:17:09] Ergo: has joined #RubyOnRails
[16:17:10] hcnewsom_: has joined #RubyOnRails
[16:18:00] disgrntld: has joined #RubyOnRails
[16:19:08] bricker: has joined #RubyOnRails
[16:23:59] hcnewsom: has joined #RubyOnRails
[16:24:35] yellow5: has joined #RubyOnRails
[16:25:28] drbayer: has joined #RubyOnRails
[16:25:33] boboc: has joined #RubyOnRails
[16:27:56] baweaver: has joined #RubyOnRails
[16:27:56] hcnewsom: has joined #RubyOnRails
[16:32:41] jasmo2: has joined #RubyOnRails
[16:34:14] korzybski: has joined #RubyOnRails
[16:34:53] chouhoulis: has joined #RubyOnRails
[16:35:15] Olipro_: has joined #RubyOnRails
[16:37:31] emachnic: has joined #RubyOnRails
[16:38:07] emachnic: has joined #RubyOnRails
[16:40:05] rashkov: workmad3: Found the issue, I think. It turned out to be the rack-attack gem which was silently blocking the request. It is meant to provide a sort of whitelist/blacklist for various controllers and http actions. Not a very satisfying resolution but glad to be past it
[16:40:18] jeanlinux: has joined #RubyOnRails
[16:44:20] lxsameer: has joined #RubyOnRails
[16:45:26] SteenJobs: has joined #RubyOnRails
[16:45:34] jeanlinux: has joined #RubyOnRails
[16:48:46] nzst: How can I fix this line so I don't keep getting nil errors? i'm chaining a few methods and it's meh `Venue.where(name: params[:event_location]).first.events.pluck(:id)`
[16:48:53] rubyonrails944: has joined #RubyOnRails
[16:49:06] nzst: i use try() sometimes
[16:49:21] solars: I've got a conceptual question regarding exception handling in controllers. is this the right thing to do? https://gist.github.com/solars/1cbe00dbca2a471f19b5 or would you rather send up an exception or a different response?
[16:50:10] matthewd: nzst: Event.includes(:venue).where(venue: { name: params[:event_location] }) ?
[16:52:13] barhum2013: has joined #RubyOnRails
[16:53:18] barhum2013: Hello everyone, is there a way to accept multi-dimensional array in strong_params. I was using param_name: [ ] to accept a single array but it is not working for multi-dimensional ones. Thanks
[16:53:39] rafaelfranca: has joined #RubyOnRails
[16:53:48] czerasz: has joined #RubyOnRails
[16:53:58] Lingo____: has joined #RubyOnRails
[16:54:14] durexlw: laterz all
[16:54:51] corioliss: has joined #RubyOnRails
[16:58:00] smathy: has joined #RubyOnRails
[16:58:17] nzst: matthewd: Thanks, that got me pretty much there
[16:58:23] scoot: has joined #RubyOnRails
[16:59:04] jeanre: has joined #RubyOnRails
[16:59:05] jeanre: has joined #RubyOnRails
[16:59:18] mag42c: has joined #RubyOnRails
[17:00:21] NeoHamled: has joined #RubyOnRails
[17:00:32] jenrzzz: has joined #RubyOnRails
[17:01:24] safety_cut: has joined #RubyOnRails
[17:01:47] lxsameer: has joined #RubyOnRails
[17:03:14] mbreedlove: has joined #RubyOnRails
[17:03:40] Guest34101: has joined #RubyOnRails
[17:07:21] safety_cut: has joined #RubyOnRails
[17:08:49] dopie: has joined #RubyOnRails
[17:11:25] barhum2013: Hello everyone, is there a way to accept multi-dimensional array in strong_params. I was using param_name: [ ] to accept a single array but it is not working for multi-dimensional ones. Thanks
[17:12:26] hcnewsom: has joined #RubyOnRails
[17:12:41] dopie: has joined #RubyOnRails
[17:12:50] nachoman: has joined #RubyOnRails
[17:17:00] XorSec: has joined #RubyOnRails
[17:17:06] dionysus69: has joined #RubyOnRails
[17:17:14] adavia: has joined #RubyOnRails
[17:17:22] Kendos-Kenlen_: has joined #RubyOnRails
[17:19:02] trosborn: has joined #RubyOnRails
[17:20:39] Lingo____: has joined #RubyOnRails
[17:21:44] Kendos-Kenlen_: In an has_one/belongs_to relation, what should I put in my migrations ? For an User and an House model, I have in my "CreateHouse" migration a "t.references :User", is it enought ?
[17:24:06] LudicrousMango: has joined #RubyOnRails
[17:25:56] syngularity: has joined #RubyOnRails
[17:26:35] syngularity: Noob question, how can I conditionally set a config directive in config/application.rb? I naively used if end, but that failed.
[17:26:54] blackmes1: has joined #RubyOnRails
[17:26:58] arup_r: has joined #RubyOnRails
[17:27:26] tbuehlmann: kenndel_, `references :user` looks good. you can also add a `foreign_key: true` option if you want
[17:27:47] tbuehlmann: syngularity, can you gist what you tried exactly?
[17:28:09] siaW: has joined #RubyOnRails
[17:28:12] alexhartley: has joined #RubyOnRails
[17:31:42] jottr: has joined #RubyOnRails
[17:32:29] syngularity: @tbuehlmann http://pastie.org/10735959
[17:33:15] konsolebox: has joined #RubyOnRails
[17:33:47] tbuehlmann: try removing the `do`
[17:34:10] siaW: can someone PLEASE help me? my first time of playing with an API. I am using Faraday. https://gist.github.com/siaw23/1f5ea7ac10ac8e5fd6cf
[17:35:04] ciree: siaw: remove your credentials..
[17:35:04] syngularity: tbuehlmann: doh! Sorry I switch languages and frameworks alot.
[17:35:11] siaW: ciree: ;)
[17:35:21] tbuehlmann: syngularity, happens :)
[17:35:44] ciree: siaw: once you get the auth token
[17:35:49] ciree: now you include it in future requests
[17:36:09] njero: has joined #RubyOnRails
[17:36:10] ciree: so https://the.domain/api/v1/endpoint?access_token=${access_token}
[17:36:21] ciree: https://api.positionly.com/v2/...?access_token=ACCESS_TOKEN
[17:36:24] korzybski: has joined #RubyOnRails
[17:36:26] ciree: they have examples there
[17:36:37] ciree: faraday is what you should continue using
[17:37:08] siaW: ciree: yes i know. but with this link? https://api.positionly.com/v2/...?access_token=ACCESS_TOKEN HOW do i actually use it with Faraday?
[17:37:21] siaW: do i do something like Faraday.get ‘link.com…’?
[17:37:33] goodcodeguy: has joined #RubyOnRails
[17:37:43] siaW: assuming link.com already has the access token pasted
[17:38:32] nachoman: has joined #RubyOnRails
[17:39:14] lsxmonstah: has joined #RubyOnRails
[17:39:49] ciree: Faraday.get('https://api.positionly.com/v2/...', {access_token: my_access_token})
[17:41:55] lsxmonstah: has left #RubyOnRails: ()
[17:42:47] siaW: ok i’ll try it now
[17:43:07] op3nsv: has joined #RubyOnRails
[17:43:44] joshkovach: has joined #RubyOnRails
[17:43:53] hcnewsom: has joined #RubyOnRails
[17:46:04] siaW: has joined #RubyOnRails
[17:46:29] openstruct: has joined #RubyOnRails
[17:47:34] op3nsv: hi guys I am on the getting started guide for rails. I am trying to get the "Hello Rails" part to show up on my localhost but every time I run the server I get this error "IPAddr::InvalidAddressError: invalid address" I googled around but no luck on finding out what was causing it
[17:49:28] machinewar: has joined #RubyOnRails
[17:50:05] machinewar: if I have a model with two different methods that each query a relationship and I call them one after another does that load the assocation into memory twice?
[17:50:18] bronson: has joined #RubyOnRails
[17:50:50] Lingo____: has joined #RubyOnRails
[17:51:06] msyvich: has joined #RubyOnRails
[17:53:01] boboc: has joined #RubyOnRails
[17:54:00] arup_r: machinewar: if you use scope, then it will not be called twice. but no idea what is your actual goal
[17:54:02] scoot: has joined #RubyOnRails
[17:54:18] jxs_: has joined #RubyOnRails
[17:54:29] siaW: ciree: that works. thank you :)
[17:56:47] goodcodeguy: has joined #RubyOnRails
[17:57:23] DoctorMonocular: has joined #RubyOnRails
[17:58:36] sleungcy: has joined #RubyOnRails
[17:59:28] kdough: has joined #RubyOnRails
[17:59:30] jeanre: has joined #RubyOnRails
[17:59:31] jeanre: has joined #RubyOnRails
[18:01:16] jenrzzz: has joined #RubyOnRails
[18:02:19] baweaver: has joined #RubyOnRails
[18:04:02] diegoviola: has joined #RubyOnRails
[18:04:16] ElFerna: has joined #RubyOnRails
[18:08:11] tbuehlmann: arup_r, when the relations are loaded, they indeed are more than once in memory
[18:08:43] tbuehlmann: it's just the active record result that is cached when the same query happens
[18:09:31] cabargas: has joined #RubyOnRails
[18:10:13] czerasz: has joined #RubyOnRails
[18:10:16] rakm: has joined #RubyOnRails
[18:13:17] matthewd: op3nsv: Haven't seen that one before
[18:13:29] matthewd: op3nsv: !gist the full error output & backtrace?
[18:13:29] helpa: op3nsv: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:14:32] Lingo____: has joined #RubyOnRails
[18:15:46] nzst: If I have a controller method and route that looks like `/events_filter?start=asf` How do I set up a form in the rails view to GET or POST those params on submit?
[18:20:29] goodcodeguy: has joined #RubyOnRails
[18:24:47] openstru_: has joined #RubyOnRails
[18:26:53] mikecmpbll: has joined #RubyOnRails
[18:27:11] openstruct: has joined #RubyOnRails
[18:29:03] Toledo|gone: has joined #RubyOnRails
[18:29:48] Pazician: has joined #RubyOnRails
[18:30:15] lubekpl: has joined #RubyOnRails
[18:30:45] mooru: has joined #RubyOnRails
[18:31:20] cschneid_: has joined #RubyOnRails
[18:31:38] hcnewsom: has joined #RubyOnRails
[18:31:46] sbarg: has joined #RubyOnRails
[18:32:10] sbarg: has left #RubyOnRails: ()
[18:32:21] siaW: i’m looking for any link that will show me how to build and API client with Faraday. Google is not helping me much. anyone knows something? it’s urgent :)
[18:33:26] allcentury: has joined #RubyOnRails
[18:36:45] nachoman: has joined #RubyOnRails
[18:37:09] kirillzh: has joined #RubyOnRails
[18:37:52] arup_r: has joined #RubyOnRails
[18:38:37] pixelhandler: has joined #RubyOnRails
[18:38:46] replay: has joined #RubyOnRails
[18:40:11] netzfisch: has joined #RubyOnRails
[18:41:38] Guest34101: has joined #RubyOnRails
[18:42:58] adac: has joined #RubyOnRails
[18:44:29] baweaver: has joined #RubyOnRails
[18:45:54] safety_cut: has joined #RubyOnRails
[18:46:13] safety_cut: has joined #RubyOnRails
[18:47:12] Lingo____: has joined #RubyOnRails
[18:47:21] arup_r: has joined #RubyOnRails
[18:47:52] nzst: the readme, wiki and docs seem OK
[18:49:57] op3nsv: @matthewd https://gist.github.com/anonymous/9cefc5062a54912aebb2
[18:50:20] op3nsv: matthewd: https://gist.github.com/anonymous/9cefc5062a54912aebb2
[18:50:21] Jeremy1023: has joined #RubyOnRails
[18:50:22] Surt_Q: has joined #RubyOnRails
[18:54:43] josephkokenge: has joined #RubyOnRails
[18:57:15] stamina: has joined #RubyOnRails
[18:58:14] brycesenz: has joined #RubyOnRails
[18:58:26] matthewd: op3nsv: I've let someone know about the bug... you should be able to get past it by using http://[::1]:3000/ or something, assuming localhost is resolving to the fe80:: address
[18:58:50] op3nsv: matthewd: thanks!!
[18:59:45] mooru: has joined #RubyOnRails
[19:00:04] FooMunki: has joined #RubyOnRails
[19:01:44] nogic: has joined #RubyOnRails
[19:01:47] jenrzzz: has joined #RubyOnRails
[19:02:11] greghoggard: has joined #RubyOnRails
[19:02:31] n00bDev: has joined #RubyOnRails
[19:02:57] arup_r: has joined #RubyOnRails
[19:04:44] trosborn: has joined #RubyOnRails
[19:05:49] jeanlinux: has joined #RubyOnRails
[19:05:55] emachnic: has joined #RubyOnRails
[19:07:39] kirillzh: has joined #RubyOnRails
[19:07:39] chubijs: has joined #RubyOnRails
[19:10:42] celly: has joined #RubyOnRails
[19:11:05] tambet: has joined #RubyOnRails
[19:12:15] yfeldblum: has joined #RubyOnRails
[19:13:12] kirillzh: has joined #RubyOnRails
[19:13:27] mhoungbo: has joined #RubyOnRails
[19:14:36] mooru: has joined #RubyOnRails
[19:16:29] jenrzzz: has joined #RubyOnRails
[19:16:36] jmignault: has joined #RubyOnRails
[19:17:28] n00bDev: how do i create a object taht depends on the id of a object taht is about to be created?
[19:17:54] n00bDev: i have a user that has a subscription, but subscription needs user_id in order to make it
[19:18:50] theunraveler: has joined #RubyOnRails
[19:19:55] arup_r: has joined #RubyOnRails
[19:20:23] baweaver: has joined #RubyOnRails
[19:20:26] dcope: is the default value for an integer column null?
[19:20:30] Trynemjoel: has joined #RubyOnRails
[19:22:47] sandstrom: has joined #RubyOnRails
[19:22:58] futilegames: has joined #RubyOnRails
[19:23:43] godzillaenlacasa: has joined #RubyOnRails
[19:25:36] sp1rs: has joined #RubyOnRails
[19:26:14] reber: has joined #RubyOnRails
[19:27:02] korzybski: has joined #RubyOnRails
[19:31:57] ElFerna: has joined #RubyOnRails
[19:31:59] yellow5: has joined #RubyOnRails
[19:32:06] mdw: has joined #RubyOnRails
[19:32:29] futilegames: has joined #RubyOnRails
[19:34:29] dopamean_: has joined #RubyOnRails
[19:35:43] pipework: n00bdev: create the new object after the current one has been craeted.
[19:35:46] pipework: created too.
[19:36:20] Macaveli: has joined #RubyOnRails
[19:36:25] pipework: dcope: All default column values are null unless you set null to false, then they must be set or you must provide a default, like `default: 'uuidv4()'` for postgres defaulting to a new v4 UUID.
[19:37:12] xhoy: i have a model with "text" (html stuff) and i would love to diff this with another "text" and give it some color
[19:37:15] xhoy: any toughts?
[19:37:19] adac: has joined #RubyOnRails
[19:38:24] arup_r1: has joined #RubyOnRails
[19:41:07] nzst: In my controller, can I call to and render a partial/template into a variable and pass that variable into my expected template, e.g. #show?
[19:41:42] Lingo____: has joined #RubyOnRails
[19:41:58] jenrzzz: has joined #RubyOnRails
[19:42:46] polishdub: has joined #RubyOnRails
[19:43:52] solars: has joined #RubyOnRails
[19:44:00] slash_nick: Looks like there's only 8 open issues (without attached PRs) having the Rails 5.0.0 milestone attached... https://github.com/rails/rails/issues?utf8=%E2%9C%93&q=is%3Aopen+milestone%3A5.0.0+type%3Aissue
[19:44:04] slash_nick: !soon i think
[19:44:04] helpa: <thing that you want> will be released Soon™.
[19:44:21] EkoZap: has joined #RubyOnRails
[19:44:38] Ergo: has joined #RubyOnRails
[19:44:46] bronson: yep, they're down to the spit-and-polish issues.
[19:45:06] solars: hey, does anyone know a tool like sonarqube for rails/ruby that shows maintainability scores for applications based on code analysis etc? other than rubycritic etc
[19:45:28] slash_nick: ACTION is not regretting his decision to build an api due April 1 on the rails beta
[19:45:49] baweaver: has joined #RubyOnRails
[19:45:53] bronson: solars: have you seen code climate?
[19:45:57] fox_mulder_cp: has joined #RubyOnRails
[19:46:15] slash_nick: solars: flay/flog, codeclimate
[19:46:26] xhoy: nzst: yes you can
[19:46:28] slash_nick: i think flog, not flay
[19:46:46] xhoy: nzst: render_to_string but that is kinda broken since it resests in your respons
[19:47:01] nzst: xhoy: interesting. have you seen content_for in use?
[19:47:04] contradictioned: has joined #RubyOnRails
[19:47:05] nachoman: has joined #RubyOnRails
[19:47:13] xhoy: nzst: nope
[19:47:36] solars: bronson, slash_nick I'm already using flog scores etc, but someone showed sonarqube and it's pretty good, unfortunately I saw that it dropped ruby support due to whatever reason.. I'll have a look at code climate
[19:48:11] mwlang: has joined #RubyOnRails
[19:48:11] tambet: has joined #RubyOnRails
[19:48:47] solars: bronson, slash_nick the nice thing about sonar is that it has an overall maintainability score and shows a history of the scores, which is a good incentive to get better
[19:49:02] bronson: code climate has that too, you might like it
[19:49:26] jeanlinux: has joined #RubyOnRails
[19:49:27] EkoZap: has left #RubyOnRails: ()
[19:49:38] bronson: that's what led me to stop using it... Getting a B is easy, but getting an A required some not-so-nice contortions.
[19:49:52] bronson: And nobody's satisfied with a B. :)
[19:49:58] Vlatiska: has joined #RubyOnRails
[19:51:09] solars: bronson, haha
[19:51:15] solars: but I'm pretty sure you can also adapt the rules?
[19:51:55] mdw: has joined #RubyOnRails
[19:51:57] bronson: at the time there wasn't much config, hope that's changed.
[19:52:26] solars: I'll have a look :) thanks for the suggestion
[19:54:04] Vlatiska: Hello all, i have a question about query
[19:55:22] mooru: has joined #RubyOnRails
[19:56:08] Vlatiska: i have a table Message, with relation to User, but Message have also "sender" row who contain the id of the sender. How i can query the message that belong to one user and load in the same time the sender?
[19:56:43] sled: has joined #RubyOnRails
[19:56:46] xhoy: Vlatiska: in message, belongs_to sender, class: 'User'
[19:57:09] xhoy: Vlatiska: in message, belongs_to sender, class_name: 'User'
[19:57:14] xhoy: Vlatiska: in message, belongs_to :sender, class_name: 'User'
[19:57:17] xhoy: sorry typo :>
[19:57:28] xhoy: and now you can do message.sender => User thing
[19:57:30] sonofdirt: has joined #RubyOnRails
[19:57:39] Vlatiska: Yeah, but in the Message table, i have already user_id, and sender, the two are User id
[19:57:59] netzfisch: has joined #RubyOnRails
[19:58:09] Vlatiska: Can i have two User in relation with my table Message?
[19:58:28] rubyonrailed: has joined #RubyOnRails
[19:58:36] xhoy: i have tables with 5 :)
[19:58:50] xhoy: models with 5 :>
[19:59:07] stamina: has joined #RubyOnRails
[19:59:41] Vlatiska: oh ok, so, how i can specify another belongs to and tell i will not use user_id but sender?
[19:59:52] xhoy: with that line
[20:00:00] xhoy: you can define another belong_to
[20:00:07] xhoy: and then set a classname
[20:00:27] contradictioned: has joined #RubyOnRails
[20:00:27] _bogus_: has joined #RubyOnRails
[20:00:37] ur5us: has joined #RubyOnRails
[20:00:43] Vlatiska: ah ok, i understand now, thx boddy, i will try that :)
[20:00:46] greghoggard: has joined #RubyOnRails
[20:01:37] _bogus_: hi there, i have a model Mapa which has_one Objetivo, which is a model with a few boolean fields that i need to be checkboxes in my form.. whats the best way to do this? im also using bootstrap.. can i have some help on this?
[20:02:00] xhoy: formtastic :>
[20:02:08] xhoy: _bogus_: howmany forms are you building?
[20:02:19] ss_much: has joined #RubyOnRails
[20:02:21] xhoy: but with formtastic you can autogenerate them with eas
[20:02:57] reber: has joined #RubyOnRails
[20:03:10] xhoy: Vlatiska: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html << look at the belongs_to options
[20:03:11] _bogus_: xhoy, for now just one...
[20:03:14] xhoy: Vlatiska: there is list
[20:03:16] emachnic: has joined #RubyOnRails
[20:03:25] xhoy: _bogus_: then you could just genereate a form with checkboxes
[20:03:27] contradictioned_: has joined #RubyOnRails
[20:03:30] _bogus_: xhoy, i pretend to separate it in steps later using a gem, but for now i'm building only one form
[20:03:38] Vlatiska: xhoy if i write something like that, Message.where(user_id: current_user.id).includes(:sender) that will work?
[20:03:44] xhoy: _bogus_: http://guides.rubyonrails.org/form_helpers.html
[20:03:44] _bogus_: i'm trying this : <%= f.check_box :objetivo, { :multiple => true }, 'obj1' %>
[20:03:57] _bogus_: but i get this
[20:03:58] _bogus_: undefined method `to_i' for #<Objetivo:0x007efcb0057a18>
[20:04:01] xhoy: Vlatiska: yes
[20:04:06] xhoy: Vlatiska: afaik it will :>
[20:04:24] xhoy: !gist _bogus_
[20:04:31] laith: has joined #RubyOnRails
[20:04:35] xhoy: _bogus_: post your form in a gist gist.github.com
[20:04:36] Vlatiska: cool thx alot xhoy
[20:04:45] xhoy: Vlatiska: give it a try :>
[20:04:47] NeoHamled: has joined #RubyOnRails
[20:04:55] xhoy: Vlatiska: RoR is amazing for this kind of stuff :>
[20:05:15] Vlatiska: Have a good day all :)
[20:05:18] _bogus_: xhoy, https://gist.github.com/anonymous/af5748a596dbf9b64ecb
[20:06:06] _bogus_: i intend to have 6 checkboxes (one of them will be a 'others' field, which is a string in the model Objetivo)
[20:06:12] xhoy: _bogus_: and objectivo isn't the same model as mapa?
[20:06:18] xhoy: you need to create a nested form
[20:06:33] solars: has joined #RubyOnRails
[20:06:48] Radar: GOOD MORNING
[20:06:54] xhoy: hi Radar :>
[20:07:12] _bogus_: xhoy, no, Mapa has_one Objetivo
[20:07:17] xhoy: _bogus_: http://guides.rubyonrails.org/form_helpers.html#nested-forms
[20:07:22] IFrank00: has joined #RubyOnRails
[20:07:23] adaedra: Greetings from the other side (approx.) of the planet, Radar.
[20:07:26] xhoy: tubbo: bye!
[20:07:50] tubbo: Radar: i used logs.ex and the old rails logs app to illustrate the differences between elixir and ruby to a PM at work last night
[20:08:00] Radar: tbuehlmann: yay :D
[20:08:03] Radar: Tab complete fail
[20:08:07] Radar: tubbo: yay :D
[20:08:12] xhoy: _bogus_: watch this video: http://railscasts.com/episodes/196-nested-model-form-revised?view=comments
[20:08:24] tubbo: we all joked about how we live in such a weird time...wherein we're actually trying to optimize websites that come back in milliseconds to microseconds.
[20:08:29] Olipro: has joined #RubyOnRails
[20:08:50] xhoy: anybody: i am looking for some tool to create nice highlighted diffs of 2 pages (basic html)
[20:09:34] xhoy: it only seems to be possible based on a line, but i would love word highliting
[20:10:05] jeanlinux: has joined #RubyOnRails
[20:11:38] ferr: has joined #RubyOnRails
[20:11:58] sandstrom: has joined #RubyOnRails
[20:12:32] fox_mulder_cp: has joined #RubyOnRails
[20:12:43] tubbo: xhoy: man diff
[20:12:57] xhoy: that is only based on lines :) and doesn't work in a browser
[20:13:06] tubbo: xhoy: iirc, all diffing is based on lines
[20:13:43] xhoy: the weird thing is i have this radiantcms chronical CMS with beautiful formating and hightling (inline etc)
[20:13:44] tubbo: xhoy: actually i think the best way to accomplish that would be to `visit` both pages in capybara and save off the content string, then diff that :)
[20:13:59] xhoy: i have paper_trail so i have 2 versoins
[20:14:15] xhoy: versions, i just need someting to compair that and and some css
[20:15:17] tubbo: has left #RubyOnRails: ("outie 5000")
[20:15:28] tubbo: has joined #RubyOnRails
[20:15:34] tubbo: well that failed
[20:15:41] Contigi: has joined #RubyOnRails
[20:15:44] xhoy: the weird thing i would think EVERY cms has this to show changes in pages
[20:15:48] tubbo: xhoy: why not diff the content between versions rather than the html?
[20:15:49] xhoy: tubbo: yeah radiant failed :>
[20:16:07] tubbo: nah i meant i /part'ed by accident
[20:16:13] xhoy: tubbo: that is fine, but i tought why cant i just gem this :>
[20:16:25] xhoy: its not that i am the first who does this :>
[20:16:26] kpwarr: has joined #RubyOnRails
[20:17:06] tubbo: xhoy: nothing stopping you from making a paper_trail extension.
[20:17:17] tubbo: CA-CAW!!!!!!!!!!!!!!!!!!!!
[20:17:28] kpwarr: so, actions which receive a request with a file extension will automatically try to map the request to a respond_to format based on the file extension?
[20:18:14] tubbo: kpwarr: sort-of, it actually has more to do with the Content-Type and Accept headers
[20:19:22] kpwarr: tubbo: it's not on the browser side is it? I know you can do something like 'ContentType: "json"' if you're making an ajax request, does the browser do the same thing implicitly?
[20:20:51] treehug88: has joined #RubyOnRails
[20:21:50] mostlybadfly: has joined #RubyOnRails
[20:21:55] CLion: has joined #RubyOnRails
[20:22:08] moeabdol1: has joined #RubyOnRails
[20:22:33] tubbo: kpwarr: yes, browsers will almost always try to request stuff as text/html. though i think rails can disregard that and just show you the only type of view defined
[20:22:39] tubbo: or you can set up the default Content-Type
[20:22:45] tubbo: kpwarr: what are you having problems with?
[20:23:16] trosborn: has joined #RubyOnRails
[20:24:43] kpwarr: tubbo: just curious/ going through some tuts. thx!
[20:25:40] bricker: has joined #RubyOnRails
[20:29:22] djellemah: has joined #RubyOnRails
[20:30:18] Pumukel: has joined #RubyOnRails
[20:30:56] Pazician: has joined #RubyOnRails
[20:31:11] emachnic: has joined #RubyOnRails
[20:33:24] yardenbar: has joined #RubyOnRails
[20:34:21] djbkd: has joined #RubyOnRails
[20:34:31] sp1rs: has joined #RubyOnRails
[20:34:37] blackmes1: has joined #RubyOnRails
[20:35:26] bricker: has joined #RubyOnRails
[20:35:52] Lingo____: has joined #RubyOnRails
[20:35:57] jenrzzz: has joined #RubyOnRails
[20:36:16] pawnbox: has joined #RubyOnRails
[20:37:17] _bogus_: xhoy, thanks for the resources... i tried to create a nested form but the fields don't show up... no errors tho
[20:38:02] _bogus_: https://gist.github.com/anonymous/e871bfc743a435584f2a
[20:38:26] _bogus_: sorry, my mistake
[20:38:29] _bogus_: forgot the = after <% tag
[20:38:55] xhoy: , thanks for the resources... i tried to create a nested form but the fields don't show up... no errors tho
[20:39:08] xhoy: _bogus_: and now it works?
[20:39:15] baweaver: has joined #RubyOnRails
[20:42:24] _bogus_: xhoy, hm, not exactly... the fields show up but it doesn't saves to db
[20:42:54] baweaver: has joined #RubyOnRails
[20:43:02] _bogus_: i didn't include the attr_accessible in the model (i suppose this was replaced by strong methods in controller, which i think is properly set)
[20:43:40] tercenya: has joined #RubyOnRails
[20:43:40] _bogus_: there's a @mapa.build_objetivo in the controller's new method , but not sure if i should include this on create method
[20:44:57] dcope: hey all, i just added an integer column to a model. i'm trying to check to see if a value is set but i'm getting a "missing attribute" error. it works fine when the value is non-nil.
[20:45:01] dcope: any ideas?
[20:45:35] trosborn: Hi Rails fam. I am having an issue where I need to – ideally – reset the Rails test database before some or all of my tests are run, using fixtures. Anyone know of a way to do this? I am using minitest && minitest-rails, and just the default fixtures. I hope that makes sense hah
[20:46:20] rubyonrails017: has joined #RubyOnRails
[20:48:14] tfitts: is there an easy way to render an ERB from a string (or database field) and have the erb run with the same context as if it was a file in your views directory? (as in access to all the normal helpers and instance variables that a view file normally has from the controller?
[20:50:34] trosborn: nvm I got it! use_transactional_fixtures = false
[20:50:54] tfitts: trosborn: database_cleaner gem
[20:51:54] jeanlinux: has joined #RubyOnRails
[20:52:20] yellow5: has joined #RubyOnRails
[20:52:29] Radar: p.s. fixtures are bad for reasons I can't go into this morning because my brain isn't yet awke
[20:52:41] Radar: tfitts: Why would you want to do that?
[20:52:52] Radar: tfitts: Why ERB and not something like Liquid?
[20:52:56] Radar: Or Handlebars?
[20:54:00] trosborn: tfitts: thanks!
[20:54:07] trosborn: radar: ill keep that in mind if I continue to have problems
[20:54:23] tfitts: Radar: Some people here are working on a multi-stores implementation for spree and they're in it deep. I'm just hearing about it and the issues they're having and trying to figure out why they are doing what they are doing.
[20:54:50] tubbo: tfitts: the issue with executing ERb from a String is that you're basically eval'ing Ruby
[20:55:04] tubbo: so you're giving the user the ability to e.g. make <% system "rm -rf *" %>
[20:55:09] tubbo: s/make/write
[20:55:11] tubbo: in their template
[20:55:42] tfitts: tubbo: the user in this case would be a trusted admin, but I get what you're saying and don't like it either.
[20:55:59] tubbo: tfitts: is the ERb editable on the web?
[20:56:17] tubbo: one can crack a trusted admin's password in theory
[20:56:43] siaW: ok. so i finally got my head around how to write a SIMPLE API client, that accesses an API. i just tried to pick the name from some account from the API and display it. currently this simple code is displaying the NAME which is what i want. my questions is is this OK? Can I follow the same strategy to display other date from the API? something I’m doing wrong? Something I could do better? https://gist.github.com/siaw23/9cdb33e0915d318f1
[20:57:03] Scient: liquid is there for a reason
[20:57:07] tubbo: siaw: gist 404ed
[20:57:13] Scient: like other templating languages
[20:57:19] Scient: they are usually heavily sandboxed (like liquid)
[20:57:31] Scient: which is not the same at all with stuff like erb
[20:57:37] siaW: tubbo: https://gist.github.com/siaw23/9cdb33e0915d318f1888 it works for me
[20:58:12] Scient: looks like you want to use Oauth2 gem instead siaw
[20:58:32] tubbo: siaw: ahh yeah irc cut you off
[20:59:03] tfitts: looking at liquid now. This is why I was asking. I heard what they were doing and it sounded stupid and overly complicated.
[20:59:24] Scient: liquid has been around for a while
[20:59:34] Scient: I used it several years ago and it was pretty solid back then even
[20:59:39] Scient: im assuming it has progressed now
[20:59:49] tubbo: tfitts: no offense but trying to hack spree in order to support multiple stores is not exactly what i'd want to be doing ;)
[20:59:59] jenrzzz: has joined #RubyOnRails
[21:00:21] arBmind: has joined #RubyOnRails
[21:00:53] tubbo: siaw: looks good to me, especially if it works :)
[21:01:18] pawnbox: has joined #RubyOnRails
[21:01:23] siaW: tubbo: really???? it can’t be that simple? it works. but any tips on security? best practice?
[21:01:26] Mia: has joined #RubyOnRails
[21:01:26] Mia: has joined #RubyOnRails
[21:01:46] tfitts: tubbo: I'm not the one doing it, but after seeing this going on I feel like I should be. :(
[21:01:52] tubbo: siaw: but yeah, that's how you'd read any data in the API. my advice to you is to do a `binding.pry` (or `require 'debug'; debugger` if you don't have Pry installed) and then `fin` until it gives you the actual line number you called the debugger on, then you're in a REPL so you can see what the value of `res` is
[21:02:00] Cohedrin: has joined #RubyOnRails
[21:02:30] tubbo: tfitts: hehe i don't blame you...eCommerce is hard. my company actually sells a spree-like product but it's totally proprietary
[21:02:40] tubbo: it's just way better in almost every way
[21:02:49] arBmind: has joined #RubyOnRails
[21:02:54] tubbo: but it's essentially an eCommerce platform
[21:06:28] sankaber: has joined #RubyOnRails
[21:06:43] teaearlgraycold: So rspec is telling me there are pending migrations and throwing an exception when I call ActiveRecord::Migration.maintain_test_schema!
[21:06:44] tfitts: tubbo: we're a small family business that switched from all retail to almost all ecommerce like 16 years ago. then like 6-7 years ago we started with amazon and that is the vast majority of what we do now, that's why I don't really have much do do with spree or our ecommerce anymore. We brought in my cousin to handle development and project lead on our .com stuff a couple years ago but
[21:06:44] tfitts: he hasn't done well and is on his way out. This multi-stores is kind of his last project and I don't like the way it is going thus far...
[21:07:13] teaearlgraycold: Although That method is designed specifically for handling migrations :P
[21:07:54] teaearlgraycold: I'm running a generator in my rspec helper file that generates a migration, but it's being called /before/ maintain_test_schema, so I wouldn't think that'd be an issue
[21:07:55] jeanlinux: has joined #RubyOnRails
[21:08:24] tfitts: teaearlgraycold: why don't you try taking that out and see if it still throws the error, and then you can know if that's the issue.
[21:09:22] _bogus_: my create action isn't saving to db my nested form, apparently it's everything alright, it is receiving the params just fine, but it doesn't saves to db.. any ideas?
[21:10:11] _bogus_: https://gist.github.com/anonymous/6516df06a12886e6b3f5
[21:10:22] teaearlgraycold: tfitts: commenting out the generator and re running (with the old migration file still left un-migrated) the error still occurs.
[21:10:27] tfitts: _bogus_, does your parent model have accepts_nested_attributes_for :related_models
[21:11:04] teaearlgraycold: Yeah for some reason it's running check_pending! and throwing PendingMigrationError. I guess that method isn't meant to migrate stuff for you?
[21:11:34] shiffles: has joined #RubyOnRails
[21:11:59] _bogus_: tfitts, yes
[21:12:30] _bogus_: there is the model https://gist.github.com/anonymous/fe564e784608abc1bac8
[21:12:57] sled: has joined #RubyOnRails
[21:13:08] tfitts: _bogus_: try changing has_one to has_many: I don't know if you can do nested forms for has_one
[21:13:35] _bogus_: but i can't have many Objetivos in a Mapa model
[21:14:12] tfitts: _bogus_: are you trying to create the Objetivo or update one?
[21:14:18] _bogus_: create, for now
[21:14:21] jeanlinux: has joined #RubyOnRails
[21:15:07] lacrymology: has joined #RubyOnRails
[21:15:27] IFrank00: has joined #RubyOnRails
[21:15:40] yfeldblum: has joined #RubyOnRails
[21:16:50] Lingo____: has joined #RubyOnRails
[21:17:16] NeoHamled: has joined #RubyOnRails
[21:19:25] yardenbar: has joined #RubyOnRails
[21:19:25] moeabdol2: has joined #RubyOnRails
[21:19:48] _bogus_: it should work for has_one relations, i'm looking for some resources on google.. but i still don't get whats wrong with my code
[21:20:51] abhishekvasisht: has joined #RubyOnRails
[21:22:44] siaW: tubbo: thanks :)
[21:23:33] Coldblackice: has joined #RubyOnRails
[21:23:44] tubbo: siaw: no prob
[21:24:15] KevinSjoberg: has joined #RubyOnRails
[21:24:59] siaW: but sounds too easy to me though cause i wrote this first shot (first time) even without any documentation so i was afraid i’m doing something wrong or something better could be done here
[21:25:28] KevinSjoberg: I have a Booking model which belongs_to a lessor and a lessee and a product. When creating a new booking via BookingsController#create I manually set the lessee to current_user and the lessor to product.user. Currently this is being done in the controller. What is the best practices regarding this? The business logic states that the lessee of a new booking is always the currently logged in user and the
[21:25:28] KevinSjoberg: lessor is always the owner of the associated product.
[21:26:59] openstruct: has joined #RubyOnRails
[21:29:07] B1n4r10: has joined #RubyOnRails
[21:30:10] alexhartley: has joined #RubyOnRails
[21:32:01] martin290: has joined #RubyOnRails
[21:32:04] martin290: has left #RubyOnRails: ()
[21:32:56] pixelhandler: has joined #RubyOnRails
[21:33:06] arup_r1: for what ?
[21:33:34] _bogus_: arup_r, my create action isn't saving to db my nested form, apparently it's everything alright, it is receiving the params just fine, but it doesn't saves to db..
[21:33:46] _bogus_: i just got one thing in server's log
[21:33:54] arup_r: any gist ?
[21:33:57] _bogus_: Parameters: {"utf8"=>"✓", "authenticity_token"=>"90QqD/NmW+bddEaNIwlNaAL4ohK0AQMvIEC8+lTze5T9NsMBAtVzO0N/QIAGSMSr2c7O/2ZVRLr+gkuenWiKLQ==", "mapa"=>{"descricao"=>"hardstuff", "palavras_chave"=>"hardstuff", "objetivo"=>{"obj1"=>"0", "obj2"=>"1", "obj3"=>"0", "obj4"=>"1", "obj5"=>"0"}}, "commit"=>"Salvar Mapa"}
[21:33:57] _bogus_: Unpermitted parameter: objetivo
[21:34:21] yellow5: has joined #RubyOnRails
[21:34:21] arup_r: share your controller, model and form
[21:34:23] _bogus_: https://gist.github.com/anonymous/ce4fb2febab961343bf2
[21:34:26] _bogus_: controller
[21:34:26] arup_r: your code seems wrong
[21:34:47] _bogus_: https://gist.github.com/anonymous/cf84ccc38470831efe83
[21:34:47] tfitts: _bogus_: objectivo should be objective_attributes
[21:35:16] tfitts: you're allowing objetivo_attributes but the parameter you'r passing is just objectivo
[21:35:20] arup_r: tfitts: how did you guess ? :)
[21:35:28] tfitts: objetivo*
[21:36:01] arup_r: hm, that is why I asked the form and model to show
[21:36:05] _bogus_: here is the form
[21:36:06] _bogus_: https://gist.github.com/anonymous/a14d53e24f94ef8dcb45
[21:36:15] _bogus_: should i use f.fields_for :objetivo_attributes so ?
[21:36:24] sp1rs: has joined #RubyOnRails
[21:36:44] arup_r: where is model
[21:36:49] josephkokenge: has joined #RubyOnRails
[21:36:58] _bogus_: here https://gist.github.com/anonymous/cf84ccc38470831efe83
[21:37:02] arup_r: you can add all those file in a single gist
[21:37:52] _bogus_: sorry didn realize that
[21:38:47] arup_r: ok.. code looks perfect
[21:38:53] _bogus_: https://gist.github.com/anonymous/236c39b9c163b247a4f0
[21:39:19] smolny: has joined #RubyOnRails
[21:39:25] puff: has joined #RubyOnRails
[21:40:35] loechel: has joined #RubyOnRails
[21:41:20] sp1rs: has joined #RubyOnRails
[21:42:15] ElFerna: has joined #RubyOnRails
[21:42:52] arup_r: no idea. why the params are like that
[21:43:47] solars: has joined #RubyOnRails
[21:44:45] Radar: https://gist.github.com/anonymous/236c39b9c163b247a4f0#file-new-html-erb-L1
[21:44:47] Radar: It's because of this line
[21:44:53] Radar: Your form_for should be operating on a new object.
[21:44:55] Radar: _bogus_: ^
[21:45:06] Radar: _bogus_: <%= form_for @mapa do |f| %>
[21:45:36] cac: has joined #RubyOnRails
[21:46:15] _bogus_: oh my ... i would never guess this !!
[21:46:22] _bogus_: it's working fine now hahaha
[21:46:35] _bogus_: thank you Radar !!
[21:47:44] Radar: 8no worries :)
[21:48:17] uglybandersnatch: has joined #RubyOnRails
[21:49:39] arup_r: I thought :mapa corresponds to @mapa, I read something like in doc. I will reread it again
[21:49:43] P4Titan: has joined #RubyOnRails
[21:50:34] P4Titan: Hello, I am having troubles setting up lighttpd to be the webserver for a rails app. Would anyone be willing to help me?
[21:51:08] tubbo: P4Titan: what's the issue?
[21:51:16] P4Titan: Well, getting started ...
[21:51:42] xploshioon: has joined #RubyOnRails
[21:51:48] P4Titan: From what I understand, I have to create a dispatch.fcgi file
[21:51:53] P4Titan: and use fcgi to link it w/ lighttpd
[21:52:05] P4Titan: Is this correct?
[21:53:00] tubbo: P4Titan: oh, yeah you can do that i think...thought you had a specific problem.
[21:53:13] Radar: dear god.
[21:53:21] Radar: lighttpd is a name I haven't heard in _years_
[21:53:34] Radar: P4Titan: Why are you using lighttpd and not nginx with unicorn or something more... modern?
[21:53:40] Radar: dispatch.fcgi is very 2007.
[21:53:47] Radar: (It's also quite slow)
[21:53:57] P4Titan: I wanted a light weight webserver
[21:54:15] pixelhandler: has joined #RubyOnRails
[21:54:33] Radar: P4Titan: nginx is pretty lightweight and will serve your requests quite quickly.
[21:54:43] tubbo: P4Titan: yeah, fastCGI is (ironically) now a little bit slow compared to just proxying a ruby app server through a unix socket to nginx or apache
[21:55:12] tubbo: i mean you can also use lighttpd for that, doesn't really matter all that much
[21:55:32] P4Titan: so you're saying its better to run rails as is and just redirect requests from the outside via nginx or apache
[21:55:56] Radar: P4Titan: Here is something that was written about tools that are used in this decade: bc.net.au/news/
[21:56:04] Radar: https://www.digitalocean.com/community/tutorials/how-to-deploy-rails-apps-using-unicorn-and-nginx-on-centos-6-5
[21:56:09] Radar: Again with the copy paste fail :(
[21:56:25] P4Titan: so ur an aussie :P
[21:56:29] Radar: Of course.
[21:56:54] hugoangelo: has joined #RubyOnRails
[21:56:55] sleungcy: has joined #RubyOnRails
[21:58:19] P4Titan: ok, it may seem that lighttpd is outdated and I should stick to the main webservers
[21:58:39] tfitts: Radar: do you still like unicorn/nginx over puma?
[21:59:19] Radar: tfitts: I don't mind either way. unicorn is what I picked randomly a year or two ago and it's worked for me and I haven't found a convincing reason to switch.
[21:59:33] Radar: tfitts: I don't want to spend a day of my weekend messing about with config on my server to make the switch :P
[22:00:36] tfitts: Radar: haha, me too. I want to switch but it'll probably be a couple months at least before I make an attempt.
[22:01:28] jsrn_: has joined #RubyOnRails
[22:01:44] hahuang65: has joined #RubyOnRails
[22:03:25] jenrzzz_: has joined #RubyOnRails
[22:03:49] cac: has joined #RubyOnRails
[22:04:17] shiffles: has joined #RubyOnRails
[22:04:32] Guest89194: has left #RubyOnRails: ()
[22:04:46] tubbo: i haven't really noticed much of a difference
[22:04:55] tubbo: between e.g. unicorn, puma, and passenger
[22:08:32] pipework: tubbo: In use?
[22:08:49] maxdoubt: has joined #RubyOnRails
[22:08:52] pipework: I've played with unicorn internals, modified them, and done some neat things with the config lately.
[22:09:03] pipework: Unicorn is extremely easily read.
[22:11:02] Lingo____: has joined #RubyOnRails
[22:11:10] ElFerna: has joined #RubyOnRails
[22:11:50] htmldrum: has joined #RubyOnRails
[22:12:03] tubbo: pipework: yeah that's what i mean, like actually using them. it has more to do with what kind of code you prefer working with
[22:13:11] solars: when using codeclimate on the console, is there any way to get html output? or only text?
[22:13:38] snowy: has joined #RubyOnRails
[22:14:22] tubbo: solars: yeah def. `curl http://codeclimate.com/yourname/yourproject` :P
[22:14:44] IFrank00: has joined #RubyOnRails
[22:15:47] solars: tubbo, I'm only using it in the console :)
[22:16:55] tubbo: solars: nah i don't actually think that's possible
[22:17:21] solars: so you have to use it through github?
[22:17:24] solars: wow that sucks
[22:18:37] P4Titan: has left #RubyOnRails: ("party")
[22:18:46] RahulT: has joined #RubyOnRails
[22:19:59] trinaldi: has joined #RubyOnRails
[22:20:01] uglybandersnatc1: has joined #RubyOnRails
[22:20:15] tubbo: solars: no
[22:20:22] tubbo: solars: you use codeclimate through codeclimate
[22:20:26] tubbo: you don't need github
[22:20:44] tubbo: why not just use Flog and Flay?
[22:21:00] tubbo: like if you don't want the html
[22:21:02] tubbo: or push notifications
[22:22:13] powersurge: has joined #RubyOnRails
[22:22:37] powersurge: is there a way to specify multiple unless clauses in activerecord?
[22:23:21] johnflux: has joined #RubyOnRails
[22:23:21] johnflux: has joined #RubyOnRails
[22:24:25] tubbo: powersurge: no, make a method.
[22:24:26] solars: tubbo, but I want to html
[22:24:38] codepete: has joined #RubyOnRails
[22:24:46] tubbo: solars: you'll probably have to pay for it
[22:25:10] solars: hm weird that they advertise it as free
[22:25:18] solars: if there is nothing to meaningfully display it's output
[22:25:32] pipework: tubbo: Because codeclimate locally is nicer than all that.
[22:25:33] kitsuneyo: has joined #RubyOnRails
[22:25:33] pipework: It's all hooked up.
[22:25:42] jeanlinux: has joined #RubyOnRails
[22:25:43] pipework: You can replicate it though, but it's all open source anyways.
[22:25:49] pipework: local codeclimate-cli
[22:26:04] solars: pipework, but you can only output text or json?
[22:26:14] pipework: solars: My docker-machine vm is outdated atm.
[22:26:17] pipework: Can't connect.
[22:26:31] solars: that means what? :)
[22:26:51] pipework: solars: I use the codeclimate-cli homebrew package.
[22:27:02] solars: but do you get html views or anything like that?
[22:27:06] kitsuneyo: i'm thinking of using wicked to create a multi-step form. do wicked forms always need to have their own controller?
[22:27:09] pipework: solars: I can't check because I can't run it.
[22:27:14] solars: ah, alright
[22:27:15] pipework: I've only used CLI, but I was gonna check.
[22:27:21] kitsuneyo: or could i do it in the model's controller?
[22:27:36] pipework: kitsuneyo: Models don't belong to or have controllers.
[22:27:45] pipework: Controllers use any of the models, but aren't tied to them.
[22:28:13] pipework: Routes -> Controllers -> Whatever -> Maybe models -> Whatever -> Response
[22:28:49] mdw: has joined #RubyOnRails
[22:28:56] Radar: ACTION blinks
[22:29:03] Radar: could've sworn I saw pipework answer a question seriously
[22:29:19] kitsuneyo: pipework yeah, but does a wicked form need its own controller or can i put its action in the controller... with a similar name to the relevant model
[22:29:26] pipework: Radar: Girl scout cookies cloud my judgement.
[22:29:30] Ropeney: has joined #RubyOnRails
[22:30:09] jeanlinux: has joined #RubyOnRails
[22:30:59] cac: has joined #RubyOnRails
[22:31:25] safety_cut: has joined #RubyOnRails
[22:31:41] Pazician: has joined #RubyOnRails
[22:32:58] quazimodo: has joined #RubyOnRails
[22:34:02] cac_: has joined #RubyOnRails
[22:37:19] mary5030: has joined #RubyOnRails
[22:37:35] cemcan21: has joined #RubyOnRails
[22:39:37] rahult_: has joined #RubyOnRails
[22:41:05] mdw: has joined #RubyOnRails
[22:41:45] matthias_: has joined #RubyOnRails
[22:41:57] siaW: can anyone help me with this? https://gyazo.com/4785a54ab02a5c5241d17936025bae13
[22:42:07] siaW: why that uninitialized constant error?
[22:43:34] openstruct: has joined #RubyOnRails
[22:44:50] mary5030: has joined #RubyOnRails
[22:45:27] Lingo____: has joined #RubyOnRails
[22:45:46] _bogus_: hey, is it ok to change the migration filename's timestamp to change the order the migrations are executed ? or is there other better way to do this?
[22:47:53] pipework: solars: It has JSON output.
[22:47:59] pipework: So you can use anything that visualizes that format.
[22:48:13] pipework: `codeclimate analyze -f html`
[22:48:24] brycesenz: has joined #RubyOnRails
[22:48:28] pipework: 'html' is not a valid formatter. Valid options are: json, text
[22:48:43] matthewd: _bogus_: Why do you want to do that?
[22:49:16] matthewd: _bogus_: As long as no-one's run the migration, it should *work*, but it's not really something you should have need to do
[22:49:45] wethu: has joined #RubyOnRails
[22:49:46] _bogus_: i created one model before other, and this first model needs to reference a key to this second model , so this second model needs to be generated first
[22:49:51] cac: has joined #RubyOnRails
[22:50:01] _bogus_: i already rolled back the migrations
[22:50:12] KensoDev: has joined #RubyOnRails
[22:50:49] safety_cut: has joined #RubyOnRails
[22:52:28] baweaver: has joined #RubyOnRails
[22:55:29] solars: pipework, yeah.. but I thought you get something like the online stuff they have
[22:55:40] solars: or any converters, etc
[22:55:53] solars: but the tool outputs only the combined output of the plugins/engines
[22:55:56] solars: not really useful
[22:55:59] sevenseacat: has joined #RubyOnRails
[22:56:09] hello9: has joined #RubyOnRails
[22:56:32] intrigueD: has joined #RubyOnRails
[22:56:52] hello9: is there a consensus as to whether using "eval" to DRY up code is ugly or not?
[22:56:59] hello9: say its only once
[22:59:11] matthewd: hello9: Ugly, and a bad idea, and almost certainly unnecessary
[22:59:50] uglybandersnatch: has joined #RubyOnRails
[23:00:06] hello9: @matthewd thanks, was worred bout that
[23:00:30] djbkd: has joined #RubyOnRails
[23:01:41] matthewd: hello9: To the "unnecessary" point: show some code, and we may be able to offer alternative suggestions
[23:03:05] uglybandersnatc1: has joined #RubyOnRails
[23:05:09] hello9: @matthewd, thanks. I got around it, whilst keeping it DRY.
[23:05:13] pipework: solars: Free is free.
[23:05:33] pipework: hello9: Usually there's no need to eval Strings of Code (SoCs)
[23:07:28] solars: so there seem to be no other tools for ruby code analysis other than rubycritic, free and local
[23:07:34] pipework: solars: What? No.
[23:07:43] pipework: there's flog and flay and other stuff.
[23:07:47] pipework: Lots of code analysis
[23:07:49] kdough: has joined #RubyOnRails
[23:07:50] solars: that's what rubycritic uses
[23:07:54] pipework: .brakeman, all kinds of shit.
[23:08:09] pipework: Are you just talking about code analysis suites?
[23:08:11] solars: yeah but I'm looking for something like codeclimate or sonarqube
[23:08:20] pipework: Ah, suites are neat.
[23:08:39] solars: we basically need a counterpart for sonarqube, that works with rails
[23:08:43] solars: for the team
[23:08:54] pipework: Just build a frontend for parsing and graphing the json data once.
[23:09:01] sled: has joined #RubyOnRails
[23:09:01] pipework: Use d3, cheat and reuse.
[23:09:05] pipework: There's a library for easy d3 graph reuse.
[23:09:08] solars: it doesn't seem to include the actual scores
[23:09:12] nachoman: has joined #RubyOnRails
[23:09:13] solars: only individual output
[23:12:02] IFrank00: has joined #RubyOnRails
[23:15:47] matthewd: Doesn't codeclimate have a whole thing that runs locally now?
[23:16:47] solars: matthewd, it only outputs a text version of the tools output
[23:17:05] solars: which means endless lists etc
[23:18:28] tlaxkit: has joined #RubyOnRails
[23:20:06] mwlang: has joined #RubyOnRails
[23:24:08] sonofdirt: has joined #RubyOnRails
[23:24:25] s1|verfox: has joined #RubyOnRails
[23:33:37] matt_d_: has left #RubyOnRails: ()
[23:37:12] jenrzzz: has joined #RubyOnRails
[23:37:54] duncannz: has joined #RubyOnRails
[23:39:23] ql6wlld: has joined #RubyOnRails
[23:40:33] moei: has joined #RubyOnRails
[23:42:56] kerunaru: has joined #RubyOnRails
[23:47:48] moeabdol2: has joined #RubyOnRails
[23:47:49] sankaber: has joined #RubyOnRails
[23:48:12] lemur: has joined #RubyOnRails
[23:49:08] hcnewsom: has joined #RubyOnRails
[23:50:57] kirillzh: has joined #RubyOnRails
[23:54:32] codesoda: has joined #RubyOnRails
[23:54:44] _bogus_: has joined #RubyOnRails
[23:58:33] rubyonra_: has joined #RubyOnRails