« Back to channel list

#RubyOnRails - 24 October 2017

« Back 1 day Forward 1 day »
[00:02:50] ForeignBiscuit: has joined #RubyOnRails
[00:06:36] platzhirsch: Don't hate, appreciate
[00:06:39] Ropeney: has joined #RubyOnRails
[00:08:13] jphase: has joined #RubyOnRails
[00:08:19] baweaver: More of being amused and satirizing the pipeline
[00:09:44] jphase_: has joined #RubyOnRails
[00:12:42] jphase: has joined #RubyOnRails
[00:12:44] Technodrome: has joined #RubyOnRails
[00:16:30] Rodya_: has joined #RubyOnRails
[00:20:42] Rodya_: has joined #RubyOnRails
[00:21:15] TinkerTyper: has joined #RubyOnRails
[00:29:29] mostlybadfly: has joined #RubyOnRails
[00:32:24] cagomez: has joined #RubyOnRails
[00:33:07] Rodya_: has joined #RubyOnRails
[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:34:11] Technodrome: has joined #RubyOnRails
[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] Radar: !subjective
[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.
[00:38:11] jphase: has joined #RubyOnRails
[00:38:33] Radar: blackcross: the answer really is "it depends"
[00:38:48] Radar: Lots of companies run things that are "worth running" in a docker-based system.
[00:38:52] Radar: And lots of companies dont'
[00:39:42] idefine: has joined #RubyOnRails
[00:42:43] Rodya_: has joined #RubyOnRails
[00:42:46] jphase_: has joined #RubyOnRails
[00:43:44] jphase: has joined #RubyOnRails
[00:50:36] knight33: has joined #RubyOnRails
[00:51:41] rcdvl: has joined #RubyOnRails
[00:58:57] irishfromua: has joined #RubyOnRails
[01:02:49] jphase: has joined #RubyOnRails
[01:03:50] jphase_: has joined #RubyOnRails
[01:07:19] jphase: has joined #RubyOnRails
[01:12:41] Technodrome: has joined #RubyOnRails
[01:16:48] Jameser: has joined #RubyOnRails
[01:22:05] jphase: has joined #RubyOnRails
[01:37:32] andrew9184: has joined #RubyOnRails
[01:39:32] Ropeney: has joined #RubyOnRails
[01:48:51] idefine: has joined #RubyOnRails
[01:57:24] bruno-: has joined #RubyOnRails
[02:08:58] orbyt_: has joined #RubyOnRails
[02:15:58] clair13: has joined #RubyOnRails
[02:18:17] gusrub: has joined #RubyOnRails
[02:20:10] Radar: hi clair13
[02:20:46] Jameser: has joined #RubyOnRails
[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:24:32] Radar: clair13: what have you tried so far?
[02:25:34] clair13: i don't know how to do it
[02:25:39] clair13: any guides ?
[02:25:44] Radar: clair13: !gettingstarted
[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
[02:25:51] clair13: should i use graphql
[02:25:58] Radar: Perhaps start with the route first?
[02:27:59] Jameser: has joined #RubyOnRails
[02:28:13] clair13: ok yes but how can i take the this query
[02:28:20] Radar: You need a route first.
[02:28:25] Radar: Did you define a route?
[02:29:08] clair13: i need this to be able to get a wiki page with httparty and display to json
[02:29:44] Radar: Did you define a route?
[02:31:03] clair13: no,any example?
[02:31:09] clair13: how it should be?
[02:31:21] Radar: http://guides.rubyonrails.org/routing.html
[02:31:25] clair13: i am starting the project in the morning
[02:31:26] Radar: It's the first example.
[02:31:36] Radar: clair13: Perhaps look through the Getting Started guide too.
[02:31:36] clair13: yeah i know these
[02:31:41] Radar: Ok great, so what's the problem?
[02:32:46] clair13: ok i'll start the project and be more specific thank you for your time
[02:40:53] quazimodo: has joined #RubyOnRails
[02:50:06] duderonomy: has joined #RubyOnRails
[03:10:55] Saukk: has joined #RubyOnRails
[03:26:39] jrabe: has joined #RubyOnRails
[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?
[03:39:26] kies: has joined #RubyOnRails
[03:56:42] idefine: has joined #RubyOnRails
[04:06:42] idefine: has joined #RubyOnRails
[04:10:08] Rodya_: has joined #RubyOnRails
[04:16:16] idefine: has joined #RubyOnRails
[04:38:18] bruno-: has joined #RubyOnRails
[04:38:30] alfiemax: has joined #RubyOnRails
[04:45:22] idefine: has joined #RubyOnRails
[04:49:15] srinidhi: has joined #RubyOnRails
[05:06:59] DTZUZO: has joined #RubyOnRails
[05:22:20] quazimodo: has joined #RubyOnRails
[05:42:05] alfiemax: has joined #RubyOnRails
[05:58:11] mtkd: has joined #RubyOnRails
[06:10:01] dionysus69: has joined #RubyOnRails
[06:22:27] conta: has joined #RubyOnRails
[06:31:53] Technodrome: has joined #RubyOnRails
[06:53:32] Lauer: has joined #RubyOnRails
[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:56:47] Hexafox[I]: has joined #RubyOnRails
[06:58:21] Lauer: btw, pastie.org seems to be down?
[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
[06:59:39] Lauer: I am searching for some best practice
[06:59:55] pwnd_nsfw: has joined #RubyOnRails
[07:10:20] matthewd: lauer: Having a global $redis is a popular option, yes
[07:11:08] Lauer: I figured out, that if I added a $redis_connection.ping after the Redis.new - the recue will work
[07:15:56] blackmesa1: has joined #RubyOnRails
[07:18:07] w0rd-driven: has joined #RubyOnRails
[07:24:24] apeiros_: has joined #RubyOnRails
[07:42:49] mikecmpbll: has joined #RubyOnRails
[07:52:54] ^mtkd: has joined #RubyOnRails
[07:53:07] rgr_: has joined #RubyOnRails
[07:58:11] blackmesa1: has joined #RubyOnRails
[08:03:46] mikecmpbll: has joined #RubyOnRails
[08:30:56] drale2k_: has joined #RubyOnRails
[08:43:57] universa1: has joined #RubyOnRails
[08:45:38] phon: has joined #RubyOnRails
[08:47:59] Guest28041: has joined #RubyOnRails
[08:52:35] ur5us: has joined #RubyOnRails
[08:55:51] drale2k_: has joined #RubyOnRails
[08:59:17] cabotto: has joined #RubyOnRails
[09:15:51] marr: has joined #RubyOnRails
[09:16:56] Technodrome: has joined #RubyOnRails
[09:25:39] idefine: has joined #RubyOnRails
[09:27:56] bruno-: has joined #RubyOnRails
[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:37:18] dminuoso: drale2k_: Please gist the output of your `rails routes`
[09:38:32] dminuoso: drale2k_: Also add the entirety of your config/routes.rb
[09:39:08] drale2k_: https://gist.github.com/drale2k/a25c4cbffe8c5e6446df2141a393cd17
[09:39:14] drale2k_: hm can't edit the SO entry somehow
[09:40:08] dminuoso: drale2k_: You can directly see your mistake if you look at the output of your rails routes.
[09:40:28] drale2k_: i see that the routes don't match but i don't know how to fix it
[09:41:01] dminuoso: drale2k_: MeterpreterJob is incorrectly named.
[09:41:13] dminuoso: drale2k_: It'd have to be Job::Meterpreter
[09:41:32] dminuoso: Or Jobs::Meterpreter rather.
[09:41:45] drale2k_: the model ?
[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:25] drale2k_: so it would be jobs::Meterprter < Job ?
[09:42:42] dminuoso: drale2k_: Because it has a MeterpreterJob object, it expects the path to end with meterpreter_jobs as is.
[09:42:45] drale2k_: i think i had that, let me try
[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:44:17] dminuoso: drale2k_: Whats the exact class name of the model now?
[09:45:11] drale2k_: class Jobs::MeterpreterJob < Job
[09:45:20] drale2k_: but i had to change the path in the view, it's a differnet error now
[09:45:25] drale2k_: uninitialized constant Jobs::MeterpreterController::MeterpreterJob
[09:45:34] drale2k_: in " @job = MeterpreterJob.new agent: @agent" in the controller
[09:48:09] dminuoso: drale2k_: Again, as long as there's that `Job` suffix, you are kind of lying.
[09:48:21] dminuoso: drale2k_: Either remove the `Job` at the end of the model, or use the url helpers manually.
[09:48:22] drale2k_: i am not :D
[09:48:25] dminuoso: Yes you are.
[09:48:26] dminuoso: You are lying to rails.
[09:48:36] drale2k_: haha ok i thought lying to you about my code
[09:48:58] dminuoso: You are telling it the resource is named `meterpreter` when in truth its called `meterpreter_job`
[09:49:12] dminuoso: Or you have to change the name of the resource in your config/routes.rb
[09:49:18] dminuoso: any one of the three will solve your problem.
[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)
[09:56:40] wethu: has joined #RubyOnRails
[09:57:03] drale2k_: https://gist.github.com/drale2k/6f4c94752e0f243c1a19942dbb291331
[10:00:21] Sigyn: has joined #RubyOnRails
[10:12:25] drale2k_: dminuoso: any idea? :)
[10:17:02] quazimodo: has joined #RubyOnRails
[10:33:25] GodFather: has joined #RubyOnRails
[10:37:27] dminuoso: drcapulet: Yes, you still have a singular/plural issue going on.
[10:38:26] dminuoso: desnudopenguino: `resources :meterpreter_job` should be `resources :meterpreter_jobs`
[10:39:11] DTZUZO: has joined #RubyOnRails
[10:41:29] cabotto: has joined #RubyOnRails
[10:54:57] alfiemax: has joined #RubyOnRails
[11:18:22] bruno-: has joined #RubyOnRails
[11:29:19] wethu: has joined #RubyOnRails
[11:31:30] tcopeland: has joined #RubyOnRails
[11:32:50] cabotto: has joined #RubyOnRails
[11:41:51] drale2k_: has joined #RubyOnRails
[11:42:25] drale2k_: dminuoso : my laptop was offline in IRC, in case you replied please repeat.
[11:49:16] adac: has joined #RubyOnRails
[11:49:18] adac: hi there
[11:49:36] adac: does anyone of you know a bigger page that is using ruby on rails and angular?
[11:49:58] adac: angular 2-4
[11:55:36] srinidhi: has joined #RubyOnRails
[12:03:21] blackmesa1: has joined #RubyOnRails
[12:12:23] jottr: has joined #RubyOnRails
[12:15:16] ferr1: has joined #RubyOnRails
[12:17:29] cabotto: has joined #RubyOnRails
[12:29:43] keegnotrub: has joined #RubyOnRails
[12:35:40] jphase: has joined #RubyOnRails
[12:37:04] GodFather_: has joined #RubyOnRails
[12:47:57] apparition: has joined #RubyOnRails
[12:59:25] alfiemax: has joined #RubyOnRails
[13:02:35] fmcgeough: has joined #RubyOnRails
[13:03:34] jphase: has joined #RubyOnRails
[13:15:22] brendan-: has joined #RubyOnRails
[13:16:09] Fire-Dragon-DoL: has joined #RubyOnRails
[13:16:37] tanuki4: has joined #RubyOnRails
[13:19:48] jphase: has joined #RubyOnRails
[13:20:03] tanuki: has joined #RubyOnRails
[13:21:47] uks: has joined #RubyOnRails
[13:25:05] workmad3: has joined #RubyOnRails
[13:33:33] mtkd: has joined #RubyOnRails
[13:35:08] lxsameer: has joined #RubyOnRails
[13:35:43] FrostCandy: has joined #RubyOnRails
[13:38:47] idefine: has joined #RubyOnRails
[13:46:28] elsurudo: has joined #RubyOnRails
[13:47:33] srinidhi: has joined #RubyOnRails
[13:49:24] drale2k_: has joined #RubyOnRails
[13:54:00] chouhoulis: has joined #RubyOnRails
[14:00:11] Jameser: has joined #RubyOnRails
[14:11:03] drale2k_: has joined #RubyOnRails
[14:11:08] cabotto: has joined #RubyOnRails
[14:12:21] cabotto: has joined #RubyOnRails
[14:21:26] idefine: has joined #RubyOnRails
[14:26:56] dionysus69: has joined #RubyOnRails
[14:27:25] Jameser: has joined #RubyOnRails
[14:32:50] mikecmpbll: has joined #RubyOnRails
[14:38:00] ahrs: has joined #RubyOnRails
[14:41:00] workmad3: has joined #RubyOnRails
[14:45:17] dminuoso: Neat, cells is just like SFCs from React. :)
[14:45:25] dminuoso: Time to ditch traditional rails views entirely.
[14:55:50] knight33: has joined #RubyOnRails
[14:58:30] bnjmnwl: has left #RubyOnRails: ()
[14:58:45] Technodrome: has joined #RubyOnRails
[15:01:57] egray: has joined #RubyOnRails
[15:13:37] mikecmpbll: has joined #RubyOnRails
[15:34:01] cgfbee: has joined #RubyOnRails
[15:45:56] FastJack: has joined #RubyOnRails
[15:49:20] vedu: Hey folks. Are there specific IRC channels or Mailing lists for rails jobs?
[15:55:59] cabotto: vedu: Not sure about IRC, but there is a Slack channel - https://rubyonrails-link.slack.com
[15:59:18] apeiros: has joined #RubyOnRails
[16:00:47] mikecmpbll: has joined #RubyOnRails
[16:00:58] dviola: has joined #RubyOnRails
[16:03:36] vedu: cabotto: oh. how can I join the channel?
[16:04:31] gil_: has joined #RubyOnRails
[16:05:28] vedu: cabotto: nevermind. got it. thanks! :)
[16:05:37] cabotto: vedu: Great!
[16:06:44] [Butch]: has joined #RubyOnRails
[16:08:59] kies: has joined #RubyOnRails
[16:09:41] mcr1: has joined #RubyOnRails
[16:10:19] Papierkorb: has joined #RubyOnRails
[16:10:26] orbyt_: has joined #RubyOnRails
[16:16:08] mustmodify: has joined #RubyOnRails
[16:16:30] mustmodify: What's the actual name for the hash-or-whatever-tags that the asset pipeline adds in production?
[16:16:47] mustmodify: assets/rails.png?2344234234234234
[16:25:10] gusrub: has joined #RubyOnRails
[16:39:14] rietta: has joined #RubyOnRails
[16:43:56] orbyt_: has joined #RubyOnRails
[16:46:29] rietta: has joined #RubyOnRails
[17:00:16] vedu: mustmodify: etag ?
[17:02:55] fryguy: has joined #RubyOnRails
[17:03:31] one_zero: has joined #RubyOnRails
[17:08:40] mustmodify: has left #RubyOnRails: ()
[17:13:30] kapil___: has joined #RubyOnRails
[17:20:54] kies: has joined #RubyOnRails
[17:21:03] mcr1: has joined #RubyOnRails
[17:21:43] hahuang65: has joined #RubyOnRails
[17:35:14] Saukk: has joined #RubyOnRails
[17:38:23] nogic: has joined #RubyOnRails
[17:42:38] GodFather: has joined #RubyOnRails
[17:44:43] ayonkhan: has joined #RubyOnRails
[17:45:32] troys: has joined #RubyOnRails
[17:47:00] Romuloux: has joined #RubyOnRails
[17:52:07] doctorspektor: has joined #RubyOnRails
[17:55:33] doctorspektor: has left #RubyOnRails: ()
[17:57:06] mikecmpbll: has joined #RubyOnRails
[17:57:55] orbyt_: has joined #RubyOnRails
[17:59:44] Technodrome: has joined #RubyOnRails
[18:00:46] hahuang65: has joined #RubyOnRails
[18:02:12] kies: has joined #RubyOnRails
[18:04:05] srinidhi: has joined #RubyOnRails
[18:10:26] justrying: has joined #RubyOnRails
[18:10:33] conta1: has joined #RubyOnRails
[18:11:04] conta2: has joined #RubyOnRails
[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.
[18:19:08] tycoon177: Romuloux: i'll try out the bootstrap example, thanks!
[18:21:57] jphase: has joined #RubyOnRails
[18:50:57] Technodrome: has joined #RubyOnRails
[18:51:17] coder2000: has joined #RubyOnRails
[18:51:56] coder2000: Good afteroon
[18:54:27] tycoon177: Romuloux: thanks for the example. I was able to modify that to my needs :)
[19:02:29] Romuloux: tycoon177: NP
[19:02:30] orbyt_: has joined #RubyOnRails
[19:06:28] knight33: has joined #RubyOnRails
[19:10:26] lxsameer: has joined #RubyOnRails
[19:16:12] Technodrome: has joined #RubyOnRails
[19:27:51] mcr1: has joined #RubyOnRails
[19:33:24] dopie: has joined #RubyOnRails
[19:33:36] dopie: Hey all why am I getting a user error on here??
[19:33:37] dopie: https://gist.github.com/staycreativedesign/ad701e4d327d0d38febe549b98c6135e
[19:36:21] matthewd: dopie: `post :create, params: new_user_params`
[19:37:27] dopie: matthewd: thank you sire
[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?
[19:48:03] Macaveli: has joined #RubyOnRails
[19:52:05] snickers: has joined #RubyOnRails
[20:00:46] basket: has joined #RubyOnRails
[20:15:23] FastJack: has joined #RubyOnRails
[20:18:23] orbyt_: has joined #RubyOnRails
[20:45:08] gil_: has joined #RubyOnRails
[20:54:52] Ropeney: has joined #RubyOnRails
[20:56:11] TinkerTyper: has joined #RubyOnRails
[20:58:14] cpruitt: has joined #RubyOnRails
[21:03:09] quazimodo: has joined #RubyOnRails
[21:13:17] gusrub: has joined #RubyOnRails
[21:23:02] alfiemax: has joined #RubyOnRails
[21:23:05] orbyt_: has joined #RubyOnRails
[21:27:55] FrostCandy: has joined #RubyOnRails
[21:40:29] GodFather: has joined #RubyOnRails
[21:41:47] bruno-: has joined #RubyOnRails
[21:54:28] mostlybadfly: has joined #RubyOnRails
[22:03:37] safetypin: has joined #RubyOnRails
[22:37:21] cpruitt: has left #RubyOnRails: ()
[22:39:15] safetypin: has joined #RubyOnRails
[22:40:00] alfiemax: has joined #RubyOnRails
[22:40:35] ivanskie: has joined #RubyOnRails
[22:40:51] ivanskie: hi everybody
[22:41:22] ivanskie: I have: sensor_data table with columns, sensor_id, data, units, datetime
[22:41:36] ivanskie: i want to validate uniqueness of :sensor_id paired with datetime
[22:41:41] ivanskie: is this correct: validates :sensor_id, uniqueness: { scope: :datetime }
[22:42:44] tcopeland: has joined #RubyOnRails
[22:48:35] mcr1: has joined #RubyOnRails
[22:49:14] elomatreb: You probably also want a database level unique index on (datetime, sensor_id)
[22:53:21] emers2n: has joined #RubyOnRails
[22:59:07] Radar: GOOD MORNING
[23:03:17] alfiemax: has joined #RubyOnRails
[23:06:52] ivanskie: elomatreb add_index :sensor_data, [ :sensor_id, :datetime ], unique: true
[23:08:48] d5sx43: has joined #RubyOnRails
[23:19:09] ivanskie: hmm looks like i can't really test it right now. got a blocker.
[23:19:25] LenPayne: has joined #RubyOnRails
[23:26:47] orbyt_: has joined #RubyOnRails
[23:36:37] safetypin: has joined #RubyOnRails
[23:44:11] codelahoma: has joined #RubyOnRails
[23:45:51] alfiemax: has joined #RubyOnRails
[23:47:11] jottr: has joined #RubyOnRails
[23:52:32] mcr1: has joined #RubyOnRails
[23:52:38] Ropeney: has joined #RubyOnRails