Questions tagged as 'ruby-on-rails'

2
answers

How can I access already modified table data?

I am developing software for a Home Care business. The software is being created exclusively for a particular client so it works according to her head. Do not be surprised at how it works. This company has its patients, who pay a fixed monthl...
asked by 13.09.2017 / 04:00
3
answers

Views specific to Devise

In my project I'm using Rails 5.1.1 and Devise to login. My question is how can I make a View, so that Devise uses it as a layout, other than application.html.erb ?     
asked by 26.06.2017 / 21:25
2
answers

Filter select fields using the value of other selects with Ruby on Rails

Good afternoon, I have a problem to solve here in my application. The problem is to filter the HTML "Solution" select field, based on the values of the other selects fields above it. The image shows an example of these fields. Currently,theappl...
asked by 07.08.2017 / 17:43
1
answer

In the ActiveRecord is it mandatory to use belongs_to?

Is it mandatory that, for an association between two models, I have belongs_to and has_one ? Or is it possible to only use has_one/has_many between the two models, when not necessarily none of the models belong to any other?...
asked by 07.08.2017 / 04:43
1
answer

Problem with the Ruby on Rails web server

I type the rails server command it gives this error here; Why did not he know the web server?     
asked by 21.05.2017 / 17:17
1
answer

Column-specific selection in an HTML table in JS

Hello! I'm an IT student and I'm learning about Rails. I have the following HTML table of a view: <p id="notice"><%= notice %></p> <h1>Produtos</h1> <table class="table table-hover custom" id="tabelaProduto"&...
asked by 29.05.2017 / 21:21
1
answer

How to add globally allowed parameters in Rails?

In several resources I use address, I decided to allocate logic in concerns. One need is to add the allowed parameters to the address, see below the concern that should add permission to address_attributes : module AddressationConcern...
asked by 05.01.2017 / 19:54
2
answers

How to compare hashes coming from JSON in RAILS

Personal I created a web service that today receives a registry and a password, it makes a select in the bank and compares to see if the registry and password are equal, if yes it shows a few options.At that moment the password is being sent in...
asked by 31.08.2016 / 15:48
1
answer

Ruby on Rails Routing

I'm having trouble setting the home page as root in my application. In the file config/routes.rb I have already made several attempts like: root :to => 'static_pages#home' and root 'static_pages#home' But none works, I'm...
asked by 14.04.2016 / 20:10
1
answer

Register two separate models in one

Today I come with another question, but about code. Next, I am making a system to register students and courses and a screen to register classes where part of the register is to select students and courses to register the class. I did the follow...
asked by 25.04.2016 / 01:14