[Rails] How to implement fragment caching with rails ajax call?

2014-12-01 Thread Logesh m
I have a view where I have multiple things to load and I make an ajax call from the index view to add the content on success of each call and I would like to cache each of it so as to make the performance better. *index.html.erb* $.ajax({ type : "GET", url : 'sample1',

[Rails] Re: How to find the count of the associated models with less number of queries being executed?

2014-11-06 Thread Logesh m
UTC+5:30, Alvaro Naveda wrote: > > The best solution i know to solve this issue with less number of queries > is the *counter_cache* ;) > > http://guides.rubyonrails.org/association_basics.html#counter-cache > > El jueves, 6 de noviembre de 2014 07:40:42 UTC+1, Logesh m escri

[Rails] How to find the count of the associated models with less number of queries being executed?

2014-11-05 Thread Logesh m
I have a rails app where I need to take count of the associated model like post.comments.count and this loads up number of queries and I was searching for option to reduce this and found counter cache which saves the count in the table but is there any other option to find the count without savi

[Rails] Regarding fetching the polygon data from google map and save in postgis

2014-07-18 Thread Logesh m
I have a requirement where I would need to create a geo fence and for that I have used the google map and the drawing tools and I could create a polygon using the drawing tool but I am not sure on how to save the data in postgis and I saw about rgeo but I was not clear on how to use that. So