« Back to channel list

#RubyOnRails - 21 May 2019

« Back 1 day Forward 1 day »
[00:00:08] ziyadb: tell me about it...
[00:02:14] weaksauce: and there's no typos in the app policy initializer?
[00:02:36] ziyadb: I didn't even touch it, it's all the generated default
[00:08:04] ziyadb: weaksauce: I'm starting to suspect that it's probably something else in my rather effed codebase. I'll continue troubleshooting and let you know what happens
[00:08:13] ziyadb: thank you for your help!
[00:08:43] ziyadb: thanks :)
[00:11:14] skryking: has joined #RubyOnRails
[00:18:05] ziyadb: weaksauce: okay so when I do user.has_role?(:moderator, space) it returns true, but when I do space.users.with_role(:moderator), user is not included.
[00:18:34] christiandsg: has joined #RubyOnRails
[00:18:51] ziyadb: that is where the problem begins and ends, are there any particular "params" I need to whitelist in the space controller? Probably not...
[00:19:30] weaksauce: not familiar with rolify really
[00:20:21] ziyadb: perhaps I should look into that since we couldn't identify an issue with my pundit setup
[00:42:18] tf2ftw: has joined #RubyOnRails
[00:47:14] IGnorAND: Anyone know why we need to run spring stop? https://teamtreehouse.com/community/unable-to-generate-rspec-using-this-command-rails-generate-rspecinstall I'm on ruby 2.5.3p105 and I have this issue with a new project (rails 5)
[00:51:18] orbyt_: has joined #RubyOnRails
[00:59:30] quazimodo: has joined #RubyOnRails
[01:17:57] benlieb__: has joined #RubyOnRails
[01:36:39] duderonomy: has joined #RubyOnRails
[01:40:59] octos: has joined #RubyOnRails
[01:44:25] haxx0r: has joined #RubyOnRails
[01:46:48] Puffball_: has joined #RubyOnRails
[02:10:39] christiandsg: has joined #RubyOnRails
[02:37:28] Technodrome: has joined #RubyOnRails
[02:40:32] obzidian: has joined #RubyOnRails
[02:44:53] s00pcan: has joined #RubyOnRails
[02:54:34] tdy: has joined #RubyOnRails
[03:09:30] braincrash: has joined #RubyOnRails
[03:36:12] srinidhi: has joined #RubyOnRails
[03:41:46] MrCrackPotBuilde: has joined #RubyOnRails
[04:39:03] sevenseacat: has joined #RubyOnRails
[04:45:25] christiandsg: has joined #RubyOnRails
[04:50:17] Puffball_: has left #RubyOnRails: ()
[05:03:20] christiandsg: has joined #RubyOnRails
[05:20:51] conta: has joined #RubyOnRails
[05:21:11] christiandsg: has joined #RubyOnRails
[05:21:54] christiandsg: has joined #RubyOnRails
[05:22:44] christiandsg: has joined #RubyOnRails
[05:23:29] christiandsg: has joined #RubyOnRails
[05:24:15] christiandsg: has joined #RubyOnRails
[05:33:04] christiandsg: has joined #RubyOnRails
[05:33:51] christiandsg: has joined #RubyOnRails
[05:34:39] christiandsg: has joined #RubyOnRails
[05:35:25] christiandsg: has joined #RubyOnRails
[05:35:29] syndikate: has joined #RubyOnRails
[05:47:47] kapilp: has joined #RubyOnRails
[05:53:40] thunderbirdtr: has joined #RubyOnRails
[06:07:27] DTZUZO: has joined #RubyOnRails
[06:18:44] dionysus69: has joined #RubyOnRails
[06:23:35] lypsis: has joined #RubyOnRails
[06:34:19] istrasci: has joined #RubyOnRails
[06:39:21] blackmesa1: has joined #RubyOnRails
[06:41:20] istrasci: I'm trying to define a custom :after callback using `define_model_callbacks :my_method, only: [:after]`. I wrap the logic for :my_method in a `run_callbacks :my_method` block, but if that logic has an explicit return in it, the after callback doesn't execute. I need explicit returns in several of the logic branches, so what should I do?
[06:44:51] blackmesa1: has joined #RubyOnRails
[06:46:37] lxsameer: has joined #RubyOnRails
[06:50:05] gambl0re: has joined #RubyOnRails
[06:52:38] xcesariox: has joined #RubyOnRails
[07:01:14] blackmesa1: has joined #RubyOnRails
[07:29:09] xco: has joined #RubyOnRails
[07:44:45] deepredsky: has joined #RubyOnRails
[07:58:07] blackmesa1: has joined #RubyOnRails
[08:03:13] deepredsky: has joined #RubyOnRails
[08:32:36] quazimodo: has joined #RubyOnRails
[09:07:50] deepredsky: has joined #RubyOnRails
[09:08:06] Norore: has joined #RubyOnRails
[09:12:28] MrCrackPotBuilde: has joined #RubyOnRails
[09:13:22] Ergo: has joined #RubyOnRails
[09:33:51] GodFather: has joined #RubyOnRails
[09:57:38] Ergo: has joined #RubyOnRails
[09:59:59] NL3limin4t0r: has joined #RubyOnRails
[10:07:20] srinidhi: has joined #RubyOnRails
[10:26:35] conta: has joined #RubyOnRails
[10:51:27] blackmesa1: has joined #RubyOnRails
[10:57:44] lankanmon: has joined #RubyOnRails
[11:08:57] srinidhi: has joined #RubyOnRails
[11:15:11] Tempesta: has joined #RubyOnRails
[11:42:24] blackmesa1: has joined #RubyOnRails
[12:06:54] octos: has joined #RubyOnRails
[12:07:38] octos: has joined #RubyOnRails
[12:11:20] lxsameer: has joined #RubyOnRails
[12:21:35] conta: has joined #RubyOnRails
[12:30:21] dionysus69: has joined #RubyOnRails
[12:36:11] Cork: active record attribute default procs
[12:36:23] Cork: is it possible to have them access the record instance?
[12:37:18] Cork: attribute :notes, :text, default: ->() { self.name + " is the current note" }
[12:37:28] Cork: kinda thing (obviously not that though)
[12:39:10] apparition: has joined #RubyOnRails
[12:42:23] xco: has joined #RubyOnRails
[13:00:07] Ergo: has joined #RubyOnRails
[13:00:32] srinidhi: has joined #RubyOnRails
[13:01:57] MrCrackPotBuilde: has joined #RubyOnRails
[13:13:24] Tempesta: has joined #RubyOnRails
[13:13:48] Technodrome: has joined #RubyOnRails
[13:14:30] MrCrackPotBuilde: has joined #RubyOnRails
[13:23:22] MrCrackPotBuilde: has joined #RubyOnRails
[13:44:26] Technodrome: has joined #RubyOnRails
[13:58:52] helpa: has joined #RubyOnRails
[13:58:55] darkphnx4805: has joined #RubyOnRails
[13:58:56] bvdw: has joined #RubyOnRails
[14:01:22] helpa: has joined #RubyOnRails
[14:01:42] helpa: has joined #RubyOnRails
[14:02:09] Gizmokid2010: has joined #RubyOnRails
[14:02:35] HumorBaby_: has joined #RubyOnRails
[14:06:34] arthurnn: has joined #RubyOnRails
[14:07:54] SanguineAnomaly: has joined #RubyOnRails
[14:09:09] hammer065: has joined #RubyOnRails
[14:09:26] cgfbee: has joined #RubyOnRails
[14:12:41] lxsameer: has joined #RubyOnRails
[14:13:04] mclee: has joined #RubyOnRails
[14:14:03] mcr: has joined #RubyOnRails
[14:26:02] brool: has joined #RubyOnRails
[14:31:12] tf2ftw: has joined #RubyOnRails
[14:39:05] atrius: has joined #RubyOnRails
[14:57:27] Dr_MDMA_MD: has joined #RubyOnRails
[15:03:37] istrasci1: has joined #RubyOnRails
[15:05:16] Dbugger: has joined #RubyOnRails
[15:09:05] Saukk: has joined #RubyOnRails
[15:18:43] istrasci1: I'm trying to define a custom :after callback using `define_model_callbacks :my_method, only: [:after]`. I wrap the logic for :my_method in a `run_callbacks :my_method` block, but if that logic has an explicit return in it, the after callback doesn't execute. I need explicit returns in several of the logic branches, so what should I do?
[15:19:25] Dr_MDMA_MD: Hi! I'm trying to write a short summary of why this car dealership should switch to PostgreSQL + Ruby on Rails ecommerce (www.solidus.io) and how this database will become the new defacto database for the company. Is anybody aware of any case studies or website articles I can use for inspiration?
[15:19:37] Dr_MDMA_MD: I need to write about how this would allow for their products to be stored in a single central location, easily accessed by their website, email newsletter, employees, accounting firms etc. through a custom admin backend, further strenghtened by a Ruby compatibility layer. Does that make any sense? Thanks!
[15:22:43] catbusters: has joined #RubyOnRails
[15:22:57] blackmesa1: has joined #RubyOnRails
[15:25:07] NL3limin4t0r: Cork: Have you tried passing a lambda with argument. My guess is that the following should work: `attribute :notes, :text, default: ->(record) { record.name + " is the current note" }`
[15:25:10] orbyt_: has joined #RubyOnRails
[15:29:17] NL3limin4t0r: istrasci_: Instead of using `return` use `break` to exit the block.
[15:37:51] Dr_MDMA_MD: the folks in #postgresql is like "rails is a steeming pile of shite"
[15:38:51] Dr_MDMA_MD: turns out, like i countered with, that people like them either 1. haven't ever made a rails app of their own, at least not a proper one, or 2. point to some teeny weeny problem that the rails community could easily fix if they wanted to, or are planning to fix
[15:39:04] Dr_MDMA_MD: or 3. they've spent most of their life learning php or python and are basically jealous of its fame, its tidyness and the developer satisfaction it boasts
[15:39:28] Dr_MDMA_MD: turns out to be true, on all points, for all the people who hate on rails
[15:39:30] kapilp: has joined #RubyOnRails
[15:42:26] Dr_MDMA_MD: "impedance" mismatch, how big of a thing is that? anyone?
[15:44:39] mikecmpbll: has joined #RubyOnRails
[15:47:35] haxx0r: has joined #RubyOnRails
[15:48:01] duderonomy: has joined #RubyOnRails
[15:48:34] haxx0r: i'm too stupid to overrider render_partial. render(partial: "my_template"). i want to hijack now in this render method. i checked the code of render and it's calling render_partial(). but i can't override it
[15:48:47] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/b7ca967811c1cb817b86facb9aba053f/pasted.txt
[15:49:00] haxx0r: i put it in application_controller or inside a helper. it just won't stop there
[15:49:56] NL3limin4t0r: Dr_MDMA_MD: I'd say Rails has it's place. You can get a lot done with not to mutch code, this makes it a good choise for startups or small companies. However I wouldn't recommend Rails to large enterprises.
[15:50:14] xco: has joined #RubyOnRails
[15:51:20] Dr_MDMA_MD: NL3limin4t0r: you gonna follow up that statement by saying why? :)
[15:53:58] NL3limin4t0r: Dr_MDMA_MD: The reason has mostly to do with type checking behaviour. Ruby is a ducktyping language, variables and types are only checked at runtime. Let's compare that with Java for example. Java does type checking during compile time, letting you find errors a lot sooner.
[15:54:45] NL3limin4t0r: However, in Java you'll need a lot more code to do the same thing.
[15:55:05] jimms: has joined #RubyOnRails
[15:55:08] Dr_MDMA_MD: cool, i see..
[15:55:12] Dr_MDMA_MD: thanks for the insight!
[15:58:18] NL3limin4t0r: I'm a fan of Ruby and RoR myself and enjoy using it. If I'm not mistaken Github also use RoR and that is a large cooperation. That by itself shows that even in enterprises RoR is used.
[15:59:36] haxx0r: yeah, and github also leads to one of the biggest security flaws that rails had back in the days.
[15:59:46] haxx0r: after that, strong_parameters was introduced. that was fun
[16:01:11] haxx0r: homakov - the hero we don't deserve.
[16:02:55] NL3limin4t0r: haxx0r: I'm not sure what you're trying to do, but are you shure `render_partial` is called from the controller `render` method?
[16:02:58] NL3limin4t0r: https://github.com/rails/rails/blob/e0397b0c25e790eba0c914d9ff97360219f49e29/actionpack/lib/action_controller/renderer.rb#L72-L82
[16:03:21] haxx0r: actioncontroller.render and actionview.render are different things
[16:03:36] haxx0r: actually i wanted to do something like I18n_haml_partials
[16:03:45] haxx0r: but i just decided, FUCK IT. i'll go with liquid
[16:04:30] NL3limin4t0r: I know that calling `render` in the view does call `render_partial`, but I'm not so sure that's the case for the controller.
[16:04:49] haxx0r: i'm talkinga about views. i can't overide it somehow.
[16:05:59] haxx0r: the problem is, that I18n sucks. t("Please %#{link} here to create a Review. Your balance is %{amount} USD", link: link_to(), amount: 100) works great for english. and you can translate it easy to german and maybe italian language. but if you wanna translate it to thai language, a sentence is completely different structured and you can't use it thi
[16:05:59] haxx0r: s way anymore.
[16:06:12] haxx0r: so i need kinda like different sentences/placeholders for thai language.
[16:06:34] haxx0r: so i had the idea, i just make haml views in database and call them I18n_haml_views.
[16:07:42] haxx0r: so if i do `=render "index_section"` in a template, it should look in database if `'#{locale}_index_section.haml"` is stored and then render that.
[16:08:05] haxx0r: but that's exactly what liquid can do. so i bite down on the liquid markup and go with it
[16:08:28] haxx0r: https://github.com/rails/rails/blob/f42f1d3155cdb787f90f489d6042ef64be4e6e5f/actionview/lib/action_view/helpers/rendering_helper.rb
[16:08:39] haxx0r: i thought the code will be easier. lol
[16:11:42] jgpawletko: has joined #RubyOnRails
[16:11:44] NL3limin4t0r: haxx0r: Looking at that code I guess it's easier to overide the `view_renderer` method and returning a custom renderer. Let it forward everything to the normal ActionView::Renderer object, with exception of the methods you want to intercept.
[16:12:30] NL3limin4t0r: But that's just a first look perspective.
[16:12:32] haxx0r: i think it's easier to use liquid :P
[16:13:17] NL3limin4t0r: I agree with you 😉
[16:21:39] octos: has joined #RubyOnRails
[16:21:54] orbyt_: has joined #RubyOnRails
[16:23:27] orbyt_: has joined #RubyOnRails
[16:36:33] orbyt_: has joined #RubyOnRails
[16:39:14] SigizMG: has joined #RubyOnRails
[16:49:33] tdy: has joined #RubyOnRails
[17:03:27] Dbugger: has joined #RubyOnRails
[17:06:13] blackmesa1: has joined #RubyOnRails
[17:10:52] duderonomy: has joined #RubyOnRails
[17:16:54] ovnimancer: has joined #RubyOnRails
[17:18:59] ovnimancer: has joined #RubyOnRails
[17:19:13] ellcs: has joined #RubyOnRails
[17:22:43] schneider: has joined #RubyOnRails
[17:23:08] blackmesa1: has joined #RubyOnRails
[17:32:38] xco: has joined #RubyOnRails
[17:46:11] Exuma: has joined #RubyOnRails
[17:47:13] blackmesa1: has joined #RubyOnRails
[17:47:41] beholders_eye: has joined #RubyOnRails
[17:47:52] christiandsg: has joined #RubyOnRails
[17:52:11] xco: has joined #RubyOnRails
[17:53:13] conta: has joined #RubyOnRails
[18:07:52] havenwood: The RailsConf 2019 videos are starting to get posted. Here's DHH's keynote: https://youtu.be/VBwWbFpkltg
[18:11:13] havenwood: https://www.youtube.com/playlist?list=PLE7tQUdRKcyaOq3HlRm9h_Q_WhWKqm5xc
[18:23:54] nogic: has joined #RubyOnRails
[18:28:38] ravenous_: has joined #RubyOnRails
[18:32:07] tf2ftw: has joined #RubyOnRails
[18:41:11] fragamus: has joined #RubyOnRails
[18:41:27] blackmesa1: has joined #RubyOnRails
[18:45:13] fragamus: has joined #RubyOnRails
[18:46:45] blackmesa1: has joined #RubyOnRails
[19:04:25] tdy: has joined #RubyOnRails
[19:11:39] pd09041999: has joined #RubyOnRails
[19:30:02] duleja: has joined #RubyOnRails
[19:30:57] duleja: anyone interested in sharing few thoughts about pluck method in rails :)
[19:36:41] duleja: hello hello
[19:36:52] duleja: :) no one?
[19:42:37] xco: has joined #RubyOnRails
[19:52:19] defsdoor: has joined #RubyOnRails
[19:58:14] sameerynho: has joined #RubyOnRails
[20:04:53] tdy: has joined #RubyOnRails
[20:05:29] mikecmpbll: has joined #RubyOnRails
[20:19:35] xco: i’m working on two gems. in one gem i have an error “undefined method `downcase' for nil:NilClass” which i’m aware of. in the second them there’s no error. it works fine but any time i do “gem push” i get the warning for the first gem with the error in it. so even in the folder of the clean gem the warning shows and i can’t push it. any ideas? please?
[20:32:05] mikecmpbll: has joined #RubyOnRails
[20:46:36] tdy: has joined #RubyOnRails
[21:07:45] brool: has joined #RubyOnRails
[21:36:28] nogic: has joined #RubyOnRails
[21:43:10] xco: has joined #RubyOnRails
[21:43:47] gambl0re: has joined #RubyOnRails
[21:53:13] Net: anyone use interactor?
[21:53:39] weaksauce: has joined #RubyOnRails
[21:59:31] weaksauce: is there a common pattern to handling webrequests that defer to a background job and then notify the client that a job has completed (say to download a payload as a response)?
[22:03:19] skryking: has joined #RubyOnRails
[22:03:59] xco: has joined #RubyOnRails
[22:08:31] IsoLinCHiP: has joined #RubyOnRails
[22:22:18] gambl0re: anyone here use docker?
[22:24:28] gambl0re: is this channel still active?
[22:53:12] xco: has joined #RubyOnRails
[22:54:06] weird_error: has joined #RubyOnRails
[22:56:29] tf2ftw: has joined #RubyOnRails
[23:09:23] xco: has joined #RubyOnRails
[23:23:49] uksio: has joined #RubyOnRails
[23:27:39] beholders_eye: has joined #RubyOnRails
[23:36:06] havenwood: weaksauce: I like Active Job with Action Cable for that: https://blog.jakewilkins.com/2017/08/25/building-something-besides-a-chat-app-with-actioncable/
[23:42:58] havenwood: weaksauce: The MessageBus gem is solid if you want to avoid WebSockets, for whatever reason: https://github.com/SamSaffron/message_bus
[23:43:37] weaksauce: thanks havenwood!
[23:43:49] havenwood: weaksauce: no prob!
[23:57:14] brool: has joined #RubyOnRails