« Back to channel list

#RubyOnRails - 15 March 2019

« Back 1 day Forward 1 day »
[00:13:52] gambl0re: has joined #RubyOnRails
[00:22:57] rascencio: has joined #RubyOnRails
[00:24:19] gambl0re: has joined #RubyOnRails
[00:24:48] orbyt_: has joined #RubyOnRails
[00:26:34] akosednar: has joined #RubyOnRails
[00:50:11] segy: has joined #RubyOnRails
[01:03:11] sevenseacat: has joined #RubyOnRails
[01:06:47] lupine: has joined #RubyOnRails
[01:12:45] tdy: has joined #RubyOnRails
[01:17:24] Technodrome: has joined #RubyOnRails
[01:37:24] b6b: has left #RubyOnRails: ("Leaving")
[02:41:41] gambl0r3: has joined #RubyOnRails
[03:05:08] mangold: has joined #RubyOnRails
[03:19:35] mangold: has joined #RubyOnRails
[03:34:12] bambanx: has joined #RubyOnRails
[03:34:23] tdy1: has joined #RubyOnRails
[03:35:05] bambanx: has joined #RubyOnRails
[04:10:17] apparition: has joined #RubyOnRails
[04:10:52] _aeris_: has joined #RubyOnRails
[04:11:09] braincrash: has joined #RubyOnRails
[04:13:37] mangold: has joined #RubyOnRails
[04:13:53] quazimodo: has joined #RubyOnRails
[05:19:15] pd09041999: has joined #RubyOnRails
[05:45:47] Tempesta: has joined #RubyOnRails
[05:52:42] pd09041999: has joined #RubyOnRails
[05:56:42] srinidhi: has joined #RubyOnRails
[06:19:24] conta: has joined #RubyOnRails
[06:24:15] old_relik: has joined #RubyOnRails
[06:24:46] old_relik: how does one deal with 0 records with kaminari generically? when you do .per(0) it blows up
[06:37:26] gambl0r3: has joined #RubyOnRails
[06:43:12] srinidhi: has joined #RubyOnRails
[06:55:08] mangold: has joined #RubyOnRails
[07:06:11] reber: has joined #RubyOnRails
[07:07:58] srinidhi: has joined #RubyOnRails
[07:48:54] pd09041999: has joined #RubyOnRails
[07:50:38] apparition: has joined #RubyOnRails
[08:17:04] LightStalker: has joined #RubyOnRails
[08:35:40] lxsameer: has joined #RubyOnRails
[08:35:56] ams__: has joined #RubyOnRails
[08:37:46] quazimodo: has joined #RubyOnRails
[08:38:06] defsdoor: has joined #RubyOnRails
[08:47:22] Technodrome: has joined #RubyOnRails
[09:04:45] quazimodo: has joined #RubyOnRails
[09:07:47] Fridtjof: has joined #RubyOnRails
[09:26:09] FooBarWidget: has joined #RubyOnRails
[09:27:41] dionysus69: I have noticed one user had 50 thousand sign in attempts, using a bot obviously, that was before I added google robot check or fail2ban. What vulnerability was he/she trying to exploit? it doesn't make sense
[09:27:57] dionysus69: not attempts I mean, sign in counts, counted by devise
[09:42:14] mauro1254: has joined #RubyOnRails
[09:42:25] quazimodo: has joined #RubyOnRails
[09:48:12] quazimodo: has joined #RubyOnRails
[09:49:17] mangold: has joined #RubyOnRails
[09:53:42] skryking: has joined #RubyOnRails
[10:46:13] lankanmon: has joined #RubyOnRails
[11:04:15] conta: has joined #RubyOnRails
[11:11:00] Ergo^: has joined #RubyOnRails
[11:24:59] apparition: has joined #RubyOnRails
[11:37:28] ldnunes: has joined #RubyOnRails
[11:41:35] segy: has joined #RubyOnRails
[11:43:45] pd09041999: has joined #RubyOnRails
[11:52:37] Ergo^: has joined #RubyOnRails
[12:03:01] pd09041999: has joined #RubyOnRails
[12:12:31] jottr: has joined #RubyOnRails
[12:14:00] wethu: has joined #RubyOnRails
[13:02:56] syndikate: How do I do an idiomatic lazy lookup for translations in a partial under namespaced route?
[13:03:03] syndikate: Right now I get a path is not available error
[13:05:34] Ergo^: has joined #RubyOnRails
[13:06:26] syndikate: Sample file for reference http://dpaste.com/2Q92GVY
[13:12:40] noob69: has joined #RubyOnRails
[13:13:10] noob69: Hey, so I'm try to mask the phone numbers on the listing page. What is the best way to go about it?
[13:13:37] noob69: Right now, I'm doing this number.first(2) + '****' + number.last(2)
[13:13:45] noob69: Any better solutions?
[13:18:02] Technodrome: has joined #RubyOnRails
[13:29:01] Technodrome: has joined #RubyOnRails
[13:29:41] Ergo^: has joined #RubyOnRails
[13:51:04] Ergo^: has joined #RubyOnRails
[14:00:12] srinidhi: has joined #RubyOnRails
[14:07:10] hnanon: has joined #RubyOnRails
[14:09:10] beingjohnm: running into an issue with bundler 2.0.1 and deploying to elastic beanstalk. bummer.
[14:12:41] JDeen: has joined #RubyOnRails
[14:17:23] JDeen: I am looking at ActiveMerchant gem source code...
[14:17:33] reber: has joined #RubyOnRails
[14:18:24] JDeen: In the ActiveMerchant gem, I noticed few Gemfiles, like Gemfile_rails31 Gemfile_rails32... What is this? Is it some thing like when we test it against few rails versions?
[14:19:23] pd09041999: has joined #RubyOnRails
[14:20:57] pd09041999: has joined #RubyOnRails
[14:22:35] pd09041999: has joined #RubyOnRails
[14:27:26] mangold: has joined #RubyOnRails
[14:27:44] _aeris_: has joined #RubyOnRails
[14:37:12] FooBarWidget: has joined #RubyOnRails
[14:47:08] srinidhi: has joined #RubyOnRails
[15:01:27] cek: has joined #RubyOnRails
[15:02:08] cek: What's the current way of sending http requests to external entities?
[15:02:17] cek: I used to use restclient
[15:02:57] Ergo^: has joined #RubyOnRails
[15:05:08] rascencio: has joined #RubyOnRails
[15:09:05] havenwood: cek: HTTP.rb is quite nice. Typhoeus handles parallel requests well. Or there's always Net::HTTP in the stdlib!
[15:09:16] havenwood: cek: https://github.com/httprb/http#readme
[15:11:07] havenwood: cek: Here's a spreadsheet comparing various features between Ruby HTTP clients: https://docs.google.com/spreadsheets/d/1vPlk6nMIFa3sI5ISl7zZ5r6lDNpVQX6Jxi3ksXCyVbs/edit?usp=sharing
[15:18:15] Ergo^: has joined #RubyOnRails
[15:20:41] faitswulff: has joined #RubyOnRails
[15:28:29] Saukk: has joined #RubyOnRails
[15:31:45] mangold: has joined #RubyOnRails
[15:32:28] Ergo^: has joined #RubyOnRails
[15:41:56] Ergo^: has joined #RubyOnRails
[15:47:34] pd09041999: has joined #RubyOnRails
[15:50:15] Technodrome: has joined #RubyOnRails
[15:52:03] tdy1: has joined #RubyOnRails
[15:54:53] mangold: has joined #RubyOnRails
[15:56:58] jaddison: has joined #RubyOnRails
[16:03:20] apparition: has joined #RubyOnRails
[16:05:01] orbyt_: has joined #RubyOnRails
[16:06:41] [Butch]: has joined #RubyOnRails
[16:12:50] ss942: has left #RubyOnRails: ()
[16:36:29] Terens: has joined #RubyOnRails
[16:36:57] orbyt_: has joined #RubyOnRails
[16:37:45] JDeen: havenwood: Thanks for sharing the doc about clients... very interesting...
[16:41:54] Terens: I work on a relatively small multitenant app about 220 models. Basic controller actions are generic like create, update, destroy.For every user role there are about 220models X actions records that are loaded at every request. Each record has the action name, controller name, and attributes. So if attributes are editable then they are automaticaly permitted. Then serializer gets visible attributes and shows only these.
[16:43:04] Terens: The drawback is that we have to maintain long lines of style action: 'create', ..... , attributes: { id: visible, title:'visible' .....}
[16:43:43] MrCrackPotBuilde: has joined #RubyOnRails
[16:43:44] Terens: however lead dev who designed that says that this is the best thing and we have flexibility and really generic actions
[16:44:12] Terens: and that this way frontend knows what fields to show
[16:44:20] Terens: what do you think?
[16:52:56] funkytwig: has joined #RubyOnRails
[16:54:21] funkytwig: Hi, my tails is a bit rusty and I have a question. I setuo database.ymp and did a 'rake db:create' and it created the DBs fine.
[16:54:48] funkytwig: My question is does this mean rails has the root password for the mysql DB?
[16:59:22] hahuang65: funkytwig: depends on your database.yml and how you set it up.
[17:13:00] funkytwig: hahuang6-, was just a bit of a surprise. Its basically the boilerplate.
[17:14:38] funkytwig: with user/pass/db filled in
[17:15:31] eddof13: has joined #RubyOnRails
[17:34:40] hahuang65: yeah that SHOULDN'T be your root password.
[17:34:54] hahuang65: but it CAN be if you configure it that way.
[17:35:20] hahuang65: funkytwig: I think it defaults to no password, and user is postgres.
[17:36:02] kapil____: has joined #RubyOnRails
[17:38:40] gambl0r3: has joined #RubyOnRails
[17:40:20] funkytwig: What is a good forum for rails. Stackoverflow is great for specific tech questions but things like relative merits or varios grms etc. are not appropriate. For example I want to have a general question about rails and react.
[17:41:05] funkytwig: hahuang6-, PS thenks;)
[17:41:32] hahuang65: funkytwig: you can ask here... it's generally a little more populated than this, but if you stick around, someone usually answers.
[17:42:46] mlt-: has joined #RubyOnRails
[17:44:26] funkytwig: OK, we are thinking react, Veu.js for frontend and I am thinking rails for backed. The site, like lots, has custom pages and more CMS info type stuff. I did look at RefinaryCMS in the past but does not seam apropreate for a react site?
[17:44:49] funkytwig: Basicaly wondering how best to implement the info pages
[18:00:57] dionysus69: has joined #RubyOnRails
[18:11:09] Dbugger: has joined #RubyOnRails
[18:34:22] hightower2: has joined #RubyOnRails
[18:41:26] MrPunkin: has joined #RubyOnRails
[18:44:25] MrPunkin: Can anyone tell me why calling an association’s “update_attributes” method is triggering a before_save callback of my parent model?
[18:44:29] MrPunkin: is that normal?
[18:44:43] lupine: very normal, in rails 3(?)+
[18:44:56] lupine: in rails2, for sure, it was a direct database update. these days, that's called `update_columns`
[18:45:26] MrPunkin: So how can I update this associated model without triggering this before_save on my parent model? Is there a way? Rails 5
[18:45:30] lupine: if you have an `ActiveRecord::Relation`, then `update_all` will be a database update that skips callbacks, etc
[18:45:59] lupine: hmm, sorry, I missed the parent / child aspect of the question
[18:45:59] MrPunkin: Right, so I need to make these simple column changes on the associated model via an update_all or something so that callbacks are skipped?
[18:46:11] lupine: is updating the child triggering a save of the parent via `autosave: `, I wonder
[18:46:32] MrPunkin: I have Statement which belongs_to Product. I update Product during calculation of statements, which triggers Statement#before_save
[18:47:56] pd09041999: has joined #RubyOnRails
[18:59:38] MrPunkin: I have no “autosave” options set in this relationship lupine… would that matter?
[19:02:06] Terens: has joined #RubyOnRails
[19:02:30] Terens: I work on a relatively small multitenant app about 220 models. Basic controller actions are generic like create, update, destroy.For every user role there are about 220models X actions records that are loaded at every request. Each record has the action name, controller name, and attributes. So if attributes are editable then they are automaticaly permitted. Then serializer gets visible attributes and shows only these.
[19:02:41] Terens: The drawback is that we have to maintain long lines of style action: 'create', ..... , attributes: { id: visible, title:'visible' .....}
[19:02:51] Terens: however lead dev who designed that says that this is the best thing and we have flexibility and really generic actions
[19:12:55] funkytwig: Hi, can you point me to a good tutorial that creates MVC without using scaffold. I am prototyping out a demo and using RailsAdmin to update datamase and dont want all the Views.
[19:13:14] funkytwig: Also I gother expirienced developers shy away from using scafold
[19:15:44] snk: https://www.railstutorial.org
[19:16:31] snk: that book does use scaffolds at the beginning, but once you're into chapter 5 or so, starts doing without them to help you learn what's going on behind the scenes
[19:16:40] ellcs: has joined #RubyOnRails
[19:22:39] snk: quick answer might be: just pass `--no-template-engine` when generating your controller, and it won't create any of the views
[19:35:54] sameerynho: has joined #RubyOnRails
[19:41:17] fragamus: has joined #RubyOnRails
[19:47:33] funkytwig: snk, cool, so apart from the model.rb what else does the scafolfd create. The Controler?
[19:48:02] funkytwig: is it better to do this or just create model and controler seperatly?
[19:48:31] snk: Depends on what you need, I suppose
[19:48:54] snk: Scaffold gets you a bit more. Model, view, controller, tests etc
[19:48:57] rascencio: has joined #RubyOnRails
[19:49:21] snk: If you don’t need the view, you can just generate the model, and then the controller without views
[20:00:09] hnanon: has joined #RubyOnRails
[20:00:25] pd09041999: has joined #RubyOnRails
[20:10:02] ellcs: has joined #RubyOnRails
[20:13:22] fragamus: has joined #RubyOnRails
[20:15:08] funkytwig: has joined #RubyOnRails
[20:15:32] funkytwig: has left #RubyOnRails: ("Leaving")
[20:15:39] funkytwig: has joined #RubyOnRails
[20:16:07] funkytwig: Hi, confused with text and string. It seems for mysql test is up to 255 chards and string unlimited. For postgres it seems to be kind of the other way round, this cant be correct
[20:16:33] funkytwig: other way round, this cant be correct
[20:20:26] hightower3: has joined #RubyOnRails
[20:25:55] uks: has joined #RubyOnRails
[20:27:42] za1b1tsu: has joined #RubyOnRails
[20:32:07] DWSR: has joined #RubyOnRails
[20:32:13] DWSR: Hey all, I'm trying to build a Docker container for my company's Rails 5.0.7.1 app. I'm trying to precompile assets in the container build (rather than before), but I'm running into some issues with initializers that are reaching out to things like MySQL or Redis which is not ideal. I noticed that 'initialize_on_precompile' was removed in Rails 4.1. What's the recommended way to deal with this situation?
[20:34:36] funkytwig: My first migration failed https://gist.github.com/ben-tvpp/bf77af05274f8d11c0bf58054f888798
[20:35:21] funkytwig: The rails page comes up so thing stuff is basicaly setup, any ida why?
[20:35:59] gambl0re: has joined #RubyOnRails
[20:39:14] defsdoor_: has joined #RubyOnRails
[20:51:23] za1b1tsu_: has joined #RubyOnRails
[20:54:44] mlt-: has joined #RubyOnRails
[21:03:05] segy: has joined #RubyOnRails
[21:11:57] fragamus: has joined #RubyOnRails
[21:12:26] funkytwig: config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:
[21:12:47] funkytwig: when trying to create a table, mysql, wiht a null:false
[21:13:02] funkytwig: did a bit of googeling without luck;(
[21:17:30] ur5us: has joined #RubyOnRails
[21:28:33] ravenousmoose: has joined #RubyOnRails
[21:41:55] ellcs: has joined #RubyOnRails
[21:51:45] thither: has joined #RubyOnRails
[21:53:02] thither: How can I get the HTML rendered by a controller action? I've seen tutorials on getting the HTML rendered by the template that corresponds to an action, but I need the action to actually execute to set up the instance variables.
[21:53:27] thither: Really all I want is a function of (path) -> (html)
[21:56:06] thither: Or I suppose it'd be (http method, path) -> (html)
[22:14:15] Fernando-Basso: has joined #RubyOnRails
[22:22:10] dylanf: has joined #RubyOnRails
[22:40:28] rascencio: has joined #RubyOnRails
[23:16:29] gambl0re: has joined #RubyOnRails
[23:25:52] Tempesta: has joined #RubyOnRails
[23:33:31] Puffball: has joined #RubyOnRails
[23:52:28] hahuang65: has joined #RubyOnRails
[23:58:45] hahuang65: has joined #RubyOnRails