« Back to channel list

#RubyOnRails - 12 March 2019

« Back 1 day Forward 1 day »
[00:18:35] orbyt_: has joined #RubyOnRails
[00:57:50] tdy: has joined #RubyOnRails
[01:23:50] cnsvc: has joined #RubyOnRails
[01:26:51] mheld: has joined #RubyOnRails
[01:32:02] quazimodo: has joined #RubyOnRails
[01:35:22] kapil____: has joined #RubyOnRails
[01:36:54] sevenseacat: has joined #RubyOnRails
[01:37:05] _aeris_: has joined #RubyOnRails
[01:49:55] gambl0r3: has joined #RubyOnRails
[01:51:00] MrCrackPotBuilde: has joined #RubyOnRails
[02:05:04] Technodrome: has joined #RubyOnRails
[02:11:31] uks: has joined #RubyOnRails
[02:11:31] uksio: has joined #RubyOnRails
[02:14:19] benlieb: has joined #RubyOnRails
[02:24:20] hnanon_: has joined #RubyOnRails
[02:27:26] hnanon: has joined #RubyOnRails
[02:47:38] gambl0re: has joined #RubyOnRails
[03:19:28] conta: has joined #RubyOnRails
[03:19:55] benlieb: has joined #RubyOnRails
[03:26:20] uks: has joined #RubyOnRails
[03:26:24] segy: has joined #RubyOnRails
[03:27:38] benlieb: has joined #RubyOnRails
[03:28:59] quazimodo: has joined #RubyOnRails
[03:53:14] Saukk: has joined #RubyOnRails
[04:10:54] braincrash: has joined #RubyOnRails
[04:44:09] benlieb: has joined #RubyOnRails
[04:47:02] mangold: has joined #RubyOnRails
[05:03:00] MrCrackPotBuilde: has joined #RubyOnRails
[05:44:31] srinidhi: has joined #RubyOnRails
[06:02:00] darkphnx4: has joined #RubyOnRails
[06:08:14] alexhartley: has joined #RubyOnRails
[06:08:34] c0san0stra: has joined #RubyOnRails
[06:14:12] cgfbee: has joined #RubyOnRails
[06:14:26] srinidhi: has joined #RubyOnRails
[06:17:54] uks: has joined #RubyOnRails
[06:18:12] conta: has joined #RubyOnRails
[06:19:08] michael_mbp: has joined #RubyOnRails
[06:27:54] MrCrackPotBuilde: has joined #RubyOnRails
[06:39:37] bambanx: has joined #RubyOnRails
[06:40:30] bambanx: has joined #RubyOnRails
[06:41:49] bambanx: has joined #RubyOnRails
[06:49:54] srinidhi: has joined #RubyOnRails
[07:01:12] lankanmon: has joined #RubyOnRails
[07:08:00] MrCrackPotBuilde: has joined #RubyOnRails
[07:16:33] MrCrackPotBuilde: has joined #RubyOnRails
[07:21:00] MrCrackPotBuilde: has joined #RubyOnRails
[07:37:21] Dbugger: has joined #RubyOnRails
[07:44:18] reber: has joined #RubyOnRails
[07:50:56] hightower2: has joined #RubyOnRails
[07:54:34] MrCrackPotBuilde: has joined #RubyOnRails
[08:10:33] benlieb: has joined #RubyOnRails
[08:31:45] segy: has joined #RubyOnRails
[08:41:30] MrCrackPotBuilde: has joined #RubyOnRails
[09:05:37] mikecmpbll: has joined #RubyOnRails
[09:13:14] srinidhi: has joined #RubyOnRails
[09:15:11] lxsameer: has joined #RubyOnRails
[09:15:20] GodFather: has joined #RubyOnRails
[09:24:19] ericboehs: has joined #RubyOnRails
[09:27:19] ss942: has joined #RubyOnRails
[09:28:08] ss942: Hello, I can't get how I should name file when using spree/deface
[09:28:36] ss942: is there any sample on github or something like this?
[09:28:55] Sylario: has joined #RubyOnRails
[09:29:01] ss942: I understood what to place in file but I don't know how to name it
[09:39:13] kidPalooma: has joined #RubyOnRails
[09:41:49] kidPalooma: Hello, I have a routing concern that defines a 'restore' route, helper method example: 'post_restore_path'. I am trying to generate this route with a polymorphic url helper: 'polymorphic_path(resource, format: :json, action: :restore)'. The problem is that it tries to call 'restore_posts_path' and not 'post_restore_path'. How do I make it call the right helper?
[09:45:02] kidPalooma: ok, I solved it: I needed to define the route inside the concern as post :restore, on: :member
[09:46:53] defsdoor_: has joined #RubyOnRails
[09:48:10] amperry: has joined #RubyOnRails
[09:49:54] Ergo: has joined #RubyOnRails
[09:53:12] gregf_: has joined #RubyOnRails
[10:04:15] amperry: anyone here familiar with what I'm sure must be a common Devise error? I'm getting an "Invalid Email or password" error on a login form; cf. https://gist.github.com/amp108/98f01991da014b415d0020431b2cdffd
[10:04:58] dionysus69: has joined #RubyOnRails
[10:17:37] MrCrackPotBuilde: has joined #RubyOnRails
[10:21:00] MrCrackPotBuilde: has joined #RubyOnRails
[10:26:00] apparition: has joined #RubyOnRails
[10:31:57] Giorgio: has joined #RubyOnRails
[10:41:14] Giorgio: how to enable this style of rails development loggin "↳ app/controllers/articles_controller.rb:20"
[10:41:43] Giorgio: app is upgraded from rails 4.2 and doesnt have this sql/controller line loggin
[10:49:07] lankanmon: has joined #RubyOnRails
[10:59:04] ss942: anybody alive there?
[11:20:13] mangold: has joined #RubyOnRails
[11:25:48] DTZUZO: has joined #RubyOnRails
[11:34:33] conta: has joined #RubyOnRails
[11:34:57] kapil____: has joined #RubyOnRails
[11:45:50] ss942: https://github.com/lapinskik/paginated-documents
[11:45:50] ss942: Any idea why deface dosn't affect? (it's redmine plugin)
[11:52:56] srinidhi: has joined #RubyOnRails
[12:22:45] Ergo: has joined #RubyOnRails
[12:27:54] conta: has joined #RubyOnRails
[12:30:38] Technodrome: has joined #RubyOnRails
[12:46:32] amperry: has joined #RubyOnRails
[12:47:39] amperry: hi folks, anyone know how to troubleshoot when '<%= yield %>' doesn't seem to yield anything?
[12:49:11] ss942: amperry: Rails.logger.error 'some string'?
[12:51:57] amperry: ss942: seems like I was missing a route. But where would I put the Rails.logger.error, assuming (as it was in this case) that no error was logged? (I.e., what 'some string' would I look for?)
[12:59:37] rascencio: has joined #RubyOnRails
[13:00:37] ellcs: has joined #RubyOnRails
[13:00:58] Giorgio: If no routes is defined. Rails should raise exception when you try to access specific action
[13:03:20] amperry: Giorgio: that's what I would have expected. But it simply silently declined to render anything in the '<%= yield %>' section.
[13:16:11] conta: has joined #RubyOnRails
[13:18:12] orbyt_: has joined #RubyOnRails
[13:20:59] mangold: has joined #RubyOnRails
[13:26:33] segy: has joined #RubyOnRails
[13:31:48] uksio: has joined #RubyOnRails
[13:32:39] ams__: has joined #RubyOnRails
[14:02:53] LenPayne_: has joined #RubyOnRails
[14:03:25] andywww: has joined #RubyOnRails
[14:04:24] wmoxam_: has joined #RubyOnRails
[14:04:28] sung_: has joined #RubyOnRails
[14:05:14] _phaul: has joined #RubyOnRails
[14:06:18] andywww: i have a sidekiq job queue which expires downloads within 24 hours of them being created, and in development I want to make that 1 minute. Is that time span typically something you’d put in the environment specific config files something like config.my_var = 1.minute?
[14:06:51] andywww: what would be the best place to put something like that?
[14:08:20] andywww: at the minute its in, say, /config/environments/development.rb but I’m not sure if thats the best place
[14:08:32] xMopx-: has joined #RubyOnRails
[14:10:18] Sirecote: has joined #RubyOnRails
[14:13:33] Davey: has joined #RubyOnRails
[14:17:07] pavelz: hi we have a database with somewhat .valid? records. problem is if we want to update some fields and run validations on new data and not old one, is there a way to disable validations for old data and only verifiy what was changed?
[14:17:21] lxsameer: has joined #RubyOnRails
[14:38:55] hnanon: has joined #RubyOnRails
[14:42:19] krawchyk: has joined #RubyOnRails
[14:58:00] ellcs: has joined #RubyOnRails
[14:58:55] segy: has joined #RubyOnRails
[14:59:21] za1b1tsu: has joined #RubyOnRails
[15:01:16] hnanon: has joined #RubyOnRails
[15:01:53] krawchyk_: has joined #RubyOnRails
[15:08:49] Sylario: @pavelz weird question, update_attributes or save will prevent to save invalid data, you can run valid? after saving without validation or select element according to updated_at and valid? them after that
[15:09:06] andywww: has joined #RubyOnRails
[15:09:09] Sylario: But your question is too broad
[15:11:37] Arkantos: has joined #RubyOnRails
[15:15:30] MrCrackPotBuilde: has joined #RubyOnRails
[15:35:51] orbyt_: has joined #RubyOnRails
[15:37:21] jaddison: has joined #RubyOnRails
[15:38:51] ss942: has joined #RubyOnRails
[15:48:21] tdy: has joined #RubyOnRails
[16:01:31] MrPunkin: has joined #RubyOnRails
[16:04:42] andywww: has joined #RubyOnRails
[16:04:56] mikecmpbll: has joined #RubyOnRails
[16:55:05] [Butch]: has joined #RubyOnRails
[16:55:49] orbyt_: has joined #RubyOnRails
[16:56:29] gambl0r3: has joined #RubyOnRails
[16:57:20] elplatt: has joined #RubyOnRails
[16:57:36] elplatt: Hi, anyone able to answer a Q about localization and caching?
[17:10:16] srinidhi: has joined #RubyOnRails
[17:10:28] hightower2: has joined #RubyOnRails
[17:11:56] GreyHame: has joined #RubyOnRails
[17:12:00] shansen: has joined #RubyOnRails
[17:14:08] Saukk: has joined #RubyOnRails
[17:18:59] duleja: has joined #RubyOnRails
[17:21:41] duleja: Anyone interested in chatting about active record and session data access in the model? :)
[17:22:41] duleja: Guess not :)
[17:24:28] ellcs: duleja: ask your questions; make your statements! :)
[17:24:45] duleja: hi ellcs!
[17:27:49] duleja: well I just wanted to see how would someone approach getting session data in the model? I ended up using gem called "request_store" and defining method inside "Modules::RuntimeEnvironment" module
[17:27:55] duleja: it any of this makes sense for you :)
[17:29:16] duleja: I just wanted to ask for an approach for using session data inside rails model? I know that it is not good practice but ...
[17:30:06] duleja: using rails 4 btw...
[17:32:05] hahuang65: duleja: what are your reasons for requiring the session data in the model?
[17:32:17] duleja: geo location is stored there...
[17:32:24] duleja: and I need to use default_scope...
[17:32:57] duleja: bad.. but there is one already, project was not done by me... Basically I need to add an exception to all queries to certain table
[17:33:32] duleja: where I would check geo location condition in the model and add default_scope if location condition is true
[17:34:09] duleja: so all queries will pass through that default_scope if user is coming from that location... but like I said location is stored session
[17:35:11] duleja: I could add scope to every query on the whole project for that table but that seems worse than adding chain to already existing default scope with an if... I hope that I am not too confusing x)
[17:37:30] hahuang65: sorry, I'm a little confused here.. you have geolocation data in session store, but need it in default_scope?
[17:38:33] duleja: if user is coming from certain location i should add another scope to already existing default scope
[17:39:19] duleja: since I want all queries to that table altered if the user is coming from certain geo location
[17:41:39] duleja: So I created scope where only if geolocation condition is true this scope logic will be executed, and I added this scope to the already existing default_scope as a chain
[17:42:40] hahuang65: can you just make a "fake" default_scope in the controller, where you do like @user = User.find(x).with_geo(lat: lat, long: long) and then basically return a user with a scope attached to that object, and use @user everywhere?
[17:42:45] duleja: I tried to find more documentation on Modules::RuntimeEnvironment but no luck? First thing I came across that I can't find documentation for in rails though...
[17:43:26] hahuang65: like, just make a named scoped, and attach that to the User in the controller
[17:43:29] duleja: @hahuang65 issue is that I need this exception ono the whole project not just one controller
[17:45:27] duleja: I need all queries coming to certain table to be altered if geolocation condition is true. So chaining another scope to default scope seems like okay solution even though I hate default_scopes...
[17:46:03] duleja: I thought on setting global variable in application_controller where I set session in the first place if the geolocation condition is true
[17:46:07] duleja: and access it in the model
[17:46:30] duleja: that could work but I ended up using Modules::RuntimeEnvironment module instead
[17:46:52] duleja: working with rails 3 years now and never used this one before...
[17:47:22] hahuang65: i don't see why that's the case...
[17:47:24] hahuang65: what if there are 2 users?
[17:48:08] duleja: not sure that I follow you, please explain more?
[17:48:27] andywww: has joined #RubyOnRails
[17:48:56] hahuang65: the controller calls everything for the view/api. I don't see how attaching a scope to the @user variable won't be able to hit all the queries you need changed.
[17:49:09] hahuang65: you're always going to be passing that @user to everything that needs to run a query, right?
[17:50:33] duleja: it is a list of records that is different based on the user location. and I have many places where queries to that table containing these records are defined
[17:51:36] duleja: so in order not to change all these, and I guess all others where I do joins and stuff with other tables I need a default_scope that will be used every time
[17:52:53] duleja: lets say I have a widget on the home_controller (responsible for the home page...) and there I am also querying this table, so I would need to go and add that scope to each query that is targeting this table in every controller
[17:53:45] rascencio: has joined #RubyOnRails
[18:04:45] zululee_: has left #RubyOnRails: ("The Lounge - https://thelounge.chat")
[18:05:02] conta: has joined #RubyOnRails
[18:06:22] duleja: thank you for your time hahuang65
[18:27:38] Xiti: has joined #RubyOnRails
[18:29:30] orbyt_: has joined #RubyOnRails
[18:36:41] mikecmpbll: has joined #RubyOnRails
[18:36:41] andywww: has joined #RubyOnRails
[18:42:31] MrCrackPotBuilde: has joined #RubyOnRails
[18:43:01] atrius: has joined #RubyOnRails
[18:43:06] ellcs: has joined #RubyOnRails
[18:44:36] Dbugger: has joined #RubyOnRails
[19:01:31] segy: has joined #RubyOnRails
[19:14:02] andywww: has joined #RubyOnRails
[19:34:34] sameerynho: has joined #RubyOnRails
[19:34:50] ravenousmoose: has joined #RubyOnRails
[19:44:39] andywww: has joined #RubyOnRails
[19:52:37] conta: has joined #RubyOnRails
[20:01:31] cxl: has joined #RubyOnRails
[20:01:40] cxl: Hi, if I am using rspec in a rails project, it creates a spec/spec_helper.rb file. Should I also keep test/test_helper.rb or does it replace it? In a new project with no specs or tests in spec/ and test/ ?
[20:08:04] MrCrackPotBuilde: has joined #RubyOnRails
[20:08:47] rascencio: has joined #RubyOnRails
[20:11:08] s00pcan: has joined #RubyOnRails
[20:15:11] ur5us: has joined #RubyOnRails
[20:18:06] MrCrackPotBuilde: has joined #RubyOnRails
[20:26:37] orbyt_: has joined #RubyOnRails
[20:35:09] ravenousmoose: has joined #RubyOnRails
[20:50:23] gambl0r3: has joined #RubyOnRails
[20:52:35] uksio: has joined #RubyOnRails
[20:57:08] cnsvc: has joined #RubyOnRails
[21:04:27] cnsvc: has joined #RubyOnRails
[21:39:04] orbyt_: has joined #RubyOnRails
[21:40:00] MrCrackPotBuilde: has joined #RubyOnRails
[21:59:30] rascencio: has joined #RubyOnRails
[22:15:25] mikecmpb_: has joined #RubyOnRails
[22:19:03] MrCrackPotBuilde: has joined #RubyOnRails
[22:24:57] ellcs: has joined #RubyOnRails
[22:32:47] orbyt_: has joined #RubyOnRails
[22:42:58] MrCrackPotBuilde: has joined #RubyOnRails
[22:45:37] eddof13: has joined #RubyOnRails
[22:55:32] hnanon: has joined #RubyOnRails
[23:39:47] orbyt_: has joined #RubyOnRails
[23:46:57] MrCrackPotBuilde: has joined #RubyOnRails
[23:58:30] SteenJobs: has joined #RubyOnRails
[23:59:05] MrCrackPotBuilde: has joined #RubyOnRails