Posts by cesartalves • 126 points
5 posts
-
1
votes1
answer199
viewsA: Treating URL/string in Ruby on Rails
I saw that you already found a solution, but if anyone has similar doubt, just replace http or https in the link: link.gsub(/https?\/\//, '')
-
0
votes1
answer32
viewsA: Merge different Methods Querys into a single JSON
json_unido = fc_inicio.merge(json_date) Just be careful because repeated keys can be overwritten
-
0
votes2
answers223
viewsA: How to convert an array to hash?
Alternatively: [{"eh5g4vs84ah84gsdf4a8va"=>"information"}].first hash_dentro_array, restante = *[{"eh5g4vs84ah84gsdf4a8va"=>"information"}] Basically, you’re just taking the value at index 0…
rubyanswered cesartalves 126 -
0
votes1
answer63
viewsA: Adding another field to an Httparty field
I don’t know if I understand it very well, but I think just throw the password in a variable: password = Faker::Number(6) @@base_url = 'https://api-de-tarefas.herokuapp.com/users' @@body = { "user":…
-
0
votes1
answer34
viewsA: Error in Bundle install in Travis
Here is a Travis.yml of mine that is working normally: language: ruby cache: bundler rvm: - 2.4.5 before_install: - gem update --system - gem install bundler env: global: - RACK_ENV=test -…