Questions tagged as 'ruby'

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

How to remove vowels from a string in Ruby?

I have the following array: nombres = ["Violeta", "Andino", "Clemente", "Javiera", "Paula", "Pia", "Ray"] a = nombres.map And I would like to create another one and store it in the variable by removing all the vowels from the names. Usin...
asked by 04.05.2018 / 21:08
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
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
1
answer

Problem when rendering pdfs in rails 4 in development mode

use the library wicked_pdf the problem is in the call to the styles, I am new in rails attached an image this is my layout <html> <head> <meta charset="utf-8" /> <%= wicked_pdf_stylesheet_link_tag 'application', me...
asked by 24.09.2016 / 01:51
2
answers

How to read 2-dimensional arrays in Ruby?

I am learning to program in ruby, I already knew how to program in c ++ and with the use of cin there is no problem but in ruby I have noticed that the ruby gets read a complete line so that if I enter: 1 2 3 4 5 6 7 8 I can not read wh...
asked by 18.05.2016 / 14:12
1
answer

How do I update the key and value of a Ruby hash?

It turns out that I have a hash : inventario = {"Notebooks"=> 4, "PC Escritorio"=> 6, "Routers"=> 10, "Impresoras"=> 6} I need to update the information regarding any product, and that the inventory is updated. I tried with...
asked by 09.05.2018 / 15:25