search for: view_count

Displaying 4 results from an estimated 4 matches for "view_count".

2006 Jul 11
8
Stop updated_at from auto updating?
Hi Is there any way to temporarily stop the updated_at field from being updated when a record is modified with ActiveRecord? I have a date field which is keeping track of when the record data was last checked by my application and my app manually updates it, of course when I do this the updated_at field is also touched making it fairly useless for finding out when the actual data was changed
2013 Jan 20
20
ActiveRecord::Persistence.increment! requires a row lock to ensure isolated updates
...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 (at least for postgres) so that the database will atomically increment a value: UPDATE "posts" SET view_count = view_count + 1 WHERE id=123; Currently, rails generates the following SQL: UPDATE "posts" SET "view_count" = 3, "updated_at" = ''2013-01-20 23:20:24.154852'' WHERE "posts"."id" = 123 It would be great to see a method like this...
2010 Mar 17
3
ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded
Hi all, Ive been getting this error on one particular query repeatedly for the past few days. ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: UPDATE `posts` SET `updated_at` = ''2010-03-17 05:35:00'', `view_count` = 54 WHERE `id` = 158 Googling around, I found that this is basically because the transaction times out after waiting for the time period thats defined in the InnoDB settings. I also found that acts_as_ferret could cause this while it locks down the row in question for indexing purposes. However,...
2011 Aug 20
0
undefined method `comment_count' for YouTubeG
`eval'': undefined method `comment_count'' for #<YouTubeG::Model::Video:0xcdd2668> (NoMethodError) http://youtube-g.rubyforge.org/ in response object i checked i am not getting comment_count I am also using view_count and it is coming in response. previously i was getting comment_count but now getting error. i am using Rails 3 and Ruby 1.9.2 gem version youtube (0.8.6) youtube-g (0.5.0) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups &q...