« Back to channel list

#RubyOnRails - 27 June 2019

« Back 1 day Forward 1 day »
[00:01:19] agent_white: has joined #RubyOnRails
[00:06:40] voker57: has joined #RubyOnRails
[00:06:46] pitastrudl: has joined #RubyOnRails
[00:06:50] Liothen: has joined #RubyOnRails
[00:06:55] coffeejunk: has joined #RubyOnRails
[00:07:24] salasrod: has joined #RubyOnRails
[00:07:34] havenwood: has joined #RubyOnRails
[00:07:44] hahuang65: has joined #RubyOnRails
[00:11:55] ChrisBr: has joined #RubyOnRails
[00:11:57] psmolen: has joined #RubyOnRails
[00:13:44] crankharder: has joined #RubyOnRails
[00:36:48] gambl0re: has joined #RubyOnRails
[00:53:34] DukeDave: has joined #RubyOnRails
[00:55:14] wbnns: has joined #RubyOnRails
[01:11:18] tweaks: has joined #RubyOnRails
[01:14:49] leeky: has joined #RubyOnRails
[01:25:08] IGnorAND: ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage Caused by: ArgumentError: key must be 16 bytes <- I cant find any posts about this for ruby 2.5.3 and rails 5.2.3
[01:34:42] orbyt_: has joined #RubyOnRails
[01:50:47] duderonomy: has joined #RubyOnRails
[01:52:27] m_antis: has joined #RubyOnRails
[02:06:49] nav2002: has joined #RubyOnRails
[02:08:28] tweaks: has left #RubyOnRails: ()
[02:13:35] tweaks: has joined #RubyOnRails
[02:17:56] davidh38: has joined #RubyOnRails
[02:26:50] Vircung: has joined #RubyOnRails
[02:31:52] Saukk: has joined #RubyOnRails
[02:38:10] Xesevi: has joined #RubyOnRails
[02:53:35] gb_away: has joined #RubyOnRails
[02:59:05] duderonomy: has joined #RubyOnRails
[03:10:10] Technodrome: has joined #RubyOnRails
[03:12:18] braincrash: has joined #RubyOnRails
[03:13:13] davidh38: has joined #RubyOnRails
[04:21:37] mrpropa: has joined #RubyOnRails
[04:29:49] za1b1tsu: has joined #RubyOnRails
[04:41:09] mrpropa: has joined #RubyOnRails
[04:49:16] nav2002: has joined #RubyOnRails
[04:53:33] sandstrom: has joined #RubyOnRails
[05:00:17] srinidhi: has joined #RubyOnRails
[05:18:37] conta: has joined #RubyOnRails
[05:25:17] alxgsv: has joined #RubyOnRails
[05:30:23] russt: has joined #RubyOnRails
[05:38:50] schneider: has joined #RubyOnRails
[05:55:36] tdy: has joined #RubyOnRails
[06:02:42] conta: has joined #RubyOnRails
[06:03:20] Technodrome: has joined #RubyOnRails
[06:10:52] srinidhi: has joined #RubyOnRails
[06:11:11] m_antis: has joined #RubyOnRails
[06:11:12] lankanmon: has joined #RubyOnRails
[06:21:30] \13k: has joined #RubyOnRails
[06:45:05] schneider: has joined #RubyOnRails
[07:08:49] cca4: has joined #RubyOnRails
[07:14:11] cca4: Hello I have a local docker container with rails nginx unicorn when I use this configuration I don't have the details of the query in my console after a docker-composes uphttps://dpaste.de/z2W9On the other hand if I keep the same configuration but I use puma instead of unicorn I have the details of the queries with SQL queryhttps://dpaste.de/51iV
[07:14:33] haxx0r: has joined #RubyOnRails
[07:14:36] davidh38: has joined #RubyOnRails
[07:14:46] haxx0r: anybodu know when 6.0 is official?
[07:27:31] ZAJDAN: cca4: I would like to try Docker ...but so far did not use it
[07:28:21] ZAJDAN: haxx0r: Iam glad with 5.2.3 :_)
[07:28:40] haxx0r: i would like actionmailbox :)
[07:31:07] cca4: Does anyone have any idea ?
[07:37:03] sandstrom: has joined #RubyOnRails
[07:38:03] ZAJDAN: maybe the fastest will be ask directly people who created unicorn
[07:38:59] ZAJDAN: cca4 : the first link doesnt work on the dpaste
[07:47:44] deepredsky: has joined #RubyOnRails
[07:52:43] mikecmpbll: has joined #RubyOnRails
[07:59:10] ZAJDAN: any idea how to implement IF statement into <tr> based on child <td> ? ....something like: if <td week.planned> set class
[08:01:35] haxx0r: NoMethodError (undefined method `ArgumentError'
[08:01:39] haxx0r: how is that possible
[08:05:42] ZAJDAN: haxx0r...this I was facing many time
[08:07:31] haxx0r: raise ::ArgumentError if used inside a module somehow
[08:11:10] ZAJDAN: in my last case it caused because of I send from view/input variable without value ...so I created in controller if @kw.nil? || @kw.empty?
[08:12:03] ZAJDAN: but what I remember 'NoMethodError' appeared also from other reasons
[08:20:14] uksio: has joined #RubyOnRails
[08:35:06] conta: has joined #RubyOnRails
[08:44:56] Technodrome: has joined #RubyOnRails
[09:02:37] jefffrails35: has joined #RubyOnRails
[09:17:27] davidh38: has joined #RubyOnRails
[09:18:33] hammer065: has joined #RubyOnRails
[09:37:54] Ergo: has joined #RubyOnRails
[10:06:56] za1b1tsu: has joined #RubyOnRails
[10:10:28] conta: has joined #RubyOnRails
[10:26:00] davidh38: has joined #RubyOnRails
[10:56:40] davidh38: has joined #RubyOnRails
[11:01:46] lankanmon: has joined #RubyOnRails
[11:07:56] ZAJDAN: how to create multiple nested child folders? something like: FileUtils.mkdir_p 'grandparents/parents/{1,2,3,4,5,6}'
[11:14:22] davidh38: has joined #RubyOnRails
[11:24:48] conta: has joined #RubyOnRails
[11:27:13] davidh38: has joined #RubyOnRails
[11:51:14] conta1: has joined #RubyOnRails
[11:52:19] deathwishdave: has joined #RubyOnRails
[11:58:56] davidh38: has joined #RubyOnRails
[12:01:05] ZAJDAN: this works nicelly: system('mkdir', '-p', File.join("#{path}/1"),File.join("#{path}/2"), File.join("#{path}/3") )
[12:01:25] ZAJDAN: I call the system only once and it was goal
[12:01:49] schneider: has joined #RubyOnRails
[12:29:02] sajinmp: has joined #RubyOnRails
[12:29:17] sajinmp: has left #RubyOnRails: ()
[12:38:53] nav2002: has joined #RubyOnRails
[13:04:12] Dr_MDMA_MD: has joined #RubyOnRails
[13:10:08] HumorBaby: has joined #RubyOnRails
[13:10:34] alxgsv: has joined #RubyOnRails
[13:12:18] HumorBaby: has joined #RubyOnRails
[13:12:46] ZAJDAN: how to get just value from Activerecord?
[13:22:01] haxx0r: has joined #RubyOnRails
[13:23:30] davidh38: has joined #RubyOnRails
[13:25:51] crankharder: has joined #RubyOnRails
[13:40:49] pavelz: has joined #RubyOnRails
[13:41:23] pavelz: so config/secrets.yml is gone in 5.2?
[13:41:43] pavelz: replaced with credentials.yml.end ?
[13:49:35] crankharder: has joined #RubyOnRails
[13:52:01] NL3limin4t0r: ZAJDAN: Use `pluck`. Eg. `Person.where(id: [1, 2, 3]).pluck(:name) #=> ['Joe Dough', 'Jane Dough', 'Jan Janssen']`
[13:52:30] ZAJDAN: NL3 ...thank you
[13:55:16] ZAJDAN: it returns array?
[13:56:51] davidh38: has joined #RubyOnRails
[13:57:19] al-damiri: has joined #RubyOnRails
[13:57:28] deathwishdave: has joined #RubyOnRails
[14:02:46] ZAJDAN: or is it hash?
[14:03:34] havenwood: ZAJDAN: [] # <- that's an Array literal
[14:04:13] havenwood: ZAJDAN: {} # <- squiggly braces for a Hash literal
[14:04:52] havenwood: ZAJDAN: You can ask it: ...pluck(:name).class #=> Array
[14:10:53] ZAJDAN: Commission.select(:path_to_pdf).where(:commission_num => 123456).first.path_to_pdf ...this way gives me directly the value and this I want to
[14:32:43] deathwishdave: has joined #RubyOnRails
[14:36:56] crankharder: has joined #RubyOnRails
[14:51:28] davidh38: has joined #RubyOnRails
[14:54:08] jarr0dsz: has joined #RubyOnRails
[14:54:27] jarr0dsz: hello everyone im investigating encryption options for ruby on rails ActiveRecord.
[14:56:29] jarr0dsz: I already asked before but im not sure on the best way to go, rbnacl seems a good gem for encryption but i understand from the docs that it cannot do ActiveRecord encryption 'automagic'
[14:56:50] jarr0dsz: then there is semmantic encryption gem which seems to be best option with aws integration for kms but the implementation is unclear to me after reading the docs
[14:57:22] jarr0dsz: has anyone implemented https://github.com/rocketjob/symmetric-encryption or knows an opensource application that implements it so i can look into/learn from it?
[15:07:49] nav2002: has joined #RubyOnRails
[15:13:58] Gizmokid2005: has joined #RubyOnRails
[15:22:33] NL3limin4t0r: jarr0dsz: I don't have the largest experience with encryption gems. But "devise" makes use of "bcrypt". https://rubygems.org/gems/bcrypt
[15:23:01] NL3limin4t0r: ^ assuming that you want to encrypt database data
[15:27:29] NL3limin4t0r: jarr0dsz: Keep in mind that this is specifically for passwords, meaning that you can't decrypt the data.
[15:28:34] NL3limin4t0r: jarr0dsz: You could also take a look at the ruby-toolbox encryption category https://www.ruby-toolbox.com/categories/encryption
[15:29:19] lemonandroid: has joined #RubyOnRails
[15:30:54] gambl0re: has joined #RubyOnRails
[15:31:12] jarr0dsz: NL3limin4t0r yes i have reviewed the toolbox options.
[15:31:35] jarr0dsz: attr_encrypted seems most used but it seems also outdated non maintained. and it requires an extra column column_encrypted in the db
[15:32:05] jarr0dsz: the symmetric-encryption does not require this but the implementation i dont understand, i followed the instructions but im receiving exception.
[15:32:22] jarr0dsz: so my thought was to look into a example implementation. to see what i have done wrong.
[15:32:34] jarr0dsz: and interested if anyone here has implemented it in there app
[15:33:42] crankharder: has joined #RubyOnRails
[15:35:30] scp: has joined #RubyOnRails
[15:50:12] schneider: has joined #RubyOnRails
[15:52:32] NL3limin4t0r: Seems like like it's a simple plain Ruby gem. You feed it a string and it encrypt/decrypt. You can have a before_save callback that encrypts the attribute and an after_commit/after_rollback callback that decrypts the attribute. Furthermore you should add an after_find callback that decrypts the data after loading it from the database.
[15:52:40] duderonomy: has joined #RubyOnRails
[15:53:24] GodFather: has joined #RubyOnRails
[15:59:41] jarr0dsz: ok i followed the exact steps for configuration but recieving a Unknown type :encrypted have , i assumed setting the column encryption in model would encrypt/decrypt values according to the documentation.
[15:59:52] jarr0dsz: ``` attribute :email, :encrypted, random_iv: true```
[16:01:10] MrCrackPot: jarr0dsz, if your looking for more encrption options like generating keys etc you can create your own module and use require openssl
[16:01:40] jarr0dsz: encryption seems to work fine from the rails console, so im a bit confused what im missing.
[16:02:09] jarr0dsz: i know i can use own module but since im new to encryption i assumed using a gem would work best. since it also support aws kms ouf of the box.
[16:02:24] orbyt_: has joined #RubyOnRails
[16:02:36] jarr0dsz: perhaps its this line require 'symmetric_encryption/core' i have included this in my application_controller would that not make it available in the models also?
[16:02:51] jarr0dsz: in that case i would need to require it at the model layer instead ( inside my models that use encryption )
[16:03:40] jarr0dsz: it seems that also fails require at model layer, have to digg the documentation a bit deeper its not very clear what i missed.
[16:05:09] jarr0dsz: https://rocketjob.github.io/symmetric-encryption/frameworks.html this is the section of the documention listing how to implement it in ralis 5 model which i followed exactly
[16:05:45] MrCrackPot: https://gist.github.com/wteuber/5318013
[16:05:52] MrCrackPot: take a look at this.
[16:06:10] MrCrackPot: this still works for basic enrcryption
[16:07:25] jarr0dsz: ok i understand but rather use the gem because it supports aws and prevents beginners mistakes in encryption.
[16:07:46] MrCrackPot: when you say supports aws what do you mean
[16:07:52] jarr0dsz: i can even encrypt a file in terminal it only seems to throw exception in rails model, Unknown type :encrypted what would be the best way to debug this?
[16:08:23] jarr0dsz: i assume the gem provides this attribute :email, :encrypted :encrypted function.
[16:08:46] jarr0dsz: however it seems the gem is loaded fine, in console it works corretly. so a bit confused why this exception is thrown
[16:09:26] davidh38: has joined #RubyOnRails
[16:10:56] scp: has joined #RubyOnRails
[16:11:50] Saukk: has joined #RubyOnRails
[16:11:58] jarr0dsz: basically the exception is rails cast_type Unknown for column :encrypted
[16:14:37] jarr0dsz: according to this: https://metova.com/rails-5-attributes-api/ it seems attribute :price, :integer and integer is default type, so my :encrypted type is a non default type which should be provided by the gem (?)
[16:15:03] jarr0dsz: just reading the docs thats is my interpretation, is there i way i could best debug why my custom :encrypted type fails to be defined?
[16:15:20] jarr0dsz: i assume the gem is not correctly loaded somehow or does not provide the custom encrypted type to the application
[16:19:52] NL3limin4t0r: jarr0dsz: What versions are you using? The lick provided says you need Symmetric Encryption 4.3 or higher and Rails 5 or higher.
[16:20:09] NL3limin4t0r: lick => link*
[16:27:27] jarr0dsz: im using rails Rails 5.2.3 and the latest version of the gem
[16:27:57] jarr0dsz: symmetric-encryption (4.3.0) is the used gem version.
[16:29:13] Makku: has joined #RubyOnRails
[16:29:19] Makku: Hi, what is the latest compiler used in Ruby, and what is it in Ruby 2.1
[16:29:27] jarr0dsz: i have the gem installed and moved the require 'symmetric_encryption/core' back to the application_controller it seems to me the custom encrypted type is not made available. using postgres i read some documentation on custom types but i assume the gem would take care of this
[16:30:52] jarr0dsz: i do however in rails console after do a require for the gem , get an error SymmetricEncryption::ConfigError (Call SymmetricEncryption.load! or SymmetricEncryption.cipher= prior to encrypting or decrypting data)
[16:31:13] jarr0dsz: not sure if this is console related. a bit hard to debug this one
[16:32:36] jarr0dsz: so tried this https://gist.github.com/michaelsalexander83/932dfaf6a90d61476f7a63a83699ab4a but also fails with same exception Unknown type :encrypted
[16:34:05] MrCrackPot: So i had an apifanny in the hospital just now. I've been trying to use active storage with json api with absalute zero success. Today i have direct uploads to my amazon storage bloody finally
[16:35:59] jarr0dsz: the prevailer wins MrCrackPot ;)
[16:36:31] jarr0dsz: perhaps i should look at alternative solution. If i can't get it to work :( Basically I only need simple encryption with AWS kms keystore, there are more gems providing this
[16:37:14] MrCrackPot: doesnt aws run using openssl ??
[16:37:18] MrCrackPot: it took a week
[16:37:46] MrCrackPot: in the end i had to remove active storage all together and recreate my own. suited to the clients request
[16:37:59] MrCrackPot: took about 30 mins
[16:39:02] srinidhi: has joined #RubyOnRails
[16:46:18] srinidhi: has joined #RubyOnRails
[16:49:33] jarr0dsz: seems to be unable to fix the problem with the gem, anyone has any thoughts on how i could resolve?
[16:50:09] jarr0dsz: after require core module from gem with require '' it seems i need to even load SymmetricEncryption.load! to be able to encrypt which is logic. but the error in models persist
[16:57:55] duderonomy: has joined #RubyOnRails
[17:00:25] argoneus: has joined #RubyOnRails
[17:05:37] GodFather: has joined #RubyOnRails
[17:12:22] mightu: has joined #RubyOnRails
[17:13:12] davidh38: has joined #RubyOnRails
[17:16:45] scp: has joined #RubyOnRails
[17:21:07] crankharder: has joined #RubyOnRails
[17:25:29] crankharder: has joined #RubyOnRails
[17:25:31] alxgsv: has joined #RubyOnRails
[17:29:18] uks: has joined #RubyOnRails
[17:38:32] mightu: hi all, i am trying to make http requests to the star wars api from my rails app so it populates a blank html page i have, but im unable to get the swapi results to populate the page. right now, i am making a http proxy request in my action that corresponds to the html page.
[17:43:08] Vaevictus: star wars /wiki/ api or what?
[17:43:22] Vaevictus: some sorta game?
[17:44:29] Vaevictus: ACTION googled it. cute. :D
[17:48:09] Vaevictus: mightu: i'm rusty for rails, but this seems ruby specific. what do you mean by http proxy request? i'm assuming that's not net/http ?
[17:48:41] mightu: just any api end point, im using the /people/1 end point right now to test it. first time using api x)
[17:49:29] mightu: i dont believe so, its this: https://github.com/httprb/http/wiki/Proxy-Support
[17:50:07] mightu: it was suggested to me by a fellow rails developer. i want to make api calls to wistia (a cloud storage service for videos), but the wistia gem is not being actively supported, so im just going to make regular http requests from my app
[17:50:28] hemmi: has joined #RubyOnRails
[17:51:00] Vaevictus: have you evaluated ActiveResource? i'm not sure if it's usable for your cawse
[17:51:34] davidh38: has joined #RubyOnRails
[17:51:58] mightu: i have not evaluated ActiveResource, but ill check it out now :D
[17:52:29] Vaevictus: if it works, it might be very handy to treat things as if they were ActiveRecords
[17:52:37] Vaevictus: looks fancy to me
[17:52:52] Vaevictus: just to ask the question, you've tested with curl already from your server? maybe the problem is a network one
[17:53:29] Vaevictus: also, now that i'm looking at proxy, do you actually require a proxy?
[17:53:39] mightu: to be honest, im pretty rusty with rails (haha same like you), as well as with stuff like ActiveRecords. which do you think is easier/straight forward?
[17:53:43] Net: can I set code to be run on rails c without using pryrc?
[17:54:06] Vaevictus: mightu: my last production rails app was like rails 2ish
[17:54:20] mightu: @vaevictus no i have not tested with curl, and i am developing locally. not thinking about production right now cause i dont know what im doing ^_^''
[17:54:39] Vaevictus: mightu: and you have a separate proxy already?
[17:55:34] mightu: more experience than me though :P
[17:55:34] mightu: also, yes i do require a proxy
[17:55:54] mightu: no, thats why i was told to use that proxy link i sent you, because it apparently takes care of the proxy and authentication token aspect (which i will need to pull videos from wistia). i just make calls
[17:57:57] mightu: if it helps, here is my stackOverflow post which also contains the app itself: https://stackoverflow.com/questions/56795792/how-to-properly-use-http-proxy-call-in-rails-app
[17:58:11] Vaevictus: activeresource does support proxy, fwiw
[17:59:11] Vaevictus: anyway, is that sufficient ? i'd think you'd be setting a variable and calling a view or something
[18:01:25] lemonandroid: has joined #RubyOnRails
[18:02:02] mightu: why use active resource if i could just use the http calls which support proxy directly, then?
[18:03:04] Vaevictus: for wistia, dunno
[18:03:21] Vaevictus: for swapi, you could have models specifically for, say, characters from sw.
[18:03:31] Vaevictus: and instead of a db, would use the remote api
[18:03:49] mightu: did you use apis that required auth tokens in your production app?
[18:04:13] Vaevictus: nope, it didn't require any outside resources.
[18:04:41] mightu: i mean wistia is no different from any other api like facebook, it just has an auth token i need to pass along so wistia completes the api calls. i already have the project id required to make the api calls i want, im just unable to actually make an api call for some reason
[18:04:42] Vaevictus: so, my gut feeling is that you're not actually putting any data into your view from your action
[18:05:03] Vaevictus: ... that you're actually making the api request, then not showing it
[18:05:25] Vaevictus: i.e. your action should be @result = HTTP.via()...
[18:09:13] za1b1tsu: has joined #RubyOnRails
[18:10:58] mightu: this is my code: result = HTTP.via("proxy-hostname.local", 8080).get("https://swapi.co/api/people/1")
[18:11:13] Vaevictus: i didn't see that on the github
[18:11:15] mightu: so im just getting a server error right now (will debug): failed to connect: getaddrinfo: nodename nor servname provided, or not known
[18:11:27] Vaevictus: server not resolving something
[18:11:32] Vaevictus: should it be swapi.com?
[18:11:43] Vaevictus: nope, must be proxy-hostname.local
[18:12:08] mightu: its on branch project-wistia i believe, sorry did not mention (not MASTER branch)
[18:12:29] mightu: no, it is https://swapi.co/
[18:14:11] GodFather: has joined #RubyOnRails
[18:14:34] mightu: https://gyazo.com/8d3263e608be1179f678173f21b4a1c0
[18:19:59] Vaevictus: can you ping proxy-hostname.local ?
[18:21:30] mightu: i think i needed to change that. now its "localhost" thanks for being patient with me, btw :) im pretty new to this
[18:21:56] mightu: now im getting a different error, but much closer to being correct :D
[18:22:03] mightu: failed to connect: Connection refused - connect(2) for "localhost" port 8080
[18:22:34] Vaevictus: well, that means it can communicate with the host, but you're not running a proxy on localhost on port 8080
[18:23:05] Vaevictus: (or it's firewalled, but that's unlikely)
[18:23:08] s00pcan: has joined #RubyOnRails
[18:23:55] mightu: okay, so i need to set up a proxy on localhost. i'll find out how to do that now
[18:24:02] Vaevictus: i'm confused.
[18:24:10] Vaevictus: you're adding a proxy for wistia?
[18:25:02] mightu: uhhh. yes?
[18:25:39] mightu: the information i want to retrieve from using wistia's api is hidden behind an account. i created an auth token for that account. so i need a proxy so i can hide the auth token
[18:25:42] s00pcan_: has joined #RubyOnRails
[18:25:53] mightu: i might incorrectly using words (let me know if i am)
[18:27:22] Vaevictus: i don't think you're doing it right
[18:27:29] Vaevictus: auth token is not likely used via the proxy
[18:29:10] mightu: _the more you know_
[18:29:36] mightu: so what do you suggest then? how would YOU do this
[18:30:21] Vaevictus: typically, you just request things via apis and include the token in a fashion
[18:30:28] Vaevictus: it's got nothing to do with any sort of proxy
[18:30:46] Vaevictus: the client won't see your auth token for wistia anyway
[18:31:09] Vaevictus: unless you put the auth token in javascript or something
[18:31:35] Vaevictus: ultimately, it's the server that's making the wistia api request, not your client
[18:32:12] jarr0dsz: does anyone maybe have an idea how i could debug attribute :name, :encrypted, random_iv: false, Unknown type :encrypted im still trying to resolve this to no avail for the gem https://github.com/rocketjob/symmetric-encryption
[18:32:21] mightu: okay, i see. so i DONT have to worry about exposing the authorization token
[18:32:27] mightu: i was doing the project before in javascript, so i was told by someone to make sure i didnt expose the auth token by using a proxy. that must only apply to javascript
[18:32:40] mightu: or langs that dont have that feature
[18:32:41] Vaevictus: mightu: exactly. your rails app (not the browser) is calling an url like: https://api.wistia.com/v1/medias.json?api_password=xyz123
[18:32:56] Vaevictus: javascript would be run in the browser
[18:32:56] jarr0dsz: i have run the testcase and inspected code and see nothing i missed in my own codebase, the only difference im using postgres and the rest only are written for sqlite and mongodb
[18:33:10] Vaevictus: well, unless you're running in node.js or something
[18:33:31] jarr0dsz: is there anything i need to consider when using a custom cast type for postgres with rails 5 ? i really need this encryption solved before i can launch my application
[18:33:45] mightu: and this isnt exposed to the client (cant be exposed to the client), in any way?
[18:33:46] mightu: no im not
[18:33:49] mightu: im hosting this on heroku
[18:34:16] Vaevictus: i'm just saying, mightu, that you could write a project in javascript, run it on node.js, serverside, and not expose your token.
[18:34:34] mightu: but i want to do this in rails
[18:34:39] mightu: are u saying do this alongside my rails
[18:35:02] Vaevictus: no. you said your previous implementation was javascript
[18:35:09] mightu: yeah thats what i was saying, im supposed to deal with the auth token on the server
[18:35:10] Vaevictus: just ignore the last 3 lines :D
[18:35:28] Vaevictus: right. auth token should only exist on the server, never be sent to the browser
[18:35:34] jarr0dsz: or could anyone point me to howto on how to implement encrypt/decrypt for AR and be able to use amazon KMS lateron?
[18:35:50] mightu: alright, i just need to find a way to do this on rails
[18:35:58] mightu: do you know any good rails HTTP request resources?
[18:36:07] Vaevictus: mightu: start by just removing the .via() part of your request
[18:36:26] mightu: okay so just this: result = HTTP.get("https://swapi.co/api/people/1")
[18:36:34] hemmi: has joined #RubyOnRails
[18:37:35] mightu: how would i render this? would i embed the result into my videos.html.erb?
[18:37:40] Vaevictus: and later, result=HTTP.get("https://whateverwistiaapi.com/path/thing?api_password=auth_code_here
[18:37:58] Vaevictus: yeah, videos.html.erb could have a <%= result >
[18:38:30] Vaevictus: or you parse it out of json and render whatever you're going to render
[18:38:41] hemmi: Hi there. Is it advisable to keep models and controller structures pretty flat? I've got a route structure that ends up looking like this: https://paste.ee/p/mVJoS and I'm pretty happy with it, but I can see how it could get out of hand with a lot more resources. Is nesting controller modules (and even models) something to avoid in Rails?
[18:40:18] mightu: how do I @ you, Vaevictus?
[18:40:42] Vaevictus: pms are fine
[18:52:25] Technodrome: has joined #RubyOnRails
[18:55:15] sandstrom: has joined #RubyOnRails
[19:29:51] davidh38: has joined #RubyOnRails
[19:59:43] deepredsky: has joined #RubyOnRails
[20:04:13] hemmi: If I have a route namespace that also has a resource with the same name, do I have to do something like /foo/foo/1?
[20:05:28] havenwood: hemm, they left?
[20:06:45] jefffrails35: has joined #RubyOnRails
[20:16:47] mightu: hi, do you still have your question?
[20:16:51] mightu: maybe i can try to help, learning rails as well
[20:23:15] mightu: has left #RubyOnRails: ()
[20:29:13] deepreds1: has joined #RubyOnRails
[20:37:55] sandstrom: has joined #RubyOnRails
[20:43:52] sandstrom: has joined #RubyOnRails
[21:14:04] jarr0dsz: has joined #RubyOnRails
[21:14:30] jarr0dsz: hello everyone, i still havent resolved my issue with ArgumentError: Unknown type :encrypted for attribute :name, :encrypted, random_iv: false, type: :string
[21:15:01] jarr0dsz: what would be the best way to debug this? this is related to semmetric encryption gem. followed the docs 2x times rechecked everything but it just fails with this exception everytime.
[21:15:15] jarr0dsz: spend 2 hours on it already i hope someone has an idea
[21:15:24] ellcs: has joined #RubyOnRails
[21:17:54] Caly`: has joined #RubyOnRails
[21:29:26] davidh38: has joined #RubyOnRails
[21:37:06] xco: has joined #RubyOnRails
[21:42:52] Fernando-Basso: has joined #RubyOnRails
[21:47:43] s00pcan_: has joined #RubyOnRails
[22:07:06] davidh38: has joined #RubyOnRails
[22:34:18] psmolen: has joined #RubyOnRails
[23:21:18] brool: has joined #RubyOnRails