« Back to channel list

#RubyOnRails - 09 May 2018

« Back 1 day Forward 1 day »
[00:00:33] cagomez: has joined #RubyOnRails
[00:02:16] quazimodo: has joined #RubyOnRails
[00:04:37] safetypin: has joined #RubyOnRails
[00:09:22] GodFather: has joined #RubyOnRails
[00:18:57] arathald: has joined #RubyOnRails
[00:21:11] _aeris_: has joined #RubyOnRails
[00:21:29] jnollette: has joined #RubyOnRails
[00:23:02] _aeris_: has joined #RubyOnRails
[00:24:18] pharma_joe: has joined #RubyOnRails
[00:25:36] fox_mulder_cp: oh. i want create install generator for my engine like devise:install. how i can name in in rails g generator options?
[00:28:53] fox_mulder_cp: now it showed like MyAppInstall:MyAppInstall (
[00:38:59] safetypin: has joined #RubyOnRails
[00:46:52] Technodrome: has joined #RubyOnRails
[00:56:46] sevenseacat: has joined #RubyOnRails
[01:07:00] alfiemax: has joined #RubyOnRails
[01:07:48] cagomez: has joined #RubyOnRails
[01:12:23] Technodrome: has joined #RubyOnRails
[01:25:23] duderonomy: has joined #RubyOnRails
[01:26:12] alfiemax: has joined #RubyOnRails
[01:29:36] pharma_joe: has joined #RubyOnRails
[01:36:01] Dimik: has joined #RubyOnRails
[01:49:04] GodFather: has joined #RubyOnRails
[01:51:29] mostlybadfly: has joined #RubyOnRails
[01:56:22] andrewray: has joined #RubyOnRails
[01:57:50] andrewray: MyModel.last.read_attribute_before_type_cast('updated_at').class.name < it's Time, not String. what gives?
[01:59:55] andrewray: same for updated_at_before_type_cast
[02:03:39] alfiemax_: has joined #RubyOnRails
[02:06:28] fox_mulder_cp: what are you want?
[02:07:38] Radar: andrewray: why do you expect it to be a string?
[02:07:40] dipnlik: has joined #RubyOnRails
[02:09:04] fox_mulder_cp: try to use me gem engine into my main app, but main application can't find my engine:install generator. in test engine app all okey. what i miss? application initializer, some else?
[02:10:00] andrewray: A postgres `timestamp` returns a string, which I expected
[02:10:17] andrewray: mysql doesn't store ruby Time classes internally, so I'd expect it to also be a strin
[02:10:27] helpa: 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
[02:12:05] fox_mulder_cp: Radar: it's you write me or andrewray ?
[02:12:13] Radar: fox_mulder_cp: andrewray
[02:12:50] andrewray: Radar: you can just say "I don't know" :P
[02:13:07] andrewray: unless you do know why postgres and mysql return different before cast types for a date-y column
[02:13:25] andrewray: I wonder if i'm doing some weird serialization that's hijacking it
[02:13:26] Radar: andrewray: I would say "I don't know" if I knew what it is that I didn't know about.
[02:13:59] Radar: I feel like you've introduced us to a problem halfway through.
[02:13:59] Saukk: has joined #RubyOnRails
[02:20:31] fox_mulder_cp: so, how i can properly use engine:install generator from my main app? routes, controllers works ok, but model and migrations from engine:install generator can;t be executed
[03:09:43] orbyt_: has joined #RubyOnRails
[03:10:36] veex: has joined #RubyOnRails
[03:13:48] veex: Hi, could someone help me understand how you guys handle timezone abbreviations in Rails? I'm interested in TZ abbreviations instead of UTC offset.
[03:19:18] veex: For example for "Lisbon" I get "WEST" but for "Buenos Aires" I get "-03" when queried for `.zone`. `Time.parse('Wed, 09 May 2018 00:17:12').in_time_zone('America/Buenos_Aires').zone` yields `-03` whereas `Time.parse('Wed, 09 May 2018 00:17:12').in_time_zone('Europe/Lisbon').zone` yields `WEST`.
[03:39:01] cschneid_: has joined #RubyOnRails
[03:51:10] dogweather: has joined #RubyOnRails
[03:56:57] safetypin: has joined #RubyOnRails
[04:43:18] dogweather: Does Rails have a bug with RoutingError for JS requests that triggers CSRF verification problems?
[04:44:15] dogweather: My app crashes with "Security warning: an embedded <script> tag on another site..." when an unknown .js file is requested.
[04:47:16] tejasmanohar: has joined #RubyOnRails
[05:18:45] conta: has joined #RubyOnRails
[05:20:32] arooni: has joined #RubyOnRails
[05:23:33] vedu_: has joined #RubyOnRails
[05:36:58] andrewray: has joined #RubyOnRails
[05:49:14] andrewray: has joined #RubyOnRails
[05:53:01] dionysus69: has joined #RubyOnRails
[05:59:33] reber: has joined #RubyOnRails
[06:03:46] apeiros: has joined #RubyOnRails
[06:14:40] apeiros__: has joined #RubyOnRails
[06:15:49] eckhardt: has joined #RubyOnRails
[06:21:47] conta: has joined #RubyOnRails
[06:35:34] KeyJoo: has joined #RubyOnRails
[06:36:36] KeyJoo: has joined #RubyOnRails
[06:51:01] Technodrome: has joined #RubyOnRails
[07:12:45] conta: has joined #RubyOnRails
[07:17:44] dogweather: has joined #RubyOnRails
[07:18:25] Technodrome: has joined #RubyOnRails
[07:21:49] conta: has joined #RubyOnRails
[07:23:38] lunarkitty7: has joined #RubyOnRails
[07:26:56] KeyJoo: has joined #RubyOnRails
[07:26:58] lunarkitty7: has joined #RubyOnRails
[07:34:19] dogweather: has joined #RubyOnRails
[07:35:41] defsdoor: has joined #RubyOnRails
[07:39:12] cschneid_: has joined #RubyOnRails
[07:43:51] dogweather: has joined #RubyOnRails
[07:52:42] KeyJoo: has joined #RubyOnRails
[07:56:59] KeyJoo: has joined #RubyOnRails
[07:57:52] KeyJoo: has joined #RubyOnRails
[08:05:00] dogweather: has joined #RubyOnRails
[08:11:54] badeball: has joined #RubyOnRails
[08:15:00] marr: has joined #RubyOnRails
[08:16:38] za1b1tsu_: has joined #RubyOnRails
[08:41:05] dogweather: has joined #RubyOnRails
[08:48:02] Psy-Q: any recommendations for a state machine library? state_machine is old and hasn't been updated in ages, but it seems popular?
[08:52:51] ur5us: has joined #RubyOnRails
[08:53:31] ur5us: has joined #RubyOnRails
[08:56:22] dang`r`us: without knowing much of the ruby library world ... what exactly do you want to implement? (given state machines are rather low level)
[08:57:08] sevenseacat: has joined #RubyOnRails
[08:57:38] Psy-Q: just a simple way to keep some jobs to be executed in a DB (and the rails part gives a REST API to that data). so jobs can be pending, started, failed, cancelled, restarted, with some constraints on each transition
[08:58:12] dminuoso: Psy-Q: You can easily model this yourself
[08:58:21] Psy-Q: i found Statesman now and that seems very simple and also persists the states via ActiveRecord and wraps stuff in transactions, i'm guessing that could do the job: https://github.com/gocardless/statesman
[08:59:23] Psy-Q: dminuoso: i was starting on my own thing but then i started wondering about restricting transitions and all that, i'm not good enough to write a nice generic solution for that which would be as easy to read as what Statesman seems to do
[08:59:29] dminuoso: Psy-Q: Usually I just pull some `ValidTransitions = { :closed => :open, :open => [:closed, :pending]) }` .. out of the air
[08:59:59] dminuoso: Psy-Q: Libraries only become interesting if you want to model the state machine with some formal language
[09:00:47] dang`r`us: hmm, also maybe search for a job gem instead
[09:01:02] Psy-Q: the jobs don't run inside the system itself
[09:01:24] Psy-Q: some job runners (agents) pull jobs they need to execute on a bunch of other systems from this REST API, and they need to report their state back to it
[09:01:37] dang`r`us: fair enough
[09:01:39] Psy-Q: if there's a ready-made thing for that, i'm curious to hear about it :)
[09:01:48] dminuoso: Psy-Q: Let me give you a quick rough idea
[09:01:57] dminuoso: You really dont need a ready-made thing for what you described
[09:02:44] dogweather: has joined #RubyOnRails
[09:03:15] Psy-Q: dminuoso: no, i meant a ready-made thing not for the state machine necessarily, but for keeping a central job repository and distributing the jobs to n agents on n servers
[09:03:39] Psy-Q: i know about AWX/Tower that could do that, and we tried that, but it has so many extra features we don't actually need, so we're aiming for something simpler now
[09:03:39] dminuoso: Psy-Q: sidekiq?
[09:04:35] Psy-Q: the ruby part doesn't execute the jobs, it just keeps track of what jobs to run on which servers. the servers have agents that pull their specific jobs and run them there (written in python and bash)
[09:04:46] dminuoso: Psy-Q: Roll your own
[09:05:04] Psy-Q: good, then that's the same conclusion we came to :)
[09:05:39] Psy-Q: i'll go with my own broken state transition thing for a start, if i can't manage or produce more problems than i solve, i will look at Statesman i guess
[09:06:01] Psy-Q: the DSL-ish syntax they have there seems very clean: https://github.com/gocardless/statesman#usage
[09:06:32] dachi: has joined #RubyOnRails
[09:07:19] dminuoso: Psy-Q: It's really easy to roll your own version of that
[09:07:56] dminuoso: But from what I can tell statesman seems cleanly written that you can instantly jump into the source code and understand it
[09:08:07] dachi: Hi. Could you help if you can please. I'm using gem that accepts Authorization header on incoming request, and I need to set it from GET params when in incoming request. Is that possible? Trying to set request header in ApplicationController's before action won't help I guess...
[09:08:58] dminuoso: dachi: Where does the gem operate in?
[09:09:06] dminuoso: dachi: Is it in a filter or a rails middleware?
[09:10:22] dachi: It's a gem for Devise, devise-jwt. I think it uses warden and rails middleware.
[09:10:53] dachi: Can I set GET param to Header somewhere before ApplicationController?
[09:11:53] dachi: I'd use XHR, but I need to stream a file download + pass authorization.
[09:12:10] dachi: * with a single request.
[09:13:11] tbuehlmann: dachi: if it needs a specific header, why don't you set it client side?
[09:13:39] dachi: I was setting headers for all request with axios
[09:14:03] dachi: But this time I have something like <a href="attachment/file.eml">
[09:14:15] dachi: Which need to download a file
[09:14:28] dachi: I can't set header with <a>
[09:14:46] dachi: So I thought I'd use something like href="attachment/file.eml?jwt_token=jasdjasjdja"
[09:15:08] dachi: I don't think I can stream file download with axios
[09:15:40] dang`r`us: jwt is not worth it in most cases
[09:16:06] dogweather: has joined #RubyOnRails
[09:16:11] dang`r`us: I mean, if you do have a complex infrastructure, and use them as kind of a one time ticket, you can
[09:16:12] lupine: also, avoid putting credentials in query strings
[09:16:32] lupine: they'll only end up getting logged
[09:16:36] mikecmpbll: has joined #RubyOnRails
[09:17:27] dachi: lupine: thanks
[09:17:49] dachi: I'll try to write something with iframe then.
[09:17:57] dachi: Thanks for reading about my question.
[09:24:36] dogweather: has joined #RubyOnRails
[09:30:57] schneider1: has joined #RubyOnRails
[09:33:31] jottr: has joined #RubyOnRails
[09:44:52] Tempesta: has joined #RubyOnRails
[09:47:22] Fernando-Basso: has joined #RubyOnRails
[09:54:42] mostlybadfly: has joined #RubyOnRails
[09:57:37] dogweather: has joined #RubyOnRails
[09:58:12] pharma_joe: has joined #RubyOnRails
[09:59:44] schneider1: has joined #RubyOnRails
[10:05:36] kapil___: has joined #RubyOnRails
[10:07:37] Cyrus: has joined #RubyOnRails
[10:08:18] dogweather: has joined #RubyOnRails
[10:09:12] schneider1: has joined #RubyOnRails
[10:15:44] GodFather: has joined #RubyOnRails
[10:16:18] ur5us: has joined #RubyOnRails
[10:18:13] conta: has joined #RubyOnRails
[10:18:35] schneider1: has joined #RubyOnRails
[10:23:09] hfp_work: has joined #RubyOnRails
[10:23:24] dogweather: has joined #RubyOnRails
[10:24:50] GodFather_: has joined #RubyOnRails
[10:26:53] deramius: has joined #RubyOnRails
[10:27:52] schneider1: has joined #RubyOnRails
[10:36:19] dogweather: has joined #RubyOnRails
[10:37:11] schneider1: has joined #RubyOnRails
[10:37:47] GodFather: has joined #RubyOnRails
[10:45:19] duderonomy: has joined #RubyOnRails
[10:46:29] schneider1: has joined #RubyOnRails
[10:53:47] dogweather: has joined #RubyOnRails
[10:56:48] kurko_: has joined #RubyOnRails
[10:58:35] blackcross: has joined #RubyOnRails
[11:04:34] conta: has joined #RubyOnRails
[11:05:32] schneider1: has joined #RubyOnRails
[11:08:26] Sylario: has joined #RubyOnRails
[11:14:10] Radar: andrewray: I would say "I don't know" if I knew what it is that I didn't know about.
[11:14:26] schneider1: has joined #RubyOnRails
[11:21:09] Cavallari: has joined #RubyOnRails
[11:21:21] apparition: has joined #RubyOnRails
[11:23:49] schneider1: has joined #RubyOnRails
[11:31:33] GodFather: has joined #RubyOnRails
[11:33:07] schneider1: has joined #RubyOnRails
[11:36:14] dachi: I have ended up sending base64 encoded file data from Rails, using axios on client to send request with Auth header, decode file content and download it on the client side with http://danml.com/download.html Thanks again for responding to my question
[11:38:46] dogweather: has joined #RubyOnRails
[11:42:26] schneider1: has joined #RubyOnRails
[11:42:39] Cavallari1: has joined #RubyOnRails
[11:48:19] Cavallari: has joined #RubyOnRails
[11:51:41] schneider1: has joined #RubyOnRails
[11:59:21] dogweather: has joined #RubyOnRails
[12:01:07] schneider1: has joined #RubyOnRails
[12:10:20] schneider1: has joined #RubyOnRails
[12:11:19] duderonomy: has joined #RubyOnRails
[12:13:49] dionysus69: has joined #RubyOnRails
[12:19:37] schneider1: has joined #RubyOnRails
[12:20:56] dogweather: has joined #RubyOnRails
[12:25:20] Aherin: has joined #RubyOnRails
[12:29:03] schneider1: has joined #RubyOnRails
[12:29:06] ellcs: has joined #RubyOnRails
[12:29:30] deramius: has joined #RubyOnRails
[12:31:50] dogweather: has joined #RubyOnRails
[12:36:40] d3ramius: has joined #RubyOnRails
[12:38:21] schneider1: has joined #RubyOnRails
[12:39:06] marr: has joined #RubyOnRails
[12:42:28] Cavallari: has joined #RubyOnRails
[12:43:51] apeiros: how can I define under which name a generator I've written shows up? is it necessarily inferred from the class name? overriding ::generator_name or ::base_name did not seem to effect anything
[12:44:00] dionysus69: has joined #RubyOnRails
[12:45:08] schneider1: has joined #RubyOnRails
[12:48:59] apeiros: ok, it seems ::namespace does the trick
[12:54:30] za1b1tsu_: has joined #RubyOnRails
[12:59:44] dogweather: has joined #RubyOnRails
[13:08:41] d3ram1us: has joined #RubyOnRails
[13:21:03] dogweather: has joined #RubyOnRails
[13:31:22] Technodrome: has joined #RubyOnRails
[13:32:58] dionysus70: has joined #RubyOnRails
[13:34:35] Torrone: has joined #RubyOnRails
[13:36:07] Torrone: Hello, when opening the public/assets folder in my production environment I've noticed that rails keeps old versions of assets on disk, I have at least 50 versions of my css files, is this normal behavior? have you dealt with this before?
[13:38:34] ellcs: did you compile your assets?
[13:38:37] Torrone: has joined #RubyOnRails
[13:38:48] ellcs: did you compile your assets?
[13:39:14] Torrone: ellcs, yes, I have many versions of the same files with different digests
[13:40:31] arooni: has joined #RubyOnRails
[13:44:22] duderonomy: has joined #RubyOnRails
[13:45:19] dogweather: has joined #RubyOnRails
[13:45:44] samosaphile: has joined #RubyOnRails
[13:48:45] Technodrome: has joined #RubyOnRails
[13:50:04] nzst: has joined #RubyOnRails
[13:50:23] roamingdog: has joined #RubyOnRails
[13:52:05] duderonomy: has joined #RubyOnRails
[13:52:46] ellcs: when i would be pretty sure that i wouldn't need them, i'd just delete them
[13:52:55] ellcs: but i am not pretty sure :D
[14:00:04] meal: has joined #RubyOnRails
[14:00:10] dogweather: has joined #RubyOnRails
[14:00:41] chouhoulis: has joined #RubyOnRails
[14:00:41] orbyt_: has joined #RubyOnRails
[14:05:15] tdy: has joined #RubyOnRails
[14:15:44] cstls: has joined #RubyOnRails
[14:16:09] cstls: has joined #RubyOnRails
[14:25:20] dogweather: has joined #RubyOnRails
[14:35:14] alfiemax: has joined #RubyOnRails
[14:36:56] orbyt_: has joined #RubyOnRails
[14:42:31] dogweather: has joined #RubyOnRails
[14:49:21] schneider1: has joined #RubyOnRails
[14:56:51] dogweather: has joined #RubyOnRails
[15:00:31] chouhoulis: has joined #RubyOnRails
[15:14:00] dogweather: has joined #RubyOnRails
[15:17:38] Technodrome: has joined #RubyOnRails
[15:20:44] Torrone: I'm getting this error while deploying with capistrano: can't find executable webpack for gem webpacker (Gem::Exception). I'm sure that 'yarn install' is being ran on the server and I've made sure that packages are updated, what else should I check?
[15:27:29] apeiros: has joined #RubyOnRails
[15:28:24] jcarl43: has joined #RubyOnRails
[15:36:08] dogweather: has joined #RubyOnRails
[15:37:33] nzst: https://github.com/rails/webpacker/blob/master/CHANGELOG.md#breaking-changes
[15:38:35] nzst: maybe, came across that as a possible issue
[15:41:40] cagomez: has joined #RubyOnRails
[15:42:37] cagomez: has joined #RubyOnRails
[15:47:02] cagomez: has joined #RubyOnRails
[15:49:20] dogweather: has joined #RubyOnRails
[16:03:58] dogweather: has joined #RubyOnRails
[16:06:26] Saukk: has joined #RubyOnRails
[16:07:45] bga57: has joined #RubyOnRails
[16:09:04] Torrone: nzst, yes, I saw that, solved it for me
[16:09:13] eckhardt: has joined #RubyOnRails
[16:09:50] Torrone: though it would be nice if they had it done automatically
[16:12:43] schneider1: has joined #RubyOnRails
[16:16:33] dipnlik: has joined #RubyOnRails
[16:23:15] marr: has joined #RubyOnRails
[16:24:12] dogweather: has joined #RubyOnRails
[16:25:09] eckhardt_: has joined #RubyOnRails
[16:32:16] Technodrome: has joined #RubyOnRails
[16:33:00] jrm: has joined #RubyOnRails
[16:37:39] andrewray: has joined #RubyOnRails
[16:38:19] cstls: has joined #RubyOnRails
[16:46:19] regedit: has joined #RubyOnRails
[16:47:13] orbyt_: has joined #RubyOnRails
[16:48:57] regedit: i'm moving/copying a rails app from one subdomain to another. How can i route/redirect any & all requests that come to foo.example.com/with/path?and=params#and-whatever towards bar.example.com/with/path?and=params#and-whatever ?
[16:49:27] regedit: ideally as a redirect 307 (or 308?...) so that they resend the same requests with same post data and whetever else
[16:52:15] Sylario: @regedit it's more an nginx/apache problem than a rails one.
[16:52:49] regedit: sylario: ehm well this is actually on heroku... so, puma or something..
[16:54:03] regedit: any clue about that?
[16:56:22] agent_white: has joined #RubyOnRails
[16:56:33] Sylario: I never used puma/heroku, but I know you cannot keep relative path with DNS only, you have to use a webserver
[16:57:49] vedu_: has joined #RubyOnRails
[16:59:33] regedit: not sure what you mean keep relative path
[17:02:13] dogweather: has joined #RubyOnRails
[17:02:30] regedit: on heroku i dont believe i have access to mess with DNS settings anyway (i'm using the herokuapp.com default free domain address...)
[17:06:31] Sylario: i mean the path + query
[17:08:29] regedit: googling around a bit, so far i've come up with:
[17:08:48] regedit: in config/routes.rb
[17:08:56] regedit: match '*path', to: redirect(...???...), via: :all
[17:09:45] regedit: if this is the right way to go, then i just need to figure out how to make it redirect with all the path + query stuff, and HTTP status code 307 (or 308)
[17:12:05] dogweather: has joined #RubyOnRails
[17:14:08] mondongo: has joined #RubyOnRails
[17:25:31] dogweather: has joined #RubyOnRails
[17:29:31] regedit: in routes.rb how do i refer to the request URI path & query? i'm trying to redirect the request to a different subdomain but keeping all the other URI components (path / params / query / fragment etc)
[17:31:48] mikecmpbll: has joined #RubyOnRails
[17:34:44] duderonomy: has joined #RubyOnRails
[17:36:00] vedu_: has joined #RubyOnRails
[17:38:12] dogweather: has joined #RubyOnRails
[17:45:57] ellcs: has joined #RubyOnRails
[17:48:13] veex: has joined #RubyOnRails
[17:52:17] dogweather: has joined #RubyOnRails
[17:57:26] nzst: any configuration tips or guides for GDPR compliance?
[17:58:59] sameerynho: has joined #RubyOnRails
[17:59:44] dionysus69: has joined #RubyOnRails
[18:02:39] Linuus`: has joined #RubyOnRails
[18:06:10] havenwood: Radar: Any AU conferences coming up particularly worth going to??
[18:06:59] havenwood: Anyone been to YOW!?
[18:07:14] havenwood: I wish I'd made it to RubyConfAU this year...
[18:12:23] cstls: has joined #RubyOnRails
[18:14:27] srinidhi: has joined #RubyOnRails
[18:29:28] dogweather: has joined #RubyOnRails
[18:31:18] kurko_: has joined #RubyOnRails
[18:34:37] weaksauce: has joined #RubyOnRails
[18:38:06] fox_mulder_cp: hi, folks. i create rails engine gem, and try to create gemname:install generator for models and migrations. it works properly in dummy test app, but when i try to launch gemname:install from main application - routes ok, but generator can't accessible from rails g genname:install. what i miss in my gem?
[18:47:02] dogweather: has joined #RubyOnRails
[18:50:57] gambl0re: has joined #RubyOnRails
[19:01:03] zave: has joined #RubyOnRails
[19:03:52] tycoon177: Is there a way to access the rails cookies from rack middleware? I want to rewrite a before_action callback in my application controller to a rack middleware.
[19:04:06] dogweather: has joined #RubyOnRails
[19:06:52] sagax: has joined #RubyOnRails
[19:11:19] Technodrome: has joined #RubyOnRails
[19:11:23] eckhardt: has joined #RubyOnRails
[19:16:32] cstls: has joined #RubyOnRails
[19:16:47] tipyn: has joined #RubyOnRails
[19:17:13] GodFather: has joined #RubyOnRails
[19:20:24] mondongo: has joined #RubyOnRails
[19:28:22] schneider1: has joined #RubyOnRails
[19:32:17] kurko__: has joined #RubyOnRails
[19:34:25] apeiros: tbuehlmann: didn't you recommend agent-orange for browser/device detection to me?
[19:35:32] apeiros: just in case - it does not seem to pick up google's "googlebot for smartphones" as a mobile device (given that it's got a separate bot category, that could be considered correct)
[19:35:50] apeiros: noticed when I ran my site against https://search.google.com/test/mobile-friendly
[19:38:18] dogweather: has joined #RubyOnRails
[19:38:33] nzst: re: browser detection, i like the gem 'browser'
[19:39:09] nzst: there's a newer one I havent' tried yet https://github.com/podigee/device_detector
[19:39:14] dionysus69: has joined #RubyOnRails
[19:39:15] FLeiXiuS: has joined #RubyOnRails
[19:39:16] nzst: *new to me
[19:40:38] FLeiXiuS: I have a polymorphic association with Visitors and Misconducts. When creating a new visitor, I get a no route error on ```new_visitor_misconduct_path(@visitor)``` because params[:visitor_id] is nil.
[19:41:33] apeiros: nzst: yeah, those are the three I got recommended. browser seems to have the most downloads.
[19:43:37] orbyt_: has joined #RubyOnRails
[19:44:43] duderonomy: has joined #RubyOnRails
[19:50:01] apeiros: given that my mobile site is fully functional at <200KB, I ponder just always sending the mobile site on first request and redirect/reload based on `window.matchMedia('screen and (max-width: 8cm)').matches` (and always redirect in absence of window.matchMedia, since that is almost certainly some ancient non-mobile browser)
[19:50:21] tipyn: has joined #RubyOnRails
[19:51:47] kapil___: has joined #RubyOnRails
[19:53:46] duderonomy: has joined #RubyOnRails
[19:55:38] dogweather: has joined #RubyOnRails
[20:00:01] GodFather: has joined #RubyOnRails
[20:03:15] tycoon177: I found the answer to my question. In case anyone is wondering, you can recreate a request object in rack by calling `request = Rack::Request.new(env)` in the call method of the rack middleware. After this, you can access your session variables by calling `request.session[:session_var]`
[20:03:40] tycoon177: It's not 100% the same as the rails request object, i don't think, but it's close enough to get and set session variables :)
[20:08:29] dogweather: has joined #RubyOnRails
[20:14:27] dviola: has joined #RubyOnRails
[20:21:14] roamingdog: has joined #RubyOnRails
[20:21:58] dogweather: has joined #RubyOnRails
[20:22:51] dviola: has joined #RubyOnRails
[20:32:46] uksio: has joined #RubyOnRails
[20:36:24] dogweather: has joined #RubyOnRails
[20:41:50] alfiemax: has joined #RubyOnRails
[20:49:14] dogweather: has joined #RubyOnRails
[20:49:32] ur5us: has joined #RubyOnRails
[20:54:48] fox_mulder_cp: what is diffence - raise vs throw?
[20:57:01] nzst: https://ruby-doc.org/core-2.5.0/Kernel.html#method-i-throw https://ruby-doc.org/core-2.2.3/Kernel.html#method-i-raise
[20:57:40] nzst: just to be consistent, here's raise from the same ruby version as the throw i linked https://ruby-doc.org/core-2.5.0/Kernel.html#method-i-raise
[20:59:13] cstls: has joined #RubyOnRails
[21:00:14] kurko_: has joined #RubyOnRails
[21:00:19] orbyt_: has joined #RubyOnRails
[21:00:31] taxen: has joined #RubyOnRails
[21:01:54] dogweather: has joined #RubyOnRails
[21:11:35] NoGodDamnIdea: has joined #RubyOnRails
[21:26:13] alfiemax: has joined #RubyOnRails
[21:30:51] ur5us: has joined #RubyOnRails
[21:31:05] ur5us: has joined #RubyOnRails
[21:32:39] vedu_: has joined #RubyOnRails
[21:33:22] alfiemax: has joined #RubyOnRails
[21:34:37] tdy: has joined #RubyOnRails
[21:49:19] Inside: has joined #RubyOnRails
[21:50:06] Inside: Um.. how the heck does one delete records in a join table?
[21:50:38] Inside: Let's say I have a join table with two columns: revision_id and item_id. I can select them items (ItemsRevision.where(item_id: 1, revision_id: 2)). But I can't do .delete_all on the resulting set
[22:00:02] Inside: Welp - just went back to having a regular table with a pk and the other two columns.
[22:00:07] Inside: I guess I Don't see the purpose of a join table
[22:00:27] charliechin: has joined #RubyOnRails
[22:02:55] charliechin: Ive got a Seminar model with a nested model called Boooking
[22:03:38] charliechin: My idea is that by using a dropdown it will allow users to book a number of bookings given the value of the dropdown
[22:03:55] charliechin: but i am very loooost
[22:04:35] charliechin: should I create some kind of dynamic jQuery form
[22:04:49] charliechin: and send those fields as params??
[22:04:57] alfiemax: has joined #RubyOnRails
[22:07:36] dogweather: has joined #RubyOnRails
[22:13:44] Inside: Um? Sure?
[22:13:49] dviola: has joined #RubyOnRails
[22:14:07] Inside: You could have a BookingsController which accepts seminar_id+user_id as parameters
[22:18:20] fox_mulder_cp: Inside .destroy_all
[22:19:06] fox_mulder_cp: btw 2 years ago i drop jquery from my cv. only react app now..
[22:19:26] charliechin: I should do the same tbh
[22:19:40] charliechin: but this project has been running for the last 3 yrs or so
[22:19:50] charliechin: so, it is not an option for me unfortunately :(
[22:20:04] fox_mulder_cp: ohoh. legacy..
[22:20:16] charliechin: exactly >_<)/
[22:20:44] charliechin: so having a Seminar that accepts bookings (Seminar.bookings)
[22:20:53] charliechin: how would you dynamically
[22:21:13] charliechin: say with a dropdown that has numers from 1..3
[22:21:17] charliechin: if I choose 3
[22:21:47] charliechin: I would have to render 3 forms with said booking fields (say name and surname of the person doing the booking)
[22:21:54] charliechin: everything works in the console
[22:22:08] fox_mulder_cp: piece of. ( i part one legacy project some months ago. 5+ years, second team, 50+ gems, 80+ models, shit-like modules and code, erb, no cache and 5 secod for a clean page generation
[22:22:36] charliechin: god that is like the one I'm working right now
[22:22:48] charliechin: I'm doing this internship kind-of-thing
[22:22:55] dogweather: has joined #RubyOnRails
[22:23:00] fox_mulder_cp: kind-of-shit :)
[22:23:47] fox_mulder_cp: i'm stop develope my hosting control panel and switch to activeCable web chat with reactjs
[22:24:14] fox_mulder_cp: it's intresting experience
[22:30:35] Inside: fox_mulder_cp: how do you do ajax with react?
[22:30:41] Inside: I've been told to not use jquery, but I don't understand why not
[22:31:28] alfiemax: has joined #RubyOnRails
[22:41:15] fox_mulder_cp: Inside: js fetch in actions -> redux -> store -> view
[22:41:52] fox_mulder_cp: jquery - very good idea for internet 1990th :) shit-like code
[22:42:47] fox_mulder_cp: when you must update 25-30 different items via rails erb + jquery - you can think, that monkey-codepaste-patch - bad, very bad idea L)
[22:44:10] fox_mulder_cp: 2 years ago i switch from this jquery world to modern react, and dance L(
[22:44:20] weaksauce: has joined #RubyOnRails
[22:53:26] fox_mulder_cp: Inside: i write very hard project - apps hosting control panel with many elements on page. alerts, notices, cart and some other. in jquery world update it - very monkey-style code
[22:57:29] Technodrome: has joined #RubyOnRails
[22:59:25] alfiemax: has joined #RubyOnRails
[23:00:09] cstls: has joined #RubyOnRails
[23:01:22] duderonomy: has joined #RubyOnRails
[23:02:38] tfitts: has joined #RubyOnRails
[23:05:50] GodFather: has joined #RubyOnRails
[23:09:49] Radar: havenwood: YOW is supposedly good. I've never been.
[23:10:08] Radar: havenwood: There's also: https://www.webdirections.org/
[23:10:16] Radar: And a new one: https://www.webdirections.org/
[23:10:43] Radar: I've put in a talk for Web Directions Code Leaders on the 1st of Aug
[23:10:57] Radar: Just realised my 2nd link was the same as my first. 2nd was supposed to be: http://www.levelsconf.com/
[23:19:52] alfiemax: has joined #RubyOnRails
[23:23:27] ephemer0l: has joined #RubyOnRails
[23:25:08] cstls: has joined #RubyOnRails
[23:26:50] pharma_joe: has joined #RubyOnRails
[23:37:32] Inside: fox_mulder_cp: I mean using jquery JUST for doing callbacks after post
[23:40:37] duderonomy: has joined #RubyOnRails
[23:50:29] orbyt_: has joined #RubyOnRails
[23:58:01] fox_mulder_cp: Inside: i try to use this rails jquery ajax, it ok, but monkey-shit style code, so when i need to update tons of irems on page - bad, bad variant