Posts by mluiz • 28 points
7 posts
-
0
votes1
answer37
views -
0
votes1
answer276
viewsA: Ruby on Rails: Percentage of Total does not work
You can’t exactly understand your logic for example your if and Else are doing the same thing. This servivor.all servivor is a model model? If it is a model I believe that the best way would be to…
-
0
votes1
answer49
viewsQ: Rails 4 - Has_many problems
I need help displaying in the view the value in the view of a relationship with has_many. I have my product model: class Product < ActiveRecord::Base paginates_per 15 has_many :product_images,…
-
0
votes1
answer49
viewsA: Problem with validates in Rails 4
I discovered my problem, actually the form by the browser was validating only that when it gave error to save in my controller I was doing a "render :Plain" to return the error message, so this way…
-
0
votes1
answer49
viewsQ: Problem with validates in Rails 4
I have a situation I can’t understand what’s wrong. I have a validation in the model that the console works correctly, but when running through the browser the form does Submit and ignores the…
-
0
votes1
answer37
viewsQ: Rails 4.2.6 error authenticate method
I am trying to use the authenticate method and the Rails returns Nomethoderror: Undefined method `authenticate' for #. My controller: class Sessionscontroller < Applicationcontroller #include…
-
1
votes4
answers594
viewsA: Return value in SQL Server query
Dude I don’t know if the name of the field works on where the way you’re doing, but try to put the WHEN shortly after the case. TIPOUSUARIO = case when TIPOUSUARIO = 'A' THEN '2' END.…