« Back to channel list

#RubyOnRails - 01 April 2017

« Back 1 day Forward 1 day »
[00:00:30] kristofferR: has joined #RubyOnRails
[00:01:11] uksio: has joined #RubyOnRails
[00:01:54] ovaltine: has joined #RubyOnRails
[00:06:44] NotDestru: has joined #RubyOnRails
[00:14:53] willardg: has joined #RubyOnRails
[00:16:00] bman013: has joined #RubyOnRails
[00:17:21] willardg: Has anyone here worked with collection_select in a form?
[00:17:29] willardg: https://gist.github.com/anonymous/819330f68ab1d2ebb499a96e317457f9
[00:18:15] bman013: has joined #RubyOnRails
[00:38:35] alfie: has joined #RubyOnRails
[00:39:46] quazimodo: has joined #RubyOnRails
[00:43:36] jhack: has joined #RubyOnRails
[00:43:36] jhack: has joined #RubyOnRails
[00:47:22] marcdel: has joined #RubyOnRails
[00:48:54] marcdel_: has joined #RubyOnRails
[00:50:18] rakm: has joined #RubyOnRails
[00:53:23] Omnilord: has joined #RubyOnRails
[01:21:01] irishfromua: has joined #RubyOnRails
[01:29:11] zpe: has joined #RubyOnRails
[01:32:58] approaching236: has joined #RubyOnRails
[01:36:53] pwnd_nsfw: mmmm, when simple tests fail, but works in live
[01:37:02] nyaa: has joined #RubyOnRails
[01:47:37] benlieb: has joined #RubyOnRails
[01:49:03] pwnd_nsfw: And then you find out it's one line of stupid that you've missed
[01:49:43] Tempesta: has joined #RubyOnRails
[01:52:40] sunya7a: Is anyone available to help with a question regarding PaperTrail gem?
[01:59:21] fugee: has joined #RubyOnRails
[02:00:11] hipertracker: has joined #RubyOnRails
[02:03:39] hays: has joined #RubyOnRails
[02:04:35] nyaa: has joined #RubyOnRails
[02:06:45] libastral: has joined #RubyOnRails
[02:08:05] benlieb: has joined #RubyOnRails
[02:08:53] benlieb: has joined #RubyOnRails
[02:09:43] benlieb: has joined #RubyOnRails
[02:10:30] benlieb: has joined #RubyOnRails
[02:11:19] benlieb: has joined #RubyOnRails
[02:11:42] quazimodo: has joined #RubyOnRails
[02:12:56] keerthana: has joined #RubyOnRails
[02:17:46] wethu: has joined #RubyOnRails
[02:21:58] mazeinmaze_: has joined #RubyOnRails
[02:31:06] mices: GENDER_TYPES = ['Female', 'Male']
[02:31:25] mices: validates :gender, inclusion: GENDER_TYPES
[02:31:48] mices: <%= f.select :gender, User::GENDER_TYPES, prompt: ('Select your sex') %>
[02:32:37] mices: 1 error prohibited this user from being saved: Gender is not included in the list
[02:32:51] mices: what gives?
[02:33:45] mices: did i define gendre_types wrong or pass it wrong?
[02:34:23] mices: maybe inclusion => GENDER_TYPES
[02:36:58] mochiyoda_: has joined #RubyOnRails
[02:38:24] Jameser: has joined #RubyOnRails
[02:47:29] aajjbb: has joined #RubyOnRails
[02:51:36] duderonomy: has joined #RubyOnRails
[02:55:34] Duckily: has joined #RubyOnRails
[02:55:56] Axsuul: how would you guys stub a query chain in a controller for RSpec?
[02:56:10] willardg: has joined #RubyOnRails
[02:56:25] Axsuul: i.e. I want `User.active.where(banned: false)` to return some doubles
[02:56:49] rakm: has joined #RubyOnRails
[03:01:41] matthewd: axsuul: I wouldn't stub that, personally. But if you want to, perhaps you'd consider having a single higher level class method on User, relieving the controller of knowing quite so much about what/how it wants to filter -- and giving you a more feasible stub target in the process.
[03:02:51] Axsuul: matthewd: gotcha, thanks. I need to stub it because the models the query returns will then be making a http request which I also need to stub
[03:02:58] Axsuul: if that makes sense
[03:04:36] Axsuul: unless you have a suggestion on how to do it better
[03:05:10] matthewd: You could stub that via any_instance, I think
[03:05:41] Axsuul: matthewd: but each model needs to return something different
[03:06:20] Axsuul: i think i got another solution though, thanks
[03:06:30] matthewd: I'm pretty sure the stub can get the instance it's being called on
[03:09:59] nicolasb: has joined #RubyOnRails
[03:18:42] KnownSyntax: has joined #RubyOnRails
[03:31:29] Trynemjoel: has joined #RubyOnRails
[03:37:32] pwnd_nsfw: mices, there's now more than 2 genders, so your code isn't going to work
[03:39:05] pwnd_nsfw: axsuul, yeah maybe you should be moving that query to the model, put it under a method. That'd make it super easy to stub, plus it's in a place that makes a little sense.
[03:39:14] pwnd_nsfw: You can, like, name it 'n stuff.
[03:39:35] mices: should my sn app have a gender model?
[03:40:16] pwnd_nsfw: who knows bro
[03:42:43] pwnd_nsfw: mices, why do you think it might need a model?
[03:44:15] mices: cause there can be multiple genders
[03:44:55] pwnd_nsfw: Right, but will you ever add, or subtract? Or need associations between them and other data? We have no idea what you're trying to accomplish
[03:45:02] pwnd_nsfw: when you ask questions, you have to be more elaborate
[03:45:47] matthewd: mices: How you should model it depends entirely on what you're doing with the information / why you're asking/collecting the information in the first place.
[03:45:52] Jayson_Virissimo: has joined #RubyOnRails
[03:46:12] mices: it was a joke
[03:47:50] ChanServ: +o matthewd
[04:03:39] ChanServ: -o matthewd
[04:31:33] itsgokul: has joined #RubyOnRails
[04:38:00] Guest4722: has joined #RubyOnRails
[04:40:48] zpe: has joined #RubyOnRails
[04:50:20] shinnya: has joined #RubyOnRails
[04:53:00] jenrzzz: has joined #RubyOnRails
[04:53:00] jenrzzz: has joined #RubyOnRails
[05:04:55] hndk: has joined #RubyOnRails
[05:09:49] irishfromua: has joined #RubyOnRails
[05:11:56] willardg: has joined #RubyOnRails
[05:13:04] willardg: has joined #RubyOnRails
[05:13:41] willardg: has joined #RubyOnRails
[05:14:29] willardg: has joined #RubyOnRails
[05:15:22] willardg: has joined #RubyOnRails
[05:16:02] willardg: has joined #RubyOnRails
[05:17:13] Destru: has joined #RubyOnRails
[05:25:38] brendan6: has joined #RubyOnRails
[05:31:21] itsgokul: has joined #RubyOnRails
[06:16:33] jdm: has joined #RubyOnRails
[06:18:54] pickle_: has joined #RubyOnRails
[06:20:34] byteflame: has joined #RubyOnRails
[06:22:47] mochiyoda: has joined #RubyOnRails
[06:33:43] EFknockr: has joined #RubyOnRails
[06:48:37] approaching236: has joined #RubyOnRails
[06:50:23] Jameser`: has joined #RubyOnRails
[06:57:16] pickle_: has joined #RubyOnRails
[07:00:54] Saukk: has joined #RubyOnRails
[07:01:45] Velizar: has joined #RubyOnRails
[07:05:32] Technodrome: has joined #RubyOnRails
[07:05:38] Velizar: Somehow some of my counter_cache columns ended up with value of nil in my development DB (which causes an exception every time I try to read the count they're caching). Any ideas how this happens? I'm worried this might happen in production.
[07:15:58] spicerack: has joined #RubyOnRails
[07:23:24] jeanlinux: has joined #RubyOnRails
[07:38:29] brendan6: has joined #RubyOnRails
[07:40:42] srinidhi: has joined #RubyOnRails
[07:41:27] zpe: has joined #RubyOnRails
[07:58:10] AzaToth: has joined #RubyOnRails
[07:58:42] marr: has joined #RubyOnRails
[08:01:01] jusa: has joined #RubyOnRails
[08:02:58] handicraftsman: has joined #RubyOnRails
[08:02:58] handicraftsman: has joined #RubyOnRails
[08:05:53] quazimodo: has joined #RubyOnRails
[08:19:52] keerthana: has joined #RubyOnRails
[08:21:04] byteflame: has joined #RubyOnRails
[08:23:37] sagax: has joined #RubyOnRails
[08:25:06] Jameser: has joined #RubyOnRails
[08:29:46] pickle_: has joined #RubyOnRails
[08:45:02] coffeejunk: has joined #RubyOnRails
[08:54:47] srinidhi: has joined #RubyOnRails
[08:56:44] jsrn_: has joined #RubyOnRails
[08:58:04] dionysus69: has joined #RubyOnRails
[09:02:32] Fem: has joined #RubyOnRails
[09:04:10] Fem: Good moring everyone, I have a question about how I can pick specific aspects from a object. I get this object back in a OAuth2 flow. I currently use like: `auth.instance_variable_get(:@pre_auth).client.id` to pick a ID from this object, but I don't think this is best practice any idea's would be great!
[09:14:18] Fem: Any tips?
[09:14:31] brendan6: has joined #RubyOnRails
[09:17:44] r3vDev: has joined #RubyOnRails
[09:20:50] r3vDev: has joined #RubyOnRails
[09:23:12] banisterfiend: has joined #RubyOnRails
[09:25:21] willardg: has joined #RubyOnRails
[09:26:14] srinidhi: has joined #RubyOnRails
[09:29:07] srinidhi: has joined #RubyOnRails
[09:31:08] willardg: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[09:32:52] pwnd_nsfw`: has joined #RubyOnRails
[09:34:36] lxsameer: has joined #RubyOnRails
[09:45:45] Andr3as: tbuehlmann: you happen to be here?
[09:45:59] itsgokul: has joined #RubyOnRails
[09:46:07] tbuehlmann: yeah, but a bit busy, answers can take a while
[09:48:14] Andr3as: tbuehlmann: i've queried you.. could you pls take a look when you've some time?
[09:48:45] doublemalt__: has joined #RubyOnRails
[09:55:19] banisterfiend: has joined #RubyOnRails
[10:04:23] pickle_: has joined #RubyOnRails
[10:09:59] handicraftsman: has joined #RubyOnRails
[10:09:59] handicraftsman: has joined #RubyOnRails
[10:21:29] byteflame: has joined #RubyOnRails
[10:24:05] patarr: has joined #RubyOnRails
[10:28:20] r3vDev: has joined #RubyOnRails
[10:31:21] mikecmpbll: has joined #RubyOnRails
[10:34:21] zpe: has joined #RubyOnRails
[10:37:43] maaike: has joined #RubyOnRails
[10:38:06] maaike: Hello! are there people around with some experience in usage with Doorkeeper? ;)
[10:47:57] nOwz: has joined #RubyOnRails
[10:48:38] dionysus69: is this line correctly concatenated ? https://gist.github.com/anonymous/3ba8d0cef92da9a9afc8e83d30670b71
[10:53:02] handicraftsman: has joined #RubyOnRails
[10:56:48] tbuehlmann: dionysus69: have you tried?
[10:57:15] jdm: has joined #RubyOnRails
[11:00:56] darutoko: has joined #RubyOnRails
[11:02:59] netzfisch: has joined #RubyOnRails
[11:12:21] maaike: Reposting my question above ^^
[11:17:56] xixi_: never used doorkeeper, but in general i think its better if you just ask ur question :D
[11:20:55] Duckily: has joined #RubyOnRails
[11:26:22] maaike: @xixi_: haha all right. I'm overwriting a controller of Doorkeeper (authorizations) and put a simple extra if statement around the logging in part. It works, but it still creates a AccessToken which I don't want when my if statement fails. Here is my gist: https://gist.github.com/anonymous/1b76c2c24296c15d057340b3a0af0e83
[11:27:18] xixi_: ive not personally used but i think its generally more appreciated in many channels. :)
[11:27:22] brendan6: has joined #RubyOnRails
[11:27:30] maaike: thanks for the advice
[11:27:55] maaike: Hopefully someone else can point me in the right direction
[11:29:27] xixi_: is ur lines 9-11?
[11:29:59] maaike: My lines 3-7
[11:30:09] pickle_: has joined #RubyOnRails
[11:31:31] maaike: So basically it render's the error if line 6 equals to true, But I still see an AccessToken in my params and in my browser URL.
[11:34:41] King_Rex: has joined #RubyOnRails
[11:48:50] maaike: @xixi_: did you found anything?
[11:49:19] arBmind: has joined #RubyOnRails
[11:50:59] pickle_: has joined #RubyOnRails
[11:51:56] naftilos76: has joined #RubyOnRails
[11:54:32] frojnd: has joined #RubyOnRails
[11:57:23] Lord_Squirrel: has joined #RubyOnRails
[11:57:43] pwnd_nsfw: has joined #RubyOnRails
[11:58:16] Lord_Squirrel: has left #RubyOnRails: ()
[12:06:11] cenrak: has joined #RubyOnRails
[12:06:36] dionysus69: has joined #RubyOnRails
[12:07:46] pickle_: has joined #RubyOnRails
[12:08:57] dionysus69: tbuehlmann: nope, because my app is not in condition to run atm :)
[12:16:03] leafs87: has joined #RubyOnRails
[12:21:55] byteflame: has joined #RubyOnRails
[12:22:42] maaike: I'm overwriting a controller of Doorkeeper (authorizations) and put a simple extra if statement around the logging in part. It works, but it still creates a AccessToken (I can see it in the browser URL and server log) which I don't want when my if statement fails. Here is my gist: https://gist.github.com/anonymous/1b76c2c24296c15d057340b3a0af0e83 I've added line 3-7
[12:28:20] nertzy: has joined #RubyOnRails
[12:32:51] HoierM: has joined #RubyOnRails
[12:33:46] HoierM: has joined #RubyOnRails
[12:40:09] Jameser: has joined #RubyOnRails
[12:43:53] brendan6: has joined #RubyOnRails
[12:51:42] Jameser: has joined #RubyOnRails
[12:51:44] Pumukel: has joined #RubyOnRails
[12:52:41] byteflame: has joined #RubyOnRails
[12:55:45] pickle_: has joined #RubyOnRails
[12:58:03] soahccc: Does anyone know if delayed_job exposes a way to set force_kill_waittime in daemons gem call? I'm afraid I can only pass --no-wait since daemons doesn't expose force_kill_waittime over a CLI argument
[12:58:28] snickers: has joined #RubyOnRails
[13:01:04] cenrak: has joined #RubyOnRails
[13:02:30] mices: has joined #RubyOnRails
[13:14:35] zpe: has joined #RubyOnRails
[13:15:44] cenrak: has joined #RubyOnRails
[13:31:19] am55: has joined #RubyOnRails
[13:51:07] cenrak: has joined #RubyOnRails
[14:00:10] mooser: has joined #RubyOnRails
[14:10:42] pudel: has joined #RubyOnRails
[14:15:38] workmad3: has joined #RubyOnRails
[14:16:47] dyyylan: has joined #RubyOnRails
[14:17:11] DLSteve: has joined #RubyOnRails
[14:46:18] aajjbb: has joined #RubyOnRails
[14:51:38] maaike: Reposting my question: I'm overwriting a controller of Doorkeeper (authorizations) and put a simple extra if statement around the logging in part. It works, but it still creates a AccessToken (I can see it in the browser URL and server log) which I don't want when my if statement fails. Here is my gist: https://gist.github.com/anonymous/1b76c2c24296c15d057340b3a0af0e83 I've added line 3-7
[14:53:46] samiux: has joined #RubyOnRails
[14:53:48] romeoh: has joined #RubyOnRails
[14:54:11] proboszcz: has joined #RubyOnRails
[14:55:35] pickle_: has left #RubyOnRails: ()
[15:00:21] kristofferR: has joined #RubyOnRails
[15:01:57] brendan6: has joined #RubyOnRails
[15:02:46] am55: any way to prevent rails from automatically applying a dst offset to a datetime before saving to db? if I subtract 31 days from 4/1 9am, I get 3/1 8am
[15:03:51] shinnya: has joined #RubyOnRails
[15:10:03] fcser_: has joined #RubyOnRails
[15:12:56] fcser_: has joined #RubyOnRails
[15:15:09] coatezy: has joined #RubyOnRails
[15:28:50] srinidhi: has joined #RubyOnRails
[15:30:13] dionysus69: has joined #RubyOnRails
[15:30:14] JDeen: Hi... I am havign a question on handling not founds on a Rails 5 app... i though raising ActionController::RoutingError and ActiveRecord::RecordNotFound would result 404 (RSpec have_http_status(:not_found)) isn't it? but the test failed. My need is to display a not found kind of page, the default would do. Do i need to configure it?
[15:30:38] samiux: has joined #RubyOnRails
[15:37:30] brendan6: has joined #RubyOnRails
[15:40:10] JDeen: i think i need to expect the exception and in lets say nginx show an error page?
[15:41:44] tbuehlmann: am55: rails saves times in UTC, I wouldn't change that. when retrieving records from the database, rails will convert them to the timezone you configured
[15:42:25] matthewd: jdeen: What is the actual failure you're seeing?
[15:42:31] zpe: has joined #RubyOnRails
[15:43:10] am55: tbuehlmann, how can I get 4/1 9am - 31 days = 3/1 9am and not 3/1 8am
[15:43:24] tbuehlmann: am55: what's the code behind it?
[15:43:48] tomasm-: has joined #RubyOnRails
[15:44:32] xall: has joined #RubyOnRails
[15:45:02] am55: when i compare two values with attributes_before_type_cast, I get the same time value: "2017-03-01 15:14:00" and "2017-04-01 15:14:00"
[15:45:23] am55: but in my view, 3/1 becomes 14:14
[15:45:46] dionysus69: has joined #RubyOnRails
[15:45:53] JDeen: matthewd: a request may end up with RoutingError or a NotFound error... which it does... but i want to test it in a RSpec requst spec that it raise lets say 404...
[15:45:58] tbuehlmann: why do you compare values with attributes_before_type_cast?
[15:46:44] am55: tbuehlmann , in the console, to get actual db value and not client value (is my thinking at least)
[15:47:15] tbuehlmann: am55: can you show some code?
[15:47:47] JDeen: matthewd: when i check for some thing like expect(response).to have_http_status(:not_found) instead it shows that the exception took place and the test fails.
[15:48:34] am55: tbuehlmann https://gist.github.com/anonymous/ef2cbd69d0c2d570a202c7659c62f5aa
[15:49:30] am55: tbuehlmann , I'm cloning datetimes, and replacing the date part with a new date, but keeping the time part
[15:49:42] matthewd: jdeen: Okay.. I'm actually not sure if there's a practical way to have the test see the rescued response, then
[15:49:55] matthewd: jdeen: It'll work in production ¯\_(ツ)_/¯
[15:51:08] tbuehlmann: am55: period.pstart will use the timezone you configured your rails app with
[15:51:25] tbuehlmann: so you could just use that. if the time is wrong when it comes from the database, you already saved it wrong
[15:51:44] matthewd: am55: Why are you using before_type_cast?
[15:52:01] Pumukel: has joined #RubyOnRails
[15:52:19] am55: i'm trying to work with utc in the module
[15:52:31] JDeen: matthewd: thanks, never mind... i will post if i find some thing (y).... that is a nice smily btw...
[15:53:12] helpa: am55: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[15:54:18] matthewd: am55: You seem to be going out of your way to fight built-in Rails behaviour, to your detriment. What was the original problem before you started trying to "solve"?
[15:54:48] am55: I don't know where a dst offset is being introduced automatically
[15:55:35] matthewd: I think you're doing it, by playing with before_type_cast
[15:56:16] am55: i start with a datetime value on 4/1, then clone it to 3/1. db reports same raw value. view applies a dst offset to 3/1.
[15:56:48] am55: ty I'll check that out.
[15:57:18] keerthana: has joined #RubyOnRails
[15:59:29] JDeen: matthewd: this worked! https://github.com/eliotsykes/rspec-rails-examples/blob/f6ba3d6f6f95e9430c3207d0d21e672de4a98359/spec/support/error_responses.rb
[16:00:18] Destru: has joined #RubyOnRails
[16:00:59] matthewd: Ah cool. That seems like something I should've known about :P
[16:03:09] am55: matthewd i get the same results https://gist.github.com/anonymous/d8f21cd96421ed9e274e16c4fa852b15
[16:06:09] am55: I can't figure how to handle dst offsets when doing arithmetic with datetimes
[16:07:38] am55: my view shows 2017-03-02 10:59:00 -0500, 2017-04-02 11:59:00 -0400
[16:09:32] Fire-Dragon-DoL: has joined #RubyOnRails
[16:10:09] matthewd: am55: Updated code please
[16:10:20] am55: db shows "2017-03-02 15:59:00", "2017-04-02 15:59:00"
[16:11:34] am55: https://gist.github.com/anonymous/a6db6953143126e72403852fec979793
[16:12:13] mostlybadfly: has joined #RubyOnRails
[16:12:35] pLaTo0n: has joined #RubyOnRails
[16:14:08] frojnd: has joined #RubyOnRails
[16:15:52] matthewd: am55: Time might do better than DateTime
[16:17:12] matthewd: am55: `DateTime.now + 1.day` returns the same time in the same (wrong) timezone; `Time.now + 1.day` returns the same time in the adjusted (right) timezone (i.e., 25 hours difference)
[16:17:55] am55: hmmm... thanks
[16:18:03] matthewd: (I happen to be 15 minutes away from a DST change)
[16:19:03] pwnd_nsfw`: has joined #RubyOnRails
[16:25:00] hndk: has joined #RubyOnRails
[16:25:24] Andr3as: at the bottom of the hour? we usually change at 2am -> 3am or 3am -> 2am...
[16:25:25] byteflame: has joined #RubyOnRails
[16:29:51] xall: has joined #RubyOnRails
[16:36:17] matthewd: Andr3as: Yes, 3am -> 2am. Not all timezones are whole hours. ";)"
[16:39:17] brendan6: has joined #RubyOnRails
[16:39:52] Andr3as: right.. ;)
[16:40:15] Technodrome: has joined #RubyOnRails
[16:52:48] adavia: has joined #RubyOnRails
[16:56:01] Jasaka: has joined #RubyOnRails
[16:56:14] mochiyoda_: has joined #RubyOnRails
[17:02:45] handicraftsman: has joined #RubyOnRails
[17:03:51] aseibert: has joined #RubyOnRails
[17:07:14] approaching236: has joined #RubyOnRails
[17:07:36] am55: has joined #RubyOnRails
[17:17:48] uks: has joined #RubyOnRails
[17:19:31] xall: has joined #RubyOnRails
[17:47:17] mble: has joined #RubyOnRails
[17:49:51] platoon23: has joined #RubyOnRails
[17:50:54] arBmind: has joined #RubyOnRails
[17:50:59] mble: has joined #RubyOnRails
[17:59:05] byteflame: has joined #RubyOnRails
[18:06:23] fl4sh_: has joined #RubyOnRails
[18:07:08] GodFather: has joined #RubyOnRails
[18:07:48] byteflame: has joined #RubyOnRails
[18:27:40] Aherin: has joined #RubyOnRails
[18:31:37] truenito: has joined #RubyOnRails
[18:31:46] meoblast001: has joined #RubyOnRails
[18:36:27] meoblast001: has joined #RubyOnRails
[18:37:23] frojnd: has joined #RubyOnRails
[18:41:17] GodFather: has joined #RubyOnRails
[18:41:29] nahtnam: has joined #RubyOnRails
[18:43:52] adavia: Can i update all my associations in the console doing something like Survey.all.each { |s| s.answers.update_all(survey_id: s) }
[18:49:25] Simplicity: has joined #RubyOnRails
[18:51:50] am55: has joined #RubyOnRails
[18:55:13] jusa: has joined #RubyOnRails
[18:56:01] FoolsGambit: has joined #RubyOnRails
[18:56:02] SiliconDon: has joined #RubyOnRails
[19:02:09] SiliconDon: hello, I was wondering, what is the general recommendation for local rack servers? In other words: pow vs puma-dev vs invoker vs something else.
[19:03:02] ericwooley: has joined #RubyOnRails
[19:03:40] djbkd: has joined #RubyOnRails
[19:04:01] tbuehlmann: I go with only puma if a port != 80 is okay and with nginx reverse proxying puma if I need port 80
[19:04:41] ericwooley: has joined #RubyOnRails
[19:05:19] ericwooley: I need some help integrating webpack, I am following this guide, http://kevinold.com/2015/02/04/configure-webpack-dev-server-and-react-hot-loader-with-ruby-on-rails.html
[19:06:24] ericwooley: I have config.action_controller.asset_host setup to redirect to my webpack dev server, but rails is requesting files with extra stuff appended http://localhost:5000/<my filename>.self-09da7c1c1a730ad86c9b3cb16a28dd78b9fcc8ab32ec7fce3a5c2a8285e838fe.js?body=1
[19:06:47] ericwooley: .self-09da7c1c1a730ad86c9b3cb16a28dd78b9fcc8ab32ec7fce3a5c2a8285e838fe.js?body=1 is all extra stuff. Does anyone know how I can get rid of it
[19:07:18] ericwooley: I'm fairly new to rails, and working with a large codebase. I am a bit lost on this
[19:08:47] ahrs: has joined #RubyOnRails
[19:11:23] adavia: Can i update all my associations in the console doing something like Survey.all.each { |s| s.answers.update_all(survey_id: s) }
[19:12:00] tildes: has joined #RubyOnRails
[19:12:33] SiliconDon: Thanks @tbuehlmann. The reason I ask is I've tried and failed to move from pow to puma-dev to no avail. For some reason bundler/puma keeps looking at ~/.config/ and gives me an "EISDIR". https://gist.github.com/donaldw/de20fcf8260424917150c7159262c109 Meanwhile just using puma works ¯\_(ツ)_/¯
[19:22:44] ericwooley: alright, figured out it was fingerprinting. Does anyone know how I can disable the .self.js being added to files, but only for some files?
[19:23:13] sunya7a: what is the meaning of a method definition where the parameter is followed by a colon? for example def myMethod(param1:, param2:)
[19:25:32] marcdel: has joined #RubyOnRails
[19:30:08] ericwool_: has joined #RubyOnRails
[19:30:25] ericwool_: Got disconnected, did anyone answer me by any chance?
[19:38:51] SiliconDon: has joined #RubyOnRails
[19:39:39] SiliconDon: Auuurgh I'm an idiot. It was a $CONFIG environment variable that I'd set years ago that was messing it up.
[19:42:10] dionysus69: has joined #RubyOnRails
[19:52:31] Aherin: has joined #RubyOnRails
[19:55:41] nahtnam: Hey, I am trying to order by the sum of the has many between a certain date. Kind of hard to explain but basically I have @people = Person.all and I want to order that by this: @person.entries.where('date >= ?', @start_date).sum(:workouts) where @person is a person in @people
[19:55:43] jenrzzz: has joined #RubyOnRails
[19:55:57] jenrzzz: has joined #RubyOnRails
[20:00:59] Technodrome: has joined #RubyOnRails
[20:02:52] zpe: has joined #RubyOnRails
[20:06:18] romeoh: has joined #RubyOnRails
[20:08:41] jphase: has joined #RubyOnRails
[20:10:56] am55: matthewd tbuehlmann i seem to have worked things out
[20:11:42] am55: if you're interested
[20:11:43] am55: https://gist.github.com/anonymous/b7af498f56d6cbe6ba1a5e42b2184974
[20:12:51] am55: I think the trick is to load new times into instance variables so that AR applies DST offset. Then use the applied offset to rewrite the time
[20:14:20] am55: so now when I subtract 31 days from April 1, 2017 4:08pm, I get Mar 1, 4:08pm instead of 3:08
[20:15:51] am55: tbuehlmann I think this might be what you were suggesting
[20:17:43] tildes: I'm trying to learn about rails security, and I am a bit confused about rate limiting. Are rack-middleware gems such as rack-attack or rack-throttle the best way to rate limit a rails app? What can be done on web server level? I assume rate limiting is not a Rails feature as it is not mentioned on Rail security guides? If it's a good and common thing to do, why not include it? :)
[20:19:12] tildes_: has joined #RubyOnRails
[20:21:04] marcdel: has joined #RubyOnRails
[20:36:40] Robtop__: has joined #RubyOnRails
[20:39:41] havenwood: tildes_: A common setup is to reverse proxy from Nginx to your Rack webserver. If you're doing that you can rate limit in Nginx: https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#example
[20:40:06] havenwood: tildes_: Or yeah, Rack middleware.
[20:42:28] tildes_: havenwood: that's interesting, thanks
[20:43:49] duderonomy: has joined #RubyOnRails
[20:49:13] tildes_: rails security guide also mentions "header injection" and "remember to escape these header fields, too", but doesn't really tell where you should do it, and whether it is still relevant for newer rails versions
[20:51:00] tildes_: Ok, it's there, "Make sure you do it yourself when you build other header fields with user input."
[20:52:46] jdm: has joined #RubyOnRails
[20:56:38] Suslov: has joined #RubyOnRails
[20:56:40] marcdel: has joined #RubyOnRails
[20:59:38] hive-mind: has joined #RubyOnRails
[21:09:28] banisterfiend: has joined #RubyOnRails
[21:14:48] djbkd: has joined #RubyOnRails
[21:15:50] romeoh: has joined #RubyOnRails
[21:20:13] Fernando-Basso: has joined #RubyOnRails
[21:24:46] bga57: has joined #RubyOnRails
[21:51:31] jenrzzz: has joined #RubyOnRails
[21:51:31] jenrzzz: has joined #RubyOnRails
[21:52:32] treefrob_: has joined #RubyOnRails
[21:56:29] Cork: has joined #RubyOnRails
[21:56:33] ruurd: has joined #RubyOnRails
[22:08:37] doublemalt__: has joined #RubyOnRails
[22:16:50] romeoh: has joined #RubyOnRails
[22:17:32] Tempesta: has joined #RubyOnRails
[22:19:11] Technodrome: has joined #RubyOnRails
[22:38:35] pwnd_nsfw: has joined #RubyOnRails
[22:42:12] GodFather: has joined #RubyOnRails
[22:45:03] naprimer_2: has joined #RubyOnRails
[22:54:24] zpe: has joined #RubyOnRails
[23:10:14] samgrani_: has joined #RubyOnRails
[23:27:45] bga57: has joined #RubyOnRails
[23:41:04] tetraktys: has joined #RubyOnRails
[23:47:07] Coldblackice: has joined #RubyOnRails
[23:52:24] MEATCHICKEN: has joined #RubyOnRails
[23:52:24] Jameser: has joined #RubyOnRails
[23:53:14] MasterAsia: Any agencies/individuals with freelance work? Looking to fill my schedule up a bit(wrong ch maybe?)
[23:54:17] arBmind: has joined #RubyOnRails