#RubyOnRails - 18 June 2018
« Back 1 day Forward 1 day »
[09:37:45] Arkentias: Hey everyone!I need your help. For every request that hits my API, i need to check the url it came from to be able to know which of my client's data I should access. Where should I put this kind of logic that should happen once for every request?
[09:42:34] tbuehlmann: Arkentias: I assume you have some kind of authentication in place, can't you decide on that authorization what client the request sent?
[10:17:48] jlebrech: can someone help me with ActionCable? my connection is verified by use session, how do I send a message just to that user? is something like ActionCable.server.broadcast "message", 'hello' enough?
[11:47:56] yottanami: I am trying to deploy a api-only Rails 5 project using Capistrano after the deploy there is no public directory and so I got 404 error. Is it because my project is api-only or it is because of passenger setting?
[12:31:37] dminuoso: All it indicates is that /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh exited with an abnormal status
[12:33:08] yottanami: jlebrech, No, after deploy. when I trying to brows. it is trying to find public directory but there is no public directory
[12:38:32] yottanami: jlebrech, It is ok on development version on local machine but on production I just got that error
[12:41:55] dminuoso: RougeR: https://gist.github.com/CodePint/495c09796160bb71d3f4dfdcfcd7b366#file-eb_log-txt-L80-L84
[16:30:35] dionysus69: what's the best practice to secure communication between infrastructure? reverse proxy to app server app server to database ?
[19:21:30] glassresistor: so i have a race condition in a controller where two requests at the same time want to create the same thing instead of one creating and one reading it. https://github.com/codeforamerica/clientcomm-rails/blob/develop/app/models/message.rb#L95-L100
[19:22:30] glassresistor: would the best strategy to be to retry once on that failure or try and something like find_by_and_create
[21:47:01] Inside: I love when I search for information about an issue and come across a post I made 1y4mo ago
[22:48:56] kevinburke: if I test the method directly those don't fire. I can call save! but that results in the callback firing twice
[23:11:17] Inside: You essentially replace saved_change_to_attribute with a mock object and then do an assert to see if it was called
[23:11:47] Inside: But then you'd need to do a separate test to make sure that saved_change_to_attribute did what you expected to