Posts by Pedro Augusto • 21 points
3 posts
-
0
votes1
answer60
viewsA: Click and Toggle with jquery, 1 click delay
The problem that the toggle is "hiding" its div at the first click because it is visible. Use toggle can cause an unwanted state. Try using show() or fadein() in place of toggle. It makes no sense…
-
1
votes1
answer188
viewsA: Defining a tree structure in ruby on Rails
Supposing that the table us has a key for the parent (pai_id), define relationships as follows: class No < ApplicationRecord belongs_to :pai, class_name: "No" has_many :filhos, class_name: "No",…
-
1
votes1
answer138
viewsA: How to avoid large SELECT memory stocking in Rails?
I believe you need the method find_in_batches. It breaks your query into queries with shorter record intervals. This way you don’t overload your memory with Rails trying to map all the lines in…