« Back to channel list

#RubyOnRails - 21 October 2018

« Back 1 day Forward 1 day »
[00:16:04] kurko_: has joined #RubyOnRails
[00:33:31] orbyt_: has joined #RubyOnRails
[00:38:17] LambdaSource: has joined #RubyOnRails
[01:16:07] ur5us: has joined #RubyOnRails
[01:53:29] Tempesta: has joined #RubyOnRails
[01:53:57] cxl: I haven't done Ruby in a while, and I can't understand why Foo.new_token works but not self.new_token in this snippet: https://dpaste.de/33c9
[02:06:51] apparition: has joined #RubyOnRails
[02:06:52] armyriad: has joined #RubyOnRails
[02:10:30] gambl0re: has joined #RubyOnRails
[03:07:55] za1b1tsu: has joined #RubyOnRails
[03:09:32] braincrash: has joined #RubyOnRails
[03:13:42] ivanskie: has joined #RubyOnRails
[03:19:33] ur5us: has joined #RubyOnRails
[04:16:30] zorp: has joined #RubyOnRails
[04:16:36] zorp: I'm currently doing redirect_to(subdomain: @user.name, controller: 'users', action: 'show') and it works but I think it should be simpler
[04:16:43] zorp: hi, I want "redirect to @user" after sign up to redirect to a subdomain that's the username, how can I set up my route so this works?
[04:16:52] zorp: oops, wrong order :s
[04:34:23] agent_white: has joined #RubyOnRails
[05:20:12] WA9ACE: has joined #RubyOnRails
[05:27:41] choke: has joined #RubyOnRails
[05:32:07] whysthatso: has joined #RubyOnRails
[05:53:47] ivanskie: has joined #RubyOnRails
[06:08:03] MoritaShinobu: has joined #RubyOnRails
[06:33:16] Puffball: has joined #RubyOnRails
[06:45:04] reber: has joined #RubyOnRails
[06:46:01] reber__: has joined #RubyOnRails
[06:48:26] mangold: has joined #RubyOnRails
[06:51:18] Saukk: has joined #RubyOnRails
[06:56:18] Dbugger: has joined #RubyOnRails
[07:59:57] GodFather: has joined #RubyOnRails
[08:03:32] jackrandom: has joined #RubyOnRails
[08:21:44] danguita: has joined #RubyOnRails
[08:31:55] AzaToth: has joined #RubyOnRails
[08:42:22] sameerynho: has joined #RubyOnRails
[08:59:11] whysthatso: has joined #RubyOnRails
[09:03:52] yaw: has joined #RubyOnRails
[09:33:10] whysthatso: has joined #RubyOnRails
[10:10:13] ur5us: has joined #RubyOnRails
[10:23:12] ur5us: has joined #RubyOnRails
[10:24:15] danguita: has joined #RubyOnRails
[10:26:07] sandstrom: has joined #RubyOnRails
[10:33:10] ellcs: has joined #RubyOnRails
[10:33:21] fragamus: has joined #RubyOnRails
[10:45:02] danguita: has joined #RubyOnRails
[10:55:29] ariedler: has joined #RubyOnRails
[10:59:04] sandstrom: has joined #RubyOnRails
[11:09:02] lankanmon: has joined #RubyOnRails
[11:20:12] kapil____: has joined #RubyOnRails
[11:21:31] mikecmpbll: has joined #RubyOnRails
[11:22:56] fragamus: has joined #RubyOnRails
[11:28:17] roshanavand: has joined #RubyOnRails
[12:04:12] tbuehlmann: has joined #RubyOnRails
[12:11:57] blackmesa: has joined #RubyOnRails
[12:34:08] blackmesa1: has joined #RubyOnRails
[12:54:13] DTZUZO: has joined #RubyOnRails
[12:57:23] GodFather: has joined #RubyOnRails
[12:59:17] sandstrom: has joined #RubyOnRails
[13:00:43] MoritaShinobu: has joined #RubyOnRails
[13:01:42] Puffball: has joined #RubyOnRails
[13:05:13] Xiti: has joined #RubyOnRails
[13:07:18] blackmesa1: has joined #RubyOnRails
[13:14:19] apparition: has joined #RubyOnRails
[13:37:44] conta: has joined #RubyOnRails
[14:12:27] blackmesa1: has joined #RubyOnRails
[14:14:42] kurko_: has joined #RubyOnRails
[14:22:04] i8igmac: has joined #RubyOnRails
[14:22:56] i8igmac: is there a controller generate for a form post request. that will configure routes and create example view.erb.html
[14:25:14] i8igmac: i guess its not to difficult to create a basic form post request. but for the sake of speed.
[14:25:48] MoritaShinobu: has joined #RubyOnRails
[14:31:44] wojnar: has joined #RubyOnRails
[14:41:57] ivanskie: has joined #RubyOnRails
[14:42:05] kurko_: has joined #RubyOnRails
[14:46:23] GodFather: has joined #RubyOnRails
[15:01:54] pLaTo0n: has joined #RubyOnRails
[15:12:17] conta: has joined #RubyOnRails
[15:53:42] dcope: anyone in here developing in docker? i can't figure out if the slow rails server is isolated to my setup or if that's just how it is.
[16:02:38] fragamus: has joined #RubyOnRails
[16:20:22] fragamus: has joined #RubyOnRails
[16:32:24] noodle: has joined #RubyOnRails
[16:49:42] LiftLeft: has joined #RubyOnRails
[16:57:55] orbyt_: has joined #RubyOnRails
[17:12:35] orbyt_: has joined #RubyOnRails
[17:13:27] tdy: has joined #RubyOnRails
[17:31:41] LiftLeft: has joined #RubyOnRails
[17:46:35] kurko_: has joined #RubyOnRails
[17:58:40] GodFather: has joined #RubyOnRails
[18:18:39] nickjj: dcope, i am with docker for windows and it's nearly as fast as native linux for typical rails app dev
[18:19:39] nickjj: rails picks up file changes in about 100ms and webpack compiles 100kb+ of CSS in about 3 seconds -- on a 5 year old workstation
[18:31:34] fragamus: has joined #RubyOnRails
[18:31:43] LiftLeft: has joined #RubyOnRails
[18:31:53] Dimik: has joined #RubyOnRails
[18:32:37] LiftLeft2: has joined #RubyOnRails
[18:32:54] beholders_eye: has joined #RubyOnRails
[18:36:33] sandstrom: has joined #RubyOnRails
[18:41:27] ellcs: has joined #RubyOnRails
[18:44:10] hd1: has joined #RubyOnRails
[19:08:36] fragamus: has joined #RubyOnRails
[19:17:20] fragamus: has joined #RubyOnRails
[19:35:23] kapil____: has joined #RubyOnRails
[19:41:45] lexileo: has joined #RubyOnRails
[19:52:51] hd1: has joined #RubyOnRails
[20:03:26] hd1: has left #RubyOnRails: ()
[20:18:24] kn-928: has joined #RubyOnRails
[20:21:23] walidvb: has joined #RubyOnRails
[20:22:39] walidvb: i'm trying to understand how i can have a model validate its associations, or smth about them
[20:23:31] walidvb: concrete example: i have works, that have participations(which have attr percentage). I want to validate the fact that the total of their participations.percentage == 100
[20:24:49] walidvb: i have accepts_nested_association on Work, and a validation on check_sum_of_participations. Problem is, i think, that when i create the work and do the check, the participations don't exist yet, so it doesn't compute the shares yet
[20:42:07] fragamus: has joined #RubyOnRails
[20:58:22] blackmesa: has joined #RubyOnRails
[21:03:25] hd1: has joined #RubyOnRails
[21:03:52] hd1: ACTION wonders why his erb template isn't being rendered
[21:08:29] lexileo: has joined #RubyOnRails
[21:14:52] GodFather: has joined #RubyOnRails
[21:18:17] daemonwrangler: has joined #RubyOnRails
[21:23:17] fragamus: has joined #RubyOnRails
[21:26:44] Radar: GOOD MORNING
[21:28:09] hd1: Radar: morning, matey
[21:28:23] ellcs: has joined #RubyOnRails
[21:28:57] Radar: hd1: your erb template isn't being loaded because you have a before_action that is blocking it, or your controller is directed to render a different template, or a third possibility: the controller redirects.
[21:29:11] Radar: If it's not one of those three things then I am out of ideas ;)
[21:29:36] Radar: Oh I have another idea actually: your expected template is a part of a Rails engine but your application overrides the template at the same path.
[21:41:10] armyriad: has joined #RubyOnRails
[21:43:08] orbyt_: has joined #RubyOnRails
[21:45:50] dtzuzu: has joined #RubyOnRails
[21:47:42] orbyt_: has joined #RubyOnRails
[21:55:40] kn-928: has joined #RubyOnRails
[21:59:58] funnel: has joined #RubyOnRails
[22:16:13] Vashy: has joined #RubyOnRails
[22:16:28] Vashy: anyone have a guide I can follow to convert my Rails 5.2 app into a Rails API?
[22:23:02] lexileo: has joined #RubyOnRails
[22:25:47] hd1: Vashy: what do you mean by "convert to a rails api"?
[22:26:08] hd1: you already get an API in rails far as I know
[22:26:34] Vashy: hd1, I guess I'm not entirely sure myself, so here's the situation: I created a rails app, created some models/views/controllers, then decided to try building a react front end but idk how to interact with the app?
[22:26:55] Vashy: some tutorials I looked up created a brand new rails api app for the tutorial using: 'rails new --api ...'
[22:30:08] Vashy: hd1, do you have some material you can point to that I can read to better understand how to use an existing rails app as an api?
[22:31:53] orbyt_: has joined #RubyOnRails
[22:44:15] pharma_joe: has joined #RubyOnRails
[22:55:35] ur5us: has joined #RubyOnRails
[22:58:12] i8igmac: havenwood: is there a method for running system commands from rails that you might suggest
[22:58:45] i8igmac: `example command that might take ten minutes to complete`
[22:59:22] sameerynho: has joined #RubyOnRails
[22:59:48] i8igmac: i was thinking about creating a daemon.rb that would listen for a list of commands for a multi threaded or multiprocess design
[23:00:56] havenwood: i8igmac: Say more about the commands you're running. Do you need them to just do something in the background? Does anything need to happen when they finish?
[23:01:37] i8igmac: `wget location/large-file -O /tmp/files`
[23:02:42] i8igmac: the server becomes unresponsive when a time consuming command is running in a rails thread.
[23:04:06] i8igmac: run in the background is ideal
[23:04:22] i8igmac: im running this from a controller
[23:05:06] havenwood: i8igmac: I'd suggest Active Job. Maybe just use Sucker Punch.
[23:05:21] i8igmac: ill check it out, thanks
[23:05:33] havenwood: i8igmac: https://github.com/brandonhilkert/sucker_punch#active-job
[23:06:09] havenwood: i8igmac: https://guides.rubyonrails.org/active_job_basics.html
[23:06:17] pharma_joe: has joined #RubyOnRails
[23:10:33] havenwood: i8igmac: Or you can always: pid = spawn 'wget ...'; Process.detach pid
[23:10:41] havenwood: i8igmac: Or use Ruby to copy ;P
[23:11:13] i8igmac: wow that looks cool
[23:12:39] i8igmac: pid=spawn 'sleep 20'; Process.detach pid
[23:14:39] pharma_joe: has joined #RubyOnRails
[23:15:58] i8igmac: that was a quick fix ;-)
[23:36:21] tdy: has joined #RubyOnRails
[23:57:58] fragamus: has joined #RubyOnRails