Questions tagged as 'ruby-on-rails'

1
answer

Generate ruby tests

Trying to generate test in Ruby , specifically in my file _client_test.rb_ like this: require 'test_helper' class ClienteTest < ActiveSupport::TestCase test "no guardar un cliente sin nombre" do cliente = Cliente.new asse...
asked by 30.07.2018 / 17:51
1
answer

Postgres saves json data with characters \ "

When you save the json in a jsonb column in Postgres, save it in this format "{friend: [{\" name \ ": \" paolo \ ", \" value \ ": \" warrior \ "}, {\" name \ ": \" (label) \ ", \ "value \": \ "\"}]} " I am sending this to you from ruby on r...
asked by 17.05.2018 / 17:53
1
answer

Date format in rails

I currently have this format for my date %B %d, %Y which returns martes mayo 15, 2018 but I would like to modify it so that I will return this format Tuesday, August 26 and that in turn will work with i18n. I currently have this...
asked by 16.05.2018 / 19:27
1
answer

Rails 5.1.2 problem with AJAX

I want to implement ajax to create a post, without having to reload the page and that does not go to the show as usual rails, I'm doing it following a tutorial but it does not work. in the _form.html.haml you can see that you add the remote:...
asked by 21.07.2017 / 21:18
1
answer

I do not recharge the page ruby on rails

Hi, I want that when the boolean changes to true and I save it again and I recharge the page, but it turns out that I do not reload it, thanks for the help. auto is boolean MeetingsController def auto1 r = Reunion.find(params[:id]) r.au...
asked by 06.10.2017 / 05:08
2
answers

Unpermitted parameters

Good day, my problem arises since I am trying to get a hash array inside another hash array, when doing this I get the message:    Unpermitted parameters: id, amount_ads in the definition of the parameters I have the following: def...
asked by 30.05.2017 / 20:20
1
answer

How to use jquery-turboLinks?

Currently I have a problem since jquery is not working correctly in my ruby on rails project and when I researched I realized that the document.ready does not work well in that framework, so I decided to download the patch that would be jquer...
asked by 01.06.2017 / 03:21
2
answers

How to create a hash of an html table

Good morning, my doubt arises on an html table in which I am storing the payroll payments of a company, however different models participate in this view, my question is mainly on how to send the tr and td generated in my table to the controller...
asked by 18.05.2017 / 23:28
1
answer

My Javascript function is not activated

Well, my problem is that I want to activate an action on a label, but it marks me an error and I do not know because if everything is as it should work. Label <a onclick="can();">Cancelar</a> Function of .js <script typ...
asked by 23.12.2016 / 21:16
1
answer

How to change a column in my database with Ruby on Rails?

Accidentally working with rails wrong name a column of my payments table since I wanted to call it Incoming and I finished it calling ntrantes. My question is: How can I change the name of the column with the migrations? Or does it have to be...
asked by 25.11.2016 / 07:12