#RubyOnRails - 10 May 2019
« Back 1 day Forward 1 day »
[09:51:29] Skilly: I have a model that has an attribute which is a JSON, when I .new it with the params I get from a request, the JSON's values which should be integers are strings
[11:58:31] broman: can someone please help me? I'm trying to keep a ruby socket open through a rails application.. did someone already managed to accomplish that? I already searched a lot and everytime is about a ruby socket persistence, without taking the rails into consideration
[13:38:05] LiamW: if it helps (config/routes.rb for actionmailbox is unconfigurable) I don't want action mailbox at all
[13:42:30] LiamW: there are also some activestorage routes I didn't realize were present last time around and want to get rid of them
[13:53:14] LiamW: I changed my require line in application.rb to remove the railties for action mailbox and active storage
[14:19:35] haxx0r: i need to submit banktransfers with my bank, but there is not api. so i thought i'll use cuprite and headless chrome. i remember, running headless chrome was pita , 5 years ago and didnt' really work. what's my best way to do this? i need login, create transfer, then pull the OTP from my sms gateway, submit the transfer, make a screenshot and that'
[14:21:25] haxx0r: i remember development was quite easy since the browser opened and we can see what we've been doing
[14:21:50] havenwood: haxx0r: https://developer.squareup.com/blog/useful-tools-headless-chrome-puppeteer-for-browser-automation-testing/
[14:46:53] haxx0r: havenwood seems like there isn't even a post request and i have to do it via click events
[14:58:01] Travis-42: sure, I guess, but then aren't I fighting rails again? for example, if I use action text, it'll install trix via yarn
[15:42:17] Inside: I probably should've dug deeper when my tests were taking much longer to load than usual ;)
[16:58:07] FrankDW: Best practices for doing something like maintaining a persistent connection from a Rails app to an external source (ie an instantiation of a class from a gem where it would be better to not constantly create a new HTTP connection to the place I need to query data from)?
[17:00:33] FrankDW: Also.. where to put globally accessible logic to all controllers/models? I currently have it in app/lib/, but when I modify a controller in dev mode I get a namespace error when trying to use classes in there..
[17:22:18] FrankDW: Inside, I think they just use net/http in the Gem.. it's a really small internal app, so I'd be fine with just using a global variable and one instantiation
[17:35:02] FrankDW: and I have a class that wraps around this Gem.. getting Namespace errors when modifying anything, have to restart puma/rails
[17:58:47] nacsurte: I'm trying to create a custom type for the attributes API, and it seems like it works except when i try to save the model, it doesn't save. It just shows the "BEGIN COMMIT" stuff