#RubyOnRails - 20 February 2019
« Back 1 day Forward 1 day »
[11:15:25] old_relik: i have a model method that calls another method that makes a db query multiple times
[11:17:09] old_relik: is there a cleaner way to do this, such that I can simply call the method and it will only make the query once
[14:32:54] andywww: I want to return a string value for a particular method call depending on the class that implements it: https://hastebin.com/imohiqomah.rb
[15:27:22] pavelz: I installed the server and I can log in with username and password via 'mysql' but rails can't seem to connect
[15:41:15] dopie: I need help here https://gist.github.com/staycreativedesign/6e8a1424f46e15c62840c1158f1ae393 how can I make this work in production ?
[16:45:28] jgomo3: Hello. Is it a good idea to use ActiveSupport Instrumentation API for using the Publish-Subscriber pattern in my application? My main concern is that it was designed for "Instrumentation" in mind.
[18:26:32] DoctorMonocular: hey I am faking an upsert with mysql using Model.find_or_initialize_by().update().save! -- I have a collection of things that needs to be upserted, in addition to a few other things I want to happen with other models, all in the same transaction
[18:27:35] DoctorMonocular: and I'm not really sure how I should be doing that. I guess I should do something like Model.find_or_initialize_by().lock!... ?
[18:29:07] DoctorMonocular: I guess I'm nervous about a race condition if that same transaction is happening on a different thread and it tries to upsert at the same time
[18:47:14] dionysus70: my biggest question about testing always was, "what to test?" obviously there are best practices, can you share some resources that will guide me on the right path :) ?
[18:57:00] gheegh: Anyone work with active_admin? I've got a problem with a custom form. It's not rendering well, and fields are not showing. Rails 5.2 latest everything. https://gist.github.com/wflanagan/5f73eab4dfdd93aadf74d98fa4c62ba5
[19:09:26] Net: in the latest rails ActiveJob workers will use the time zone when the job was queued, right?
[19:22:22] brieweb: it seems that the sqlite gem can't install because autoconf is looking for dlopen
[20:01:54] havenwood: sagax: You're not using asset pipeline / webpacker HTML minification? Or you need this for something other than the Rails respose?
[22:07:07] Inside: So.... this is a pretty complicated problem, but I've create a User & UserIdentity model and am using devise with two strategies to peform authentication: LDapAuthenticatable and also my own home-rolled BadgeAuthenticatable. I can enable one strategy to work at a time, but not both =_=
[22:07:49] Inside: Basically - If I have badge authentication enabled, i can use a PIN code to login, but then I can't use the LDAP Authentication since it either won't stay logged in or won't allow logging out