« Back to channel list

#RubyOnRails - 28 May 2019

« Back 1 day Forward 1 day »
[00:10:42] skryking: has joined #RubyOnRails
[00:24:47] orbyt_: has joined #RubyOnRails
[00:34:18] Axsuul: has joined #RubyOnRails
[00:44:50] ariedler: has joined #RubyOnRails
[00:46:06] kapilp: has joined #RubyOnRails
[00:50:39] orbyt_: has joined #RubyOnRails
[00:53:46] quazimodo: has joined #RubyOnRails
[00:55:05] sevenseacat: has joined #RubyOnRails
[01:08:18] bambanxx: has joined #RubyOnRails
[01:21:07] tdy: has joined #RubyOnRails
[01:40:15] quazimodo: has joined #RubyOnRails
[01:50:53] _dbugger: has joined #RubyOnRails
[02:13:27] ltd: has joined #RubyOnRails
[02:15:00] Technodrome: has joined #RubyOnRails
[02:20:41] ur5us: has joined #RubyOnRails
[02:46:05] ariedler: has joined #RubyOnRails
[02:50:33] Saukk: has joined #RubyOnRails
[03:11:17] braincrash: has joined #RubyOnRails
[03:19:26] LenPayne: has joined #RubyOnRails
[03:25:11] MrCrackPotBuilde: has joined #RubyOnRails
[03:30:50] duderonomy: has joined #RubyOnRails
[03:56:03] tdy: has joined #RubyOnRails
[04:26:55] Tempesta: has joined #RubyOnRails
[04:41:04] jstrong: has joined #RubyOnRails
[04:46:49] ariedler: has joined #RubyOnRails
[04:55:13] srinidhi: has joined #RubyOnRails
[05:01:49] srinidhi: has joined #RubyOnRails
[05:09:50] orbyt_: has joined #RubyOnRails
[05:20:45] conta: has joined #RubyOnRails
[05:57:21] schne1der: has joined #RubyOnRails
[06:04:43] srinidhi: has joined #RubyOnRails
[06:06:00] _aeris_: has joined #RubyOnRails
[06:44:08] lxsameer: has joined #RubyOnRails
[06:45:20] ZAJDAN: hi...what do You recommand to make label in uppercase?
[06:47:42] ariedler: has joined #RubyOnRails
[06:48:06] ZAJDAN: I would like to do it directly in _form.html.rb
[06:51:22] _dbugger: has joined #RubyOnRails
[07:01:36] noob69: has joined #RubyOnRails
[07:02:07] lankanmon: has joined #RubyOnRails
[07:02:08] powerbit: has joined #RubyOnRails
[07:02:32] noob69: Hi, so I'm trying to find a query that would help me find all the orders that have order.total > sum(order.order_payments.total)
[07:02:38] noob69: How do I write a query for this?
[07:23:00] amperry: has joined #RubyOnRails
[07:24:34] amperry: Starting up 'rails s', I'm getting the error "unable to monitor directories for changes", the one that recommends I go to https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers to see how to fix it. But it just started happening. I rebooted, and am running no other rails process. Why would that happen?
[07:26:18] jefffrails35: has joined #RubyOnRails
[07:34:05] schne1der: has joined #RubyOnRails
[07:39:57] tjbp: has joined #RubyOnRails
[07:48:41] kapilp: has joined #RubyOnRails
[08:13:14] ZAJDAN: is possible rename/regenerate existing controller?
[08:21:55] KeyJoo: has joined #RubyOnRails
[08:23:29] dionysus69: Is it effective to build fully async forms with stimulus js? so the data is sent with keystrokes, with 1 second debounce perhaps
[08:23:47] dionysus69: if any other js framework would be better suited for this task please let me know
[08:48:32] ariedler: has joined #RubyOnRails
[08:48:36] srinidhi: has joined #RubyOnRails
[08:55:46] webdestroya: has joined #RubyOnRails
[08:56:21] deepreds1: has joined #RubyOnRails
[09:07:38] NL3limin4t0r: ZAJDAN: You can rename/regenerate by simply removing it and generating it again with a new name `bundle exec rails destroy controller old_name ...` then `bundle exec rails generate controller new_name ...`
[09:08:38] NL3limin4t0r: ZAJDAN: But you might want to rename the controller and routes manually if you've put some work into it.
[09:30:37] deepreds1: has joined #RubyOnRails
[09:30:58] m_antis: has joined #RubyOnRails
[10:10:31] Sylario: has joined #RubyOnRails
[10:37:53] conta: has joined #RubyOnRails
[10:49:16] ariedler: has joined #RubyOnRails
[10:55:10] ariedler: has joined #RubyOnRails
[10:57:53] haxx0r: has joined #RubyOnRails
[11:00:48] lankanmon: has joined #RubyOnRails
[12:02:16] octos: has joined #RubyOnRails
[12:14:20] Ergo: has joined #RubyOnRails
[12:15:45] octos: has joined #RubyOnRails
[12:20:13] srinidhi: has joined #RubyOnRails
[12:52:57] KeyJoo: has joined #RubyOnRails
[12:56:54] conta1: has joined #RubyOnRails
[13:00:54] jstrong: has joined #RubyOnRails
[13:01:48] jefffrails35: has joined #RubyOnRails
[13:07:36] schneider: has joined #RubyOnRails
[13:18:49] jarr0dsz: has joined #RubyOnRails
[13:19:07] jarr0dsz: hello everyone, im higly confused. im trying to have a organisation/account/profile controller ( singular )
[13:19:36] jarr0dsz: all works fine, so i setup a controller => "profile" in my routes.. but the form_for has a url like organisation_profile_path
[13:19:52] jarr0dsz: but that path tries to create an object instead of updating the existing one.
[13:20:07] jarr0dsz: any experts could point me on what im missing here?
[13:21:32] jarr0dsz: basically the code and routes are like so: https://gist.github.com/voordev/77c5d9f4476d0b05bca3c14ce974f70e
[13:22:06] jarr0dsz: the edit form does a POST so #create action is called but it should update existing record and call #update
[13:24:32] jarr0dsz: if i specify :method => "put" explicit it calls the update method instead but i think this is not something that should be required right?
[13:25:10] NL3limin4t0r: jarr0dsz: Normally post is used if the instance matches the following `record.new_record?`. Check if this is the case for `@organisation.organisation_profile.new_record?`.
[13:25:43] NL3limin4t0r: add a line `- byebug` above the form
[13:26:43] NL3limin4t0r: Assuming you use haml, if you use erb add `<% byebug %>`
[13:27:24] jarr0dsz: thank you NL3limin4t0r diden't knew about that but sounds like logic, it returns false
[13:27:40] jarr0dsz: i also populate the form with existing data so im really sure the organisation_profile exists
[13:27:50] jarr0dsz: so now only workaround is explicit set the method.. to put
[13:29:14] jarr0dsz: now i have 1 thing that might cause the issue let me post my view controller for that
[13:29:16] jarr0dsz: so i have this: https://gist.github.com/voordev/9b746e5b509736d11f228836cd8de4fc
[13:29:37] NL3limin4t0r: Seems like it. I would use something like `@organisation.organisation_profile.new_record? ? :post : :put` so the form can still be used for new and edit.
[13:29:58] jarr0dsz: basically my /organisation/account path routes to /organisation/account/edit.haml where I have some tabs rendered with the view helpers you see in my gist. Then I just include every edit view of each section of the profile
[13:45:12] tdy: has joined #RubyOnRails
[13:53:22] haxx0r: css guru here? how can i make the white ball spin the opposite way? https://codepen.io/youdantoom/pen/VOBxMR
[13:56:40] srinidhi: has joined #RubyOnRails
[14:20:38] NL3limin4t0r: haxx0r: Add the word `reverse` between `rotate` and `1s` in `.inner[data-spinto="idle"]:before`.
[14:24:29] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/4f232aecb34aea96d66b689f14a213b8/pasted.txt
[14:24:30] haxx0r: i figured it out this way
[14:24:34] haxx0r: but i will try yours now
[14:24:37] Technodrome: has joined #RubyOnRails
[14:25:21] haxx0r: yours works perfect. thank you NL3limin4t0r
[14:25:53] NL3limin4t0r: haxx0r: From the mdn docs it seem that you should add it between `infinite` and `liniar`, but my first comment on the matter works too in my browser.
[14:26:04] NL3limin4t0r: https://developer.mozilla.org/en-US/docs/Web/CSS/animation
[14:31:34] AlHafoudh: has joined #RubyOnRails
[14:43:31] brendan-: has joined #RubyOnRails
[15:04:24] kapilp: has joined #RubyOnRails
[15:07:09] octos: has joined #RubyOnRails
[15:17:30] AlHafoudh: has joined #RubyOnRails
[15:37:59] srinidhi: has joined #RubyOnRails
[15:47:14] srinidhi: has joined #RubyOnRails
[15:48:40] tdy: has joined #RubyOnRails
[15:53:42] schne1der: has joined #RubyOnRails
[15:57:24] Axsuul: has joined #RubyOnRails
[16:07:06] lestairon: has joined #RubyOnRails
[16:29:17] RiPuk: has joined #RubyOnRails
[16:38:27] octos: has joined #RubyOnRails
[16:40:12] gambl0re: has joined #RubyOnRails
[16:59:19] duderonomy: has joined #RubyOnRails
[17:05:25] sameerynho: has joined #RubyOnRails
[17:32:49] tdy: has joined #RubyOnRails
[17:43:38] skryking: has joined #RubyOnRails
[17:46:25] istrasci: has joined #RubyOnRails
[17:46:30] istrasci: I'm using Devise for authentication using a Users model. In my SessionsController, I'm overriding the #create method, but it appears a new User record is being created (if they've never logged in before) before I even get to the #create method. How is this happening? Because I need to preempt the record creation.
[17:47:40] jhass: with created do you mean written into the database?
[17:50:56] beholders_eye: has joined #RubyOnRails
[17:51:57] jhass: istrasci: ^
[17:54:00] _aeris_: has joined #RubyOnRails
[17:57:02] deepreds1: has joined #RubyOnRails
[18:24:53] mlt-: has joined #RubyOnRails
[18:37:48] jefffrails35: has joined #RubyOnRails
[18:41:00] tdy: has joined #RubyOnRails
[18:44:43] istrasci: has joined #RubyOnRails
[18:58:42] TvL2386: has joined #RubyOnRails
[19:02:41] ravenousmoose: has joined #RubyOnRails
[19:30:05] catbusters: has joined #RubyOnRails
[19:48:31] orbyt_: has joined #RubyOnRails
[19:51:28] octos: has joined #RubyOnRails
[19:53:10] brool: has joined #RubyOnRails
[21:15:08] Technodrome: has joined #RubyOnRails
[21:23:01] ellcs: has joined #RubyOnRails
[21:38:33] jarr0dsz: has joined #RubyOnRails
[21:38:51] jarr0dsz: hello everyone, has anyone deployed a rails application where they left part of the application offline?
[21:39:11] jarr0dsz: im thinking of moving my admin role ( devise ) and move it out of the online deployment, run it locally and connect to remote db.
[21:39:49] jarr0dsz: the idea is that this could cause less security issues or unauthorized acces and i have some business logic i want not to be on a 'public' server. any thoughts regarding this? does this make sense
[21:40:40] jarr0dsz: so basically i already have parts of my code offline so the next thought was thus moving the admin ui and /admin section out alltogether also
[21:42:10] weaksauce: how would you connect to the db?
[21:43:29] jarr0dsz: weaksauce connecting to db with a remote database connection and a ssh tunnel
[21:43:54] jarr0dsz: also the db would be fully encrypted but since i already run another rails application locally i want to merge this with the admin.
[21:43:58] weaksauce: i guess it could work in a one off access kind of way
[21:44:14] weaksauce: but are you always going to be modifying the db from your one computer?
[21:45:06] jarr0dsz: weaksauce thats a good question. the idea is yes
[21:45:28] weaksauce: never going on vacation or hire more people?
[21:45:53] weaksauce: if you do hire people you are going to expect them to download and install rails and keep that up to date
[21:46:13] weaksauce: they have the source code at that point where they can change things willy nilly and give themselves super user access
[21:46:39] weaksauce: i mean it does reduce the attack surface sure
[21:46:52] jarr0dsz: weaksauce im basically the only one that does the 'management' tasks like adding new users etc so that will not be a problem.
[21:47:11] jarr0dsz: my thought was it really should not be online, there is no sense, to includle the admin parts and ui inside my 'regular rails app'
[21:48:43] bambanx: has joined #RubyOnRails
[21:49:04] weaksauce: that decision is up to you really.
[21:49:45] jarr0dsz: its in the category 'rethink it over first' ;p just was curious if someone would have done it before.
[22:19:00] jstrong: has joined #RubyOnRails
[22:21:28] octos: has joined #RubyOnRails
[22:29:47] kapilp: has joined #RubyOnRails
[23:14:34] Exuma: has joined #RubyOnRails
[23:15:26] Exuma: how do i validate a record so that the value cant be nil if they key is present
[23:15:39] Exuma: .new(xyz: nil) should fail, but .new() should work
[23:26:02] jstrong: has joined #RubyOnRails
[23:36:31] brool: has joined #RubyOnRails
[23:40:00] jstrong: has joined #RubyOnRails
[23:46:24] haxx0r: has joined #RubyOnRails
[23:58:50] orbyt_: has joined #RubyOnRails