This error happens when the user does not select the option of the select field.
The error up would be handled if it did not have the collect:
NoMethodError in Subdisciplinas#create
Showing _form.html.erb where line #18 raised:
undefined meth...
How do I create a method in Rails that queries the database in a given table and shows in View , and how do I call this method and where do I create it?
def somar
@value = Registro.sum('saldo')
end
How do I call this method in...
Implemented a chat that works 100% locally.
But when uploading the application to heroku, chat does not work.
So I followed this tutorial tutorial and when I access the chat page, I get the following message:
Sure you're not looking for /...
I'm trying to implement the Wisper as an alternative to the Observer Design Pattern that was deprecated from Ruby.
The error is: wrong number of arguments (given 1, expected 0)
The method I created is basically to execute a puts "A resta...
I modified the show.html.erb file, but the changes are not displayed on the system, I started to tinker with ruby in redmine, could it be cache or does it require some compilation in the modified file?
My question is that I have a system, in this system there is the access control of users with their appropriate permissions through their profile. I use it to access the system. What I need is to be able to edit devise views so that it acts with...
I have 4 tables with the following relationships:
Products have N Variations
Sizes have N Variations
Colors have N Variations
Variations belongs to Products, Sizes and Colors
The structure of the tables looks like this:
Variatio...
I created two models in the Rails application, and made their relationship through the declaration in the classes and in the database as well.
I added the configuration to activate the nested resources in the routes file, the routes were created...
I have two models. Office and Employee. Employee has office_id as foreign key. So which one is correct?
class Office < ActiveRecord::Base
has_many :employees, foreign_key: 'office_id'
end
class Employee < ActiveRecord::Base
belongs...