"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
Consider introducing the notion of "last_updated_at" to your client side In your controller: def index # Lets pretend the earliest you're interested in is 1 day ago updated_since = params:last_updated_at. Try(:to_time) || 1.day. Ago # For ease, i'm doing the query here; this query may be more appropriate as a scope in the model @steps = Steps.
Where("updated_at >? ", updated_since) end In your index.js. Erb view: % @steps.
Each do |step| %> var step_html = ''log_details', :locals=>{:step=>step}) %>'; var step_ele = $('#step-')0; if (step_ele) { // Step was already in the page; just replace it step_ele. Html(step_html); } else { // Step isn't on the page yet; append it to its container $('#step-container'). Append(step_html); } window.
Last_updated_at = ".
Consider introducing the notion of "last_updated_at" to your client side. In your controller: def index # Lets pretend the earliest you're interested in is 1 day ago updated_since = params:last_updated_at. Try(:to_time) || 1.day.
Ago # For ease, i'm doing the query here; this query may be more appropriate as a scope in the model @steps = Steps. Where("updated_at >? ", updated_since) end In your index.js.
Erb view: var step_html = ''log_details', :locals=>{:step=>step}) %>'; var step_ele = $('#step-')0; if (step_ele) { // Step was already in the page; just replace it step_ele. Html(step_html); } else { // Step isn't on the page yet; append it to its container $('#step-container'). Append(step_html); } window.
Last_updated_at = ""; Do this for your Request and Attempts models as well. In your updating code, append the last_updated_at query string to to the updating url, so it is something like 'http://stats.example.com/index.js?last_updated_at=' + window. Last_updated_at.
Aside: beware of naming your model Request; there is already a Request class in rails, and you may run into conflicts.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.