#RubyOnRails - 24 October 2017
« Back 1 day Forward 1 day »
[00:34:10] blackcross: Do experienced DevOps KNOW having a dedicated server is better than cloud services, or is using clouds and docker a fab right now for microservices/low demand apps?
[00:35:02] blackcross: i mean, i kind of get docker, you get everything in a small package, which is great for developers to have the same environment, but at the end of the day, shouldn't anything that is worth running be ran on a dedicated server?
[00:37:52] helpa: What you just asked could be classed as subjective. Subjective questions often start flamewars, which are tedious and boring. Try all the available options and see which one suits you the best.
[02:23:14] clair13: how can i have for my api entrypoint like http://domain/api/brands?query=something
[02:24:03] clair13: and to have json response the date of the query request and info about "something"
[02:25:44] helpa: clair13: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy and Ryan Bigg
[02:25:51] helpa: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[03:27:25] Technodrome: is it possible to have a SSO like omniauth, where all the authentication happens on-site? rather than being redirected and being brought back?
[06:54:40] Lauer: Hello, I have an external redis it want to look up to precent some data together with the model. But can figure how to implement this best. Specially because the redis server could be down, and then the website should still work
[06:55:11] Lauer: should I create one connection in the initizer and refer as a global variable $redis_service
[06:59:28] Lauer: I was considering code like this, https://www.pastiebin.com/59eee494a80d1 however, it does not seems to catch the connection down - also, should I return empty string when its down
[07:11:08] Lauer: I figured out, that if I added a $redis_connection.ping after the Redis.new - the recue will work
[09:34:03] drale2k_: This issue is driving me nuts since yesterday, someone please help if you can https://stackoverflow.com/questions/46906968/wrong-path-for-nested-controller-in-rails
[09:40:08] dminuoso: drale2k_: You can directly see your mistake if you look at the output of your rails routes.
[09:42:11] dminuoso: drale2k_: Yes. form_with will infer the necessary routing path based on the class names of the objects you pass it.
[09:42:42] dminuoso: drale2k_: Because it has a MeterpreterJob object, it expects the path to end with meterpreter_jobs as is.
[09:43:25] dminuoso: drale2k_: Or just use the url helpers manually instead of relying on rails magically finding the correct path.
[09:43:58] drale2k_: now it's complaning about "undefined method `operation_agent_jobs_meterpreter_jobs_path"
[09:48:21] dminuoso: drale2k_: Either remove the `Job` at the end of the model, or use the url helpers manually.
[09:48:58] dminuoso: You are telling it the resource is named `meterpreter` when in truth its called `meterpreter_job`
[09:54:50] drale2k_: dminuoso: i going in circles, i now updated it to be "resources :meterpreter_job" and now i have routes like "operation_agent_jobs_meterpreter_job_index"
[09:55:03] drale2k_: but it expects something else, "undefined method `operation_agent_meterpreter_jobs_path' "
[09:55:29] dminuoso: drale2k_: Please gist your updated config/routes.rb and `rails routes` in a single gist (use multiple files)
[10:38:26] dminuoso: desnudopenguino: `resources :meterpreter_job` should be `resources :meterpreter_jobs`
[15:55:59] cabotto: vedu: Not sure about IRC, but there is a Slack channel - https://rubyonrails-link.slack.com
[16:16:30] mustmodify: What's the actual name for the hash-or-whatever-tags that the asset pipeline adds in production?
[18:12:24] tycoon177: in rails_ujs, i know you can add a data-confirm attribute to get a single confirmation on a link. We have a case that we need a second confirmation. is there built in functionality to do this? if not, where would you all suggest i start looking?
[18:15:43] Romuloux: Personally, I use Sweet Alert instead of the default JS window. Overriding it as shown in this post (http://lesseverything.com/blog/customizing-confirmation-dialog-in-rails/). From there you can use SweetAlert's first dialog, to trigger a second that has the real confirmation button in it.
[19:38:43] coder2000: Is there a way to reduce the ABC size on a complex query or should the test just be disabled as impossible?