search for: update_counters

Displaying 6 results from an estimated 6 matches for "update_counters".

2006 Jan 13
1
Rendering an RJS template within another RJS template
Is there a way to render an RJS template within another? I''ve put my simplified code below. No errors are generated, but the partial isn''t rendered. I also tried using render :action => ''update_actions'' destroy.rjs--- page.visual_effect :fade, comment_container(@object.id.to_s) # update the number of comments(below is another rjs template) render :partial
2013 Jan 20
20
ActiveRecord::Persistence.increment! requires a row lock to ensure isolated updates
The method is here: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/persistence.rb#L288. The method takes the in-memory attribute value and increments it by the specified amount. A safer approach (from an isolation standpoint) would be to let the database determine the value. Instead of telling the database what value to persist in the database, the SQL can written
2011 Apr 20
4
files not moved immediately to final destination from temp location after rsync returns with success
Hi, I am using rsync version 3.0.7 on an arm linux based embedded device. The device pulls data periodically from a rsync server and stores the files on an SD card. The partial, temp and final rsync destinations all reside on the SD card. I came across an issue where it seems that the rsync call returned with a success but the files that it pulled are not moved immediately to its final
2006 May 22
3
STI, HABTM & counter_cache
Hello world... I have an interesting issue that the online docs aren''t helping me with. In my app I have 4 models Item < ActiveRecord Deal < Item Product < Item Category < ActiveRecord Item has_and_belongs_to_many :categories... On each category record I''d like to maintain a product_count and deal_count to increase performance. This doesn''t appear
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
...onnection_adapters/abstract/database_statements.rb:49:in `update_without_query_dirty'' ./test/../lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `update'' ./test/../lib/active_record/base.rb:685:in `update_all'' ./test/../lib/active_record/base.rb:771:in `update_counters_without_lock'' ./test/../lib/active_record/locking/optimistic.rb:139:in `update_counters'' ./test/../lib/active_record/base.rb:790:in `increment_counter'' ./test/../lib/active_record/callbacks.rb:309:in `callback'' ./test/../lib/active_record/callbacks.rb:309:in `cal...
2009 May 09
41
updating the db 6000 times will take few minutes ?
i am writing a test program for ActiveRecord, and it reads a document which is like 6000 words long. And then i just tally up the words by recordWord = Word.find_by_s(word); if (recordWord.nil?) recordWord = Word.new recordWord.s = word end if recordWord.count.nil? recordWord.count = 1 else recordWord.count += 1 end recordWord.save and so this