« Back to channel list

#RubyOnRails - 21 June 2018

« Back 1 day Forward 1 day »
[00:07:37] Guest58336: has joined #RubyOnRails
[00:17:27] Guest58336: has joined #RubyOnRails
[00:31:28] wethu: has joined #RubyOnRails
[00:33:33] tjbp: has joined #RubyOnRails
[00:40:26] roamingdog: has joined #RubyOnRails
[00:47:15] fragamus: has joined #RubyOnRails
[00:48:34] orbyt_: has joined #RubyOnRails
[01:02:28] Guest58336: has joined #RubyOnRails
[01:06:50] chouhoulis: has joined #RubyOnRails
[01:12:43] Guest58336: has joined #RubyOnRails
[01:19:59] dogweather: has joined #RubyOnRails
[01:32:30] Guest58336: has joined #RubyOnRails
[01:46:38] Technodrome: has joined #RubyOnRails
[01:57:46] workmad3: has joined #RubyOnRails
[02:05:21] ElFerna: has joined #RubyOnRails
[02:12:54] cschneid: has joined #RubyOnRails
[02:27:29] Guest58336: has joined #RubyOnRails
[02:33:46] tdy: has joined #RubyOnRails
[02:37:29] Guest58336: has joined #RubyOnRails
[02:51:47] sevenseacat: has joined #RubyOnRails
[03:13:49] braincras: has joined #RubyOnRails
[03:17:24] Guest58336: has joined #RubyOnRails
[03:44:12] dogweather: has joined #RubyOnRails
[03:52:07] Technodrome: has joined #RubyOnRails
[04:00:40] fragamus: has joined #RubyOnRails
[04:01:41] haxx0r: has joined #RubyOnRails
[04:01:44] haxx0r: https://thepasteb.in/p/2RhK443ZyO7s4 why is the .average() function returning 1/100ths of the real result? that's weired tho
[04:06:39] Radar: is it tho
[04:06:51] Radar: haxx0r: !rule3
[04:06:51] helpa: haxx0r: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) or Hastebin (https://hastebin.com) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[04:06:57] Radar: for future ref
[04:07:12] akaiiro: has joined #RubyOnRails
[04:07:25] haxx0r: i don't even understand how this could help
[04:07:29] Guest58336: has joined #RubyOnRails
[04:07:33] haxx0r: i just read the output wrong
[04:07:39] Radar: It's not a pastebin site that takes 30seconds to load
[04:07:42] haxx0r: e2 at the end for 10^2
[04:07:42] Radar: 0.1838e2 == 18.38 # => true
[04:17:26] Guest58336: has joined #RubyOnRails
[04:22:30] Guest58336: has joined #RubyOnRails
[04:22:47] nickjj: has joined #RubyOnRails
[04:23:05] haxx0r: i need to pull power-consumption stats from our facility and need to log them for billing purposes. i just wanted to create AmpStats. i had the idea to use influx DB (and grafana). is it useful to save the stuff in mysql aswell and after the record is created push it over to influxdb or is it best practice so save it directly there?
[04:27:29] Guest58336: has joined #RubyOnRails
[04:40:07] wethu: has joined #RubyOnRails
[04:41:22] JamJam_kid: has joined #RubyOnRails
[04:42:26] mjolnird: has joined #RubyOnRails
[04:45:39] akaiiro: has joined #RubyOnRails
[05:03:41] Radar: haxx0r: it's generally advised that you have a single source of truth for data.
[05:06:05] cschneid: has joined #RubyOnRails
[05:06:53] apeiros: has joined #RubyOnRails
[05:12:42] Guest58336: has joined #RubyOnRails
[05:17:21] cschneid: has joined #RubyOnRails
[05:30:27] cschneid: has joined #RubyOnRails
[05:32:26] Guest58336: has joined #RubyOnRails
[05:34:31] G: has joined #RubyOnRails
[05:34:54] planigan: has joined #RubyOnRails
[05:38:03] dogweather: has joined #RubyOnRails
[05:42:25] Guest58336: has joined #RubyOnRails
[05:44:35] reber: has joined #RubyOnRails
[05:52:26] Guest58336: has joined #RubyOnRails
[05:54:19] jcarl43: has joined #RubyOnRails
[05:56:55] srinidhi: has joined #RubyOnRails
[05:58:32] workmad3: has joined #RubyOnRails
[06:23:05] mikelavs: has joined #RubyOnRails
[06:23:22] mauro1254: has joined #RubyOnRails
[06:27:10] DTZUZO: has joined #RubyOnRails
[06:32:30] Guest58336: has joined #RubyOnRails
[06:39:56] dogweather: has joined #RubyOnRails
[06:40:22] russt: has joined #RubyOnRails
[06:44:36] fabiob: has joined #RubyOnRails
[06:47:30] Guest58336: has joined #RubyOnRails
[06:48:33] fabiob: Hi, If you have a nested resource (say authors nesting books), what's the best practice when creating a new book? POSTing to /author/:id/books or POSTing to /books and pass the author someway (I think that would require a new non-resourceful with a new bound parameter, like POST /books/:author/)?
[06:49:00] epochwolf: has joined #RubyOnRails
[06:55:26] epochwolf: has joined #RubyOnRails
[06:57:32] craysiii: has joined #RubyOnRails
[07:01:04] baweaver: has joined #RubyOnRails
[07:01:22] craysiii: has joined #RubyOnRails
[07:12:14] craysiii: has joined #RubyOnRails
[07:15:36] epochwolf: has joined #RubyOnRails
[07:21:46] srinidhi: has joined #RubyOnRails
[07:25:17] za1b1tsu: has joined #RubyOnRails
[07:26:06] za1b1tsu: Anyway I can access the session variable in the action mailer?
[07:27:27] Guest58336: has joined #RubyOnRails
[07:27:58] haxx0r: actionctroller isn't actionmailer. ya?
[07:28:05] haxx0r: buy you can pass it into
[07:28:47] haxx0r: UserMailer.deliver(user, "Welcome", x, y,, session[:variable])
[07:37:26] Guest58336: has joined #RubyOnRails
[07:38:12] sandstrom: has joined #RubyOnRails
[07:39:45] dogweather: has joined #RubyOnRails
[07:40:55] za1b1tsu: has joined #RubyOnRails
[07:41:48] molloy: has left #RubyOnRails: ("WeeChat 1.0.1")
[07:45:48] dogweather: has joined #RubyOnRails
[07:47:28] Guest58336: has joined #RubyOnRails
[07:49:38] za1b1tsu: haxx0r: I've read about ActionDispatch::Request.new(ENV), but I can't get it to work
[07:50:39] dionysus69: has joined #RubyOnRails
[07:52:35] DoubleMalt: has joined #RubyOnRails
[07:52:45] Guest58336: has joined #RubyOnRails
[07:52:48] za1b1tsu: What I need is to use the session variable in the devise confirmation mailer
[07:53:00] za1b1tsu: it got so complicated, anyone has any pointers?
[07:53:16] uksio: has joined #RubyOnRails
[07:55:43] Radar: za1b1tsu: wat
[07:55:48] Radar: za1b1tsu: pass it in to your mailer. haxx0r was right.
[07:56:06] Radar: Do not do ActionDispatch::Request.new(ENV) just to get at one variable.
[07:56:13] za1b1tsu: I can, because devise call it from a lib and I can't replace it
[07:56:20] haxx0r: you pass that particular variable or hash into the mailer call
[07:56:29] haxx0r: you can override the devise mailer
[07:56:48] haxx0r: https://github.com/plataformatec/devise/wiki/How-To:-Use-custom-mailer
[07:57:02] haxx0r: its literally 8 loc
[07:58:39] za1b1tsu: haxx0r: I can override the devise mailer yes, but I can't change how it's called. That's what I need right? Put a param in the calling method
[07:58:57] workmad3: has joined #RubyOnRails
[07:59:07] haxx0r: yes you can change the way it's called.
[07:59:13] haxx0r: exactly, just override, wherever it's called
[08:02:41] Guest58336: has joined #RubyOnRails
[08:02:42] za1b1tsu: haxx0r: found it, but it's called from the model
[08:02:55] haxx0r: of course it's called from the model.
[08:02:59] za1b1tsu: it's a module that is included to user
[08:03:01] haxx0r: from where else should it be?
[08:03:11] za1b1tsu: but I don't have access to session from the model right?
[08:03:19] haxx0r: get a workaround?
[08:03:29] za1b1tsu: undefined local variable or method `session' for #<Account:0x007fef35b92428>
[08:03:31] haxx0r: call from controller?
[08:03:45] haxx0r: u can send the mail from the controller
[08:04:21] haxx0r: a = Account.create...
[08:04:33] haxx0r: Mailer.deliver(a, session[:variable])
[08:06:34] za1b1tsu: that means runing the whole devise flow
[08:09:49] conta: has joined #RubyOnRails
[08:17:49] mauro1254: Anyone using ActiveResource / Her ?
[08:54:22] jottr: has joined #RubyOnRails
[09:00:39] workmad3: has joined #RubyOnRails
[09:06:09] cschneid: has joined #RubyOnRails
[09:09:27] gregf_: has joined #RubyOnRails
[09:12:54] ur5us: has joined #RubyOnRails
[09:44:59] KeyJoo: has joined #RubyOnRails
[09:52:53] Sylario: has joined #RubyOnRails
[09:57:31] jottr: has joined #RubyOnRails
[10:02:29] desperek: has joined #RubyOnRails
[10:14:35] jottr: has joined #RubyOnRails
[10:23:12] Ergo: has joined #RubyOnRails
[10:33:46] za1b1tsu: has joined #RubyOnRails
[11:06:42] wethu: has joined #RubyOnRails
[11:16:50] nickjj: has joined #RubyOnRails
[11:19:26] conta: has joined #RubyOnRails
[11:23:20] pavelz: why i get name error for modules that suppose to be loaded from lib ?
[11:23:42] pavelz: if I copy modules to app/lib , they are discovered naturally
[11:23:49] lupine: has joined #RubyOnRails
[11:34:00] za1b1tsu: has joined #RubyOnRails
[11:42:12] tdy: has joined #RubyOnRails
[11:43:09] jottr: has joined #RubyOnRails
[12:03:16] mauro1254: Hi folks, are there alternatives to ActiveResource / Her supporting associations with activeRecord models?
[12:18:56] za1b1tsu: has joined #RubyOnRails
[12:22:18] nzst: has joined #RubyOnRails
[12:30:53] jottr: has joined #RubyOnRails
[12:41:53] za1b1tsu: has joined #RubyOnRails
[12:45:09] ams__: has joined #RubyOnRails
[12:49:17] GodFather: has joined #RubyOnRails
[12:49:46] fmcgeough: has joined #RubyOnRails
[12:56:09] dachi: has joined #RubyOnRails
[12:56:51] dachi: hi. can you help me, I'm trying to send a delete request with javascript using rails-ujs. I can't use data-method="delete" attribute, I need to do this manually using javascript code.
[12:57:30] dachi: does rails ujs provide a method for this, if you know?
[13:06:23] OneNeptune: has joined #RubyOnRails
[13:17:48] pavelz: why is tha when I move module to app/lib it starts to resolve and not throw NameError ?
[13:21:57] nzst: app/* is autoloaded by rails
[13:23:19] pavelz: lib is not ? has it changed from 4.2?
[13:23:42] nzst: <HOME>/lib isn't, no
[13:24:14] pavelz: but would this enable that? : config.autoload_paths << Rails.root.join('lib')
[13:26:33] nzst: yea, that might work out for you, you can probably search more about it, though https://stackoverflow.com/questions/38198668/rails-5-load-lib-files-in-production
[13:34:10] OneNeptune: has joined #RubyOnRails
[13:34:20] dblessing: has joined #RubyOnRails
[13:34:44] Technodrome: has joined #RubyOnRails
[13:35:49] jottr: has joined #RubyOnRails
[13:37:57] fmcgeough: has joined #RubyOnRails
[13:38:45] mjolnird: has joined #RubyOnRails
[13:44:45] pavelz: nzst: thanks thats informational.
[13:47:40] kapil___: has joined #RubyOnRails
[14:07:46] Technodrome: has joined #RubyOnRails
[14:10:26] chouhoulis: has joined #RubyOnRails
[14:10:40] dblessing: has joined #RubyOnRails
[14:32:23] akaiiro: has joined #RubyOnRails
[14:35:26] GodFather: has joined #RubyOnRails
[14:42:38] workmad3: has joined #RubyOnRails
[14:48:05] ElFerna: has joined #RubyOnRails
[14:58:36] apeiros: has joined #RubyOnRails
[15:01:00] Technodrome: has joined #RubyOnRails
[15:03:26] deathwishdave: has joined #RubyOnRails
[15:07:15] OneNeptune: has joined #RubyOnRails
[15:15:16] jottr: has joined #RubyOnRails
[15:21:59] za1b1tsu: has joined #RubyOnRails
[15:24:01] tcopeland: has joined #RubyOnRails
[15:33:02] dblessing: has joined #RubyOnRails
[15:35:08] Inside: has joined #RubyOnRails
[15:52:28] jcarl43: has joined #RubyOnRails
[15:53:14] DTZUZO: has joined #RubyOnRails
[16:02:03] jottr: has joined #RubyOnRails
[16:05:28] eckhardt_: has joined #RubyOnRails
[16:18:15] blackmesa: has joined #RubyOnRails
[16:20:22] cagomez: has joined #RubyOnRails
[16:21:25] cagomez: when using Dalli for Rails.cache, does `exist(key)` still make a network request?
[16:21:36] Liothen: has joined #RubyOnRails
[16:29:03] rgiscard: has joined #RubyOnRails
[16:31:28] jottr: has joined #RubyOnRails
[16:34:28] OneNeptune: has joined #RubyOnRails
[16:42:31] chouhoulis: has joined #RubyOnRails
[16:45:13] GodFather_: has joined #RubyOnRails
[16:48:20] chouhoulis: has joined #RubyOnRails
[16:53:46] newton: has joined #RubyOnRails
[17:10:57] JamJam_kid: has joined #RubyOnRails
[17:14:26] blackmesa: has joined #RubyOnRails
[17:24:04] orbyt_: has joined #RubyOnRails
[17:38:19] sameerynho: has joined #RubyOnRails
[17:40:50] Guest82829: has joined #RubyOnRails
[17:47:44] Guest82829: has joined #RubyOnRails
[17:57:45] Guest82829: has joined #RubyOnRails
[18:07:46] Guest82829: has joined #RubyOnRails
[18:17:32] Guest82829: has joined #RubyOnRails
[18:20:38] russt: has joined #RubyOnRails
[18:21:23] orbyt_: has joined #RubyOnRails
[18:27:39] Guest82829: has joined #RubyOnRails
[18:37:29] Guest82829: has joined #RubyOnRails
[18:42:42] mjolnird: has joined #RubyOnRails
[18:47:30] Guest82829: has joined #RubyOnRails
[18:54:31] eckhardt_: has joined #RubyOnRails
[18:57:47] Guest82829: has joined #RubyOnRails
[19:06:20] dionysus69: has joined #RubyOnRails
[19:07:31] Guest82829: has joined #RubyOnRails
[19:11:06] dogweather: has joined #RubyOnRails
[19:14:53] dogweather: has joined #RubyOnRails
[19:17:44] Guest82829: has joined #RubyOnRails
[19:23:05] ElFerna: has joined #RubyOnRails
[19:26:39] chouhoulis: has joined #RubyOnRails
[19:27:26] Guest82829: has joined #RubyOnRails
[19:32:05] chouhoulis: has joined #RubyOnRails
[19:37:34] Guest82829: has joined #RubyOnRails
[19:37:37] chouhoulis: has joined #RubyOnRails
[19:43:08] chouhoulis: has joined #RubyOnRails
[19:45:50] cagomez: has joined #RubyOnRails
[19:46:47] dogweather: has joined #RubyOnRails
[19:47:13] desperek: has joined #RubyOnRails
[19:47:35] Guest82829: has joined #RubyOnRails
[19:51:58] eckhardt_: has joined #RubyOnRails
[19:57:27] Guest82829: has joined #RubyOnRails
[20:01:08] weird_error: has joined #RubyOnRails
[20:06:20] dogweather: has joined #RubyOnRails
[20:07:28] Guest82829: has joined #RubyOnRails
[20:14:32] workmad3: has joined #RubyOnRails
[20:17:36] Guest82829: has joined #RubyOnRails
[20:27:33] Guest82829: has joined #RubyOnRails
[20:28:20] safetypin: has joined #RubyOnRails
[20:37:39] Guest82829: has joined #RubyOnRails
[20:47:34] Guest82829: has joined #RubyOnRails
[20:57:04] chouhoulis: has joined #RubyOnRails
[20:57:42] Guest82829: has joined #RubyOnRails
[20:58:13] mjolnird: has joined #RubyOnRails
[21:02:36] chouhoulis: has joined #RubyOnRails
[21:07:38] Guest82829: has joined #RubyOnRails
[21:11:16] fmcgeough: has joined #RubyOnRails
[21:13:42] chouhoulis: has joined #RubyOnRails
[21:15:51] merpnderp: has joined #RubyOnRails
[21:16:43] jgpawletko: has joined #RubyOnRails
[21:17:31] Guest82829: has joined #RubyOnRails
[21:19:04] chouhoulis: has joined #RubyOnRails
[21:23:34] chouhoulis: has joined #RubyOnRails
[21:27:30] Guest82829: has joined #RubyOnRails
[21:29:07] chouhoulis: has joined #RubyOnRails
[21:30:55] ur5us: has joined #RubyOnRails
[21:34:27] chouhoulis: has joined #RubyOnRails
[21:37:42] Guest82829: has joined #RubyOnRails
[21:38:36] merpnderp: Why is rails better than django?
[21:39:55] chouhoulis: has joined #RubyOnRails
[21:42:45] baweaver: That said I don't know nearly enough about Django to speak to its strengths and weaknesses.
[21:43:19] havenwood: merpnderp: Ruby is a more flexible language than Python, and Rails takes advantage of that in that it modifies the Ruby language to suit its purposes.
[21:43:52] havenwood: merpnderp: Rails is more widely used, and there's a vaster array of web app related libraries to lean on.
[21:43:54] ur5us: has joined #RubyOnRails
[21:44:18] havenwood: merpnderp: Rails leads the way in many regards.
[21:44:36] havenwood: merpnderp: Django had solid WebSocket support first with Twistd. Rails now has ActionCable. Django has a built-in admin panel.
[21:45:28] chouhoulis: has joined #RubyOnRails
[21:47:45] Guest82829: has joined #RubyOnRails
[21:47:58] merpnderp: This is interesting: https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F0505cl,%2Fm%2F06y_qx
[21:48:30] havenwood: merpnderp: People don't say "Ruby on Rails"
[21:48:37] havenwood: merpnderp: They just say "Rails"
[21:48:54] havenwood: merpnderp: Search for "Django on Python" versus "Ruby on Rails" ;-P
[21:48:57] merpnderp: havenwood: google trends recognized that I meant the RoR framework.
[21:49:10] merpnderp: Both of those were Google recognized terms.
[21:49:41] havenwood: merpnderp: I don't think it works like that. It thinks Django Jane and Rails Steakhouse.
[21:50:20] havenwood: The immense popularity of Django Jane clearly skews the results.
[21:52:26] merpnderp: havenwood: no, it knows what the RoR framework and Django framework are.
[21:52:36] merpnderp: Try it yourself. See the list of dropdowns asking you to clarify which ones you mean.
[21:53:11] merpnderp: If you just search for a naked 'django' word, it blows ror out of the wate.r
[21:53:18] havenwood: merpnderp: That doesn't mean it properly identifies "Rails" searches as Ruby on Rails. A quick sanity check of different terms seems to show it's all over the place.
[21:53:49] havenwood: merpnderp: Anyhoo. You can look at package downloads for Rails versus Django.
[21:56:32] chouhoulis: has joined #RubyOnRails
[21:57:16] havenwood: merpnderp: It looks to me like Rail's current version has more downloads than Django for all time. That seems like too much. Mmm.
[21:57:29] havenwood: Anyways, Rails is popular. >.>
[21:57:33] Guest82829: has joined #RubyOnRails
[21:58:52] havenwood: merpnderp: Rails and Django are both wildly popular. Don't worry about either's popularity.
[22:01:08] chouhoulis: has joined #RubyOnRails
[22:06:38] chouhoulis: has joined #RubyOnRails
[22:06:38] sandstrom: has joined #RubyOnRails
[22:11:55] chouhoulis: has joined #RubyOnRails
[22:12:04] FernandoBasso: has joined #RubyOnRails
[22:12:54] Puffball: has joined #RubyOnRails
[22:14:14] roamingdog: has joined #RubyOnRails
[22:14:58] workmad3: has joined #RubyOnRails
[22:17:36] chouhoulis: has joined #RubyOnRails
[22:23:06] chouhoulis: has joined #RubyOnRails
[22:24:48] Radar: GOOD MORNING
[22:25:22] Radar: [07:38:36] <merpnderp> Why is rails better than django? <- because our underlying language doesn't introduce changes that break > 50% of the ecosystem... and not to mention that we get a new language release every Christmas.
[22:25:36] Radar: Exactly how many years did it take for Python 3 to be released?
[22:25:52] JamJam_kid: has joined #RubyOnRails
[22:26:21] Radar: I rest my case.
[22:26:32] Puffball: has joined #RubyOnRails
[22:26:58] Radar: Our dependency manager is also understandable by mere mortals.
[22:27:04] merpnderp: So far the Rails intro video on the homepage is full of impressive magic.
[22:27:12] Radar: Our documentation is written for people _without_ computer science degrees.
[22:27:25] Radar: (P.S. My case resumes)
[22:27:45] Radar: Rails is almost entirely impressive "magic". That is what makes Rails Rails.
[22:28:08] Radar: If you want something more explicit but with just as nice syntax then I would suggest looking at Elixir's Phoenix.
[22:28:34] Radar: Rails strives for optimising "developer happiness" at the cost of a little _too much_ magic.
[22:28:36] chouhoulis: has joined #RubyOnRails
[22:28:59] Radar: putting "resources :posts" in your routes file generates 8 routes that route towards 7 actions these days. Because this makes sense to most people.
[22:29:21] Radar: form_with(@post) <- this will generate a form that goes to the create action or the update action, depending on if @post represents an object persisted in the database or not.
[22:29:44] Radar: redirect_to @post <- this will redirect to /posts/1 due to more of that magic we talked about.
[22:30:44] havenwood: merpnderp: +1 Phoenix if you want explicit
[22:31:28] GodFather: has joined #RubyOnRails
[22:37:39] Guest82829: has joined #RubyOnRails
[22:39:30] chouhoulis: has joined #RubyOnRails
[22:42:52] FernandoBasso: has joined #RubyOnRails
[22:43:08] blackmesa: has joined #RubyOnRails
[22:45:08] chouhoulis: has joined #RubyOnRails
[22:47:48] Guest82829: has joined #RubyOnRails
[22:50:38] chouhoulis: has joined #RubyOnRails
[22:50:56] JamJam_kid: has joined #RubyOnRails
[22:54:45] JamJam_kid: has joined #RubyOnRails
[22:55:58] chouhoulis: has joined #RubyOnRails
[22:57:24] ur5us: has joined #RubyOnRails
[23:01:15] ur5us: has joined #RubyOnRails
[23:01:42] chouhoulis: has joined #RubyOnRails
[23:02:14] sung: has joined #RubyOnRails
[23:06:19] wethu: has joined #RubyOnRails
[23:06:58] chouhoulis: has joined #RubyOnRails
[23:11:01] ur5us: has joined #RubyOnRails
[23:12:30] chouhoulis: has joined #RubyOnRails
[23:17:58] chouhoulis: has joined #RubyOnRails
[23:23:33] chouhoulis: has joined #RubyOnRails
[23:26:29] bijan_: has joined #RubyOnRails
[23:27:38] Guest82829: has joined #RubyOnRails
[23:28:05] chouhoulis: has joined #RubyOnRails
[23:32:37] Guest82829: has joined #RubyOnRails
[23:33:33] chouhoulis: has joined #RubyOnRails
[23:38:54] chouhoulis: has joined #RubyOnRails
[23:44:19] chouhoulis: has joined #RubyOnRails
[23:47:26] Guest82829: has joined #RubyOnRails
[23:49:52] chouhoulis: has joined #RubyOnRails
[23:52:05] cagomez: has joined #RubyOnRails
[23:55:26] chouhoulis: has joined #RubyOnRails