Questions tagged as 'ruby-on-rails'

1
answer

Customize input of type time simple_form

I need you to have this range: 8:00 AM - 8:00 PM = f.input :start , :ampm => true, :minute_step => 60, :prompt => { :Hora => "Hour", :minutos => false }, :required => false     
asked by 17.09.2016 / 03:12
1
answer

Rails - Joinear tables of a model

Good morning, I have the following query that does not work for me: def self.search(profesor) ->pasa como parametro el nombre del profesor Curso.joins(:user).where("LOWER(users.name) LIKE ?", "%#{profesor}%") end I have a course...
asked by 08.09.2016 / 19:17
1
answer

How to use the Number_Field in Ruby?

I have a problem with this type of field that is inside my form and it is that when trying to save that value inside my bd, I automatically assign a zero to this field, so it does not register the value that I want . This is the code of my fo...
asked by 03.08.2016 / 04:27
1
answer

How to check if Ruby on rails has caching activated?

I'm doing a procedure to store the cache in a query to the database in rails, but when I try to test the functionality in the console it does not work for me. It does not save the record in the cache. I'm using Rails 5.2.2 ruby 2.5.1p57...
asked by 04.01.2019 / 19:38
0
answers

Show project in ruby on rails in windows 10

My problem is that no project appears that I believe in rails in the projects folder I have in windows 10. I have the following in the box: vagrant@vagrant-ubuntu-trusty-64:~$ ls projects proyecto rails In the vagrantfile I have this: c...
asked by 28.12.2018 / 02:09
0
answers

Adding multiple and selectable answers to a question in Ruby On Rails

Currently I have a survey in which I can perform short, long and numerical answers, however I have certain doubts when implementing multiple selectable answers, that is, the user instead of writing in a field will select a response within from a...
asked by 18.12.2018 / 20:42
0
answers

Print in a pdf data of a select

I have a scaffold table where I enter clients, I have a select where my option I consult them with an each do, I select it and I print it with a javascript, I want that data to be the only ones that are leaked to my pdf as a header. Inquiry...
asked by 18.12.2018 / 20:20
0
answers

how to add dynamic fields using ruby on rails and stimulus js?

I'm wanting to make a nested form in rails, with fronted in stimulus js. In the case a Provider can have many contacts, then in the Supplier form I must add a button that allows adding inputs to load Contacts as many times as I want. _form.ht...
asked by 27.12.2018 / 00:32
1
answer

Problem to show all json objects related to a model by its id in RoR

I have a show method that must render objects json of three models that are related to each other by their id . The models are the following: class Company < ApplicationRecord has_many :areas end class Area <...
asked by 16.12.2018 / 18:20
0
answers

Rails, What is the best way to show the images in the view before uploading it to the bd, with carrierwave?

I have been creating a view in the form, which has images, but I can not find the way to show the previous images that I am selecting to leave or remove them before uploading them to the bd, either to create or to edit. I enclose my form and I a...
asked by 08.12.2018 / 22:38