#RubyOnRails - 17 November 2017
« Back 1 day Forward 1 day »
[09:14:51] walidvb: hey, i'm trying to switch to using X-SMTPAPI generally, but i'm having issues testing it. Mainly, all my old tests consider each mail is sent once for each user.
[09:17:10] walidvb: rspec's expect(mail).to have_header('X-SMTPAPI', 'somevalue'), but the header returned seems to have a broken key (smth like /[!-9;-~]+/=>MY_X_SMTPAPI_VALUE)
[09:58:11] dminuoso: activesupport-5.1.4/lib/active_support/callbacks.rb:93:in `ActiveSupport::Callbacks#run_callbacks' (4486 samples - 99.78%)
[10:09:45] marahin: Could anyone recommend some kind of an article that mentions couple of ways to structurize your Rails REST API? This will be api-only project (from a generic Rails one, so it has to get some parts stripped), but I'm wondering how to approach the project tree, namespacing, inheritance etc.
[10:10:02] marahin: I've read some articles related to Swagger but they aren't precise on those particular matters
[11:25:13] apeiros: semi-OT: does anybody happen to know whether google boosts mybusiness entries which feature a street view tour?
[11:27:21] MrCrackPotBuilde: i have a button class that has three links but when you click the button nothing happens and i assumes the button was only supposed to be there when its too small
[11:57:22] marahin: What is the way-to-go to handle JSON:API compliant auth for Devise resources? Can anyone suggest something?
[11:57:51] marahin: https://github.com/lynndylanhurley/devise_token_auth - I've checked this but they don't really focus on json:api RN, and I'm uncertain when it comes to overriding libraries regarding security. :D
[15:49:46] helpa: MrCrackPotBuilde: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[16:01:41] migeorge: Does anyone know if there is a way to specify the connection object to use for an action cable channel?
[16:02:10] helpa: MrCrackPotBuilde: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[16:02:35] dminuoso: Use multiple files in a single gist, and give them meaningful file extensions so that syntax highlighting is enabled.
[16:04:08] clair13: hello how can i not display that part below benefit but the of the checked boxes that i have checked in edit page on ActiveAdmin?
[16:04:58] dminuoso: MrCrackPotBuilde: You can post gists anonymously. You just cant edit them unless you are registered.
[16:10:38] MrCrackPotBuilde: with that there basically even full screen the button is visible and all links hidden but the logo you can see
[16:14:01] iamdevnul: so weird question, is there a way to write a change_table block that will add foreign keys to multiple columns in a table? trying to be able to do this all in one alter table statement
[17:12:22] cagomez: is there a pattern to run a method if a certain attribute is updated? or should I just check after .update_all in the controller?
[17:30:05] cagomez: jtperreault: I'm using update_all, would attribute_changed? even detect changes? if I understand correctly, update_all doesn't invoke the model/callbacks/etc
[17:47:47] tcopeland: iamdevnul: it’s not elegant, but I’ve seen that done by falling back to using a single SQL statement: execute “alter table foobars add foreign key (account_id) references accounts(id), add foreign key (owner_id) references owners(id)”
[18:27:58] the_f0ster: we are using makara as our db driver and it uses active record connection pooling underneath as far as I can tell
[18:28:37] dminuoso: the_f0ster: Tell us about your setup. Anything other "non-standard" we should know about?
[18:30:04] the_f0ster: we are using foreman -> unicorn which specifies worker_processes 7 .. so this is only 7 workers per thread ?
[18:32:54] noob_on_rails: hey all , if i have a case where the user does some transactions which could be buy / sell of some items and these items stay in some kind of stock and get added/removed accordingly
[18:33:35] noob_on_rails: should i have 2 types of transactions , or transaction with a flag(type) field
[18:40:20] fryguy: the_f0ster: that's processes, not threads, each process has it's own connection pool, and they can't be shared with each other
[18:43:12] the_f0ster: fryguy: so each worker has it's own process, and the db connection is pooling internally with threads on each process right ?
[20:56:26] beingjohnm: anybody having issues with workers/database connections with Heroku right now?
[21:43:31] the_f0ster: fryguy: sorry I am reading through documentation to udnerstand how unicorn works, so underlying code that uses threads is not possible with unicorn?
[21:49:59] dminuoso: the_f0ster: the GVL basically only blocks multiple threads from executing ruby code.
[21:53:49] the_f0ster: my app response times went through the roof when teh db went down, so I'm going to lower the timeout to prevent it, but if pooling isnt really happening in parallel then it is not that useful