Questions tagged as 'ruby-on-rails'

1
answer

Callbacks before_save does not work for me ruby on rails

hello the error is that I'm not saving the id as a string in the variable    fullnumid I just want to be saved when they are created, thanks after_create :guardar def guardar self.fullnumid = self.id.to_s end     
asked by 13.10.2017 / 04:52
0
answers

two forms do not update me, ruby on rails

I have a problem I have two forms in the first one saves some fields and then in the second it saves others when I'm going to update the id I get an error. the second form the field is: attention.  thanks def update respon...
asked by 02.10.2017 / 17:33
0
answers

Validate two models in the same view in RoR

I have the model driver name age sex type_license and the model vehicle mark model anno type each model has its controller and its views, both comply with the CRUD (Create, Read, Update and Delete). B...
asked by 24.09.2017 / 00:27
1
answer

Avoid process using before_action

I am developing the user permissions and I am trying to use a before_action to evaluate a conditional, if it returns false I want the "create" action not to execute, but if it returns true the record will be created this would be my before_ac...
asked by 25.09.2017 / 18:21
0
answers

Error in my modal

good morning The error is when loading the window takes a long time to load and when it loads, loads many at once. _show.html.erb <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" ar...
asked by 12.09.2017 / 17:07
2
answers

I can not update the Ruby on Rails version

I want to update the ruby on rails version. I'm using ubuntu and when I run: rails -v Rails 4.2.7.1 It tells me that I have version 4.2.7.1 installed. To update the command I want to use: sudo gem install rails -v 5.1.4 Successfully in...
asked by 12.09.2017 / 21:17
1
answer

conflict of routes?

I am making an ajax request: Ajax petition. function ver_detalles_team() { $(".card").hover(function () { let team_id = parseInt($(this).find("span:first-child").html()); var carta = this; console.log("entro al evento hover")...
asked by 11.09.2017 / 17:24
0
answers

Problem to save a Form_tag with remote true

Good morning, I have a problem saving my form_tag data, I think it may be a syntax error or ignorance since I'm new to Rails and web development, my problem is that I'm using my form_tag as follows : ' <%= form_tag(controller: "payrolls", ac...
asked by 08.09.2017 / 16:36
1
answer

Error installing Ruby on Rails

This is the 5 time I try to install Ruby on Rails, but it always gives me errors like Gem required, or when installing them when they are not telling me that the gems are corrupted. It also tells me to run the ridk install command but when a dow...
asked by 11.09.2017 / 18:53
2
answers

Variable params [: action] on model in RoR

I'm trying to work with the variable action in a model in rails, but it generates this error: Any ideas ??? in advance, thanks !!! Deputy controller class MensajesController < ApplicationController before_action :set_mensaje,...
asked by 07.09.2017 / 04:44