Questions tagged as 'ruby-on-rails'

1
answer

Pass objects collection via link_to

Good morning, how could a collection of objects pass through link_to between views in rails? <%= link_to '<i class="fa fa-arrow-right" aria-hidden="true"></i>'.html_safe, family_group_path(obj), data: {modal: true} %>     
asked by 20.03.2017 / 14:07
1
answer

Select options in ruby

I would like to know how I can manually enter the options of a select, I have been using the following: <%= f.collection_select :establecimiento_id, Establecimiento.order(:nombre), :id, :nombre, include_blank: true %> but tha...
asked by 09.02.2017 / 15:02
3
answers

Migrations are pending

First I put rails server in the console and when I put in the local browser Host: 3000 I get this message, how can I solve it?     
asked by 02.04.2017 / 03:00
2
answers

Error executing gem install rails

trying to install rails, after having installed ruby and rubygems, I try to execute the following command: sudo gem install rails which gives me the following error: checking for gzdopen() in -lz... no zlib is missing; necessary for build...
asked by 01.02.2017 / 21:41
1
answer

connect other users to the database?

with my group we are working rather learning to work with rails and postgresql, the project was uploaded to github, they downloaded it but when starting the server (rails s) it appears that they do not have user permission in the database ....
asked by 08.12.2016 / 17:13
1
answer

relations of various models in rails

Good morning, I have 3 models "Empleado", "grupo_familar" and "documentos_familiares". Employee has a one_to-many relationship with grupo_familar and grupo_familiar a one_to_many relationship with family_files. When wanting to collect employee d...
asked by 15.11.2016 / 15:47
1
answer

Create login to each model

I'm new to rails. The doubt is the next one. I have three models, client, vendor and users generated with devise. How can I assign a login to each vendor and client when creating a new one?     
asked by 01.11.2016 / 21:13
2
answers

Prevent the data from being updated if there is no stock of products

I work with two models, Buy and the other Bidon , from the Shopping form I am selecting the drums that I have available in the stock, let's say a quantity of 100 drums, after that, I enter a new quantity with the drums that I will need, say...
asked by 04.01.2017 / 06:17
2
answers

How can I view the records of a database in Heroku?

After doing deploy to my application, how can I see the records of the BD% tables postgresql in Heroku ?     
asked by 17.01.2017 / 20:22
1
answer

Error in bundle install ROR

I'm working on Windows 7, but trying to create a new project today gives me problems. From what I understand is with the SSL certificate. While there is documentation of the error, I have not been able to correct it. I leave the error that retu...
asked by 10.10.2016 / 02:21