Posts by Henrique Cardoso • 198 points
14 posts
-
2
votes3
answers402
viewsA: Sending email via a notification button
Come on. I will try to be as soon as possible. First you did not specify whether the user who will ask for the book is logged in or not. I’ll assume he is, but if he wasn’t, you’d have to pass some…
-
3
votes1
answer1879
viewsA: Hybrid Apps: when to use and what is needed?
Let’s go for every question: 1) Is the code reusable or is it unique to systems like Android and IOS? When should I use this type of framework? Much of the code may be reused for all platforms, but…
-
1
votes1
answer58
viewsA: How to add more lines to a Ruby class?
There are some really cool examples of how to do this, of which I would highlight one of the answers:…
-
0
votes1
answer68
viewsA: Error editing user register with nested_form
as I recall, Devise asks to confirm the password whenever the user is changed. The Vise wiki has a section talking about this.…
-
0
votes1
answer211
viewsA: validation of a field from another table in a specific model
firstly I suggest that you create a method to check if you are an internal user (so I just wanted to check if you are associated with a user), for example: def usuario_interno? user # Ou qualquer…
ruby-on-railsanswered Henrique Cardoso 198 -
0
votes1
answer191
viewsA: Add multiple phones to a telephone_field in Rails
A suggestion that wouldn’t affect much of what already exists would be to serialize these fields. postgress for example allows you to store an array in it, and Rails has functions to serialize that…
ruby-on-railsanswered Henrique Cardoso 198 -
2
votes1
answer70
viewsQ: Rails Generator for nested Resources
was researching but did not find any Generator to nested Resources in Rails. Would anyone know me if you know any?
ruby-on-railsasked Henrique Cardoso 198 -
1
votes3
answers262
viewsA: How to instantiate a model and get its features by its name in Ruby on Rails
There is no abstract class in Ruby, and I believe you will not have won in implementing this. What I suggest to you is to implement only one model if Clientemployee and Admin are similar, and…
-
0
votes1
answer60
viewsA: How to create a new associated template in Rails
From what I saw I guess you didn’t instate the object in fields_for. I suggest you read the method documentation: http://apidock.com/rails/ActionView/Helpers/FormHelper/fields_for It explains what…
-
0
votes2
answers511
viewsA: How to prevent Heroku’s / Dyno server from hibernating or sleeping?
If you are using Newrelic, have how you set it to ping the server from time to time...
-
0
votes1
answer53
viewsA: How to use text_field via ajax
I think you have to pass the JS code to String for it to run, or a javascript function call that you have implemented.
-
0
votes2
answers268
viewsA: Error 500 when accessing page Edit, ruby 1.9.2, Rails 3.2.13
It will not be possible to help you without knowing exactly what the error in the code is. It looks like you are running the server in production mode not to show the debug on the page. I suggest…
ruby-on-railsanswered Henrique Cardoso 198 -
0
votes2
answers496
viewsA: Form to change variable for a calculation in the same view
Just complementing the answer about parameters. Just send the two variables as a parameter in the url (for example http://localhost:3000/parse/? prnt=9&depth=0.5) After that, you can access the…
-
1
votes2
answers469
viewsA: Inject results and pagination into an html
First I believe that it is not possible for you to enter the results without putting code PHP in exibir.html, since these results are dynamically retrieved from the database. Regarding paging, I…