Questions tagged as 'ruby-on-rails'

1
answer

Use custom css (rails and windows)

Good afternoon, I'm new to rails and I'm trying to put the frontend I have here from another site into the project. HTML, css and javascript are all ready. So I managed a controller named Public with all the views (frontend, home, contact, et...
asked by 10.02.2017 / 19:04
1
answer

What is the correct way to implement filters in Rails?

Good morning! Currently, I have an application with a simple CRUD, and I'm creating a new view to display the records. In that view, I'm including some filters that are parameterized links to be sent to the controller and filter the list with...
asked by 26.01.2017 / 14:19
1
answer

Use existing data in the database for authentication

I have a database with already existing data, with name, CPF, RG and other personal data. I need to implement a login system, but I wanted the user to be in the case the registration number and the password the CPF, for example. In the login sta...
asked by 20.12.2016 / 16:23
2
answers

How to send form_tag variables to javascript function? Rails

I'm new to web programming and rails and I have the following question: I have a view that displays a list of foods and a field to fill with the amount of grams I want from each food. I would like to display a text_field_tag for each e...
asked by 27.11.2016 / 06:23
1
answer

Assign ID at creation time

Well, I'm starting with Rails and I'm left with a question. I need to assign the ID of a "parent" when creating your "children". For example, A Blog has_many Posts. The moment you click the create blog post button the Blog ID must be passe...
asked by 26.11.2016 / 05:30
2
answers

Rename column with Rails using migration

I created a migration to rename a column and I only get the error;    undefined method 'to_sym' for nil: NilClass == 20161001182840 RenameColumnPasswordInUsersPasswordToPasswordDigest: migrating -- rename_...
asked by 01.10.2016 / 20:33
0
answers

Authentication using Token With Devise Rails

Personal needs help to implement token authentication , I have already created the models, the application is working correctly, now I need to improve security. The client will send me a registration and a password, it will come in JSON ,...
asked by 06.09.2016 / 14:28
0
answers

rqrcode_png rails controller - Passing by parameter the string contained in the bank

How do I pass the value that is in the field "codigo" of table "mesas" to the space below "VALOR_STRING_BANCO" ? How do I pass the value that is in the "codigo" field of the "mesas" table to the space below "...
asked by 21.09.2016 / 04:45
0
answers

Capistrano always overrides config / routes.rb to the default rails code

Good morning guys! I have the following problem: Whenever I run cap production deploy , Capistrano overwrites routes.rb with the default rails code. Rails.application.routes.draw do # For details on the DSL available within this f...
asked by 29.08.2016 / 13:19
0
answers

New fields added after scaffold do not persist in bank even while being strong params

I have a problem here that I have not resolved for 3 days. Very strange. It is in editing a record. It is only updating the first record and not the 2nd onwards. The curious thing is that this only happens with the field quatidade_dev (added aft...
asked by 22.09.2016 / 00:50