The application contains a module called Dispute , this module contains Procedures , each Procedure contains a user and belongs to a dispute.
As described below, belongs_to is not displayed and the :user attribute i...
I'm displaying a collection of random objects in my action index. However, the objects are displayed one at a time. So:
@objects = Object.order("RANDOM()").limit(1)
In the view index, I can send a comment to this object, but when I submit t...
I have a legacy Firebird 2.5 database. Access it via IBExpert 2016.9.4.1 This database is part of a request management system that is being migrated from a Delphi 10.1 Update 2 application to a Ruby(2.3.3) on Rails(4.2.7....
I have an object user generated by FactoryGirl like the one below:
FactoryGirl.define do
factory :user do
name { FFaker::NameBR.name }
image { FFaker::Avatar.image }
email { FFaker::Internet.email }
pa...
I'm having trouble for instance the Report model.
Console:
LoadError (Unable to autoload constant Report_questao, expected app/models/report.rb to define it):
app/controllers/pessoas_controller.rb:49:in 'reportar'
controller:
require...
I want to get the value of this select_tag and put it in the link_to message
<%= select_tag(:testee, options_for_select(CloneDatabaseController.find_all_models)) %>
<%= link_to('Click here', controller: 'clone_database', action: 'sho...
I have a button to submit a form
<div class="actions">
<%= f.submit, html: {class: "button"}%>
</div>
But none of the HTML attributes ( class and id ) work, they only give me an error on the page. Does an...
I have a situation that I can not understand what is wrong.
I have a validation in the model that by the console it works correctly, but when running by the browser the form does the submit and ignores the validation.
My Model:
class User <...
I have a dynamic select of states and cities
and my idea is to list the state capital first selected.
I have the following code to list the cities but that is not listing the capital first:
@cidades = Cidade.where("estado_id = ?", Estado.fi...