Displaying 20 results from an estimated 8000 matches similar to: "update_all not changing updated_at"
2006 Jun 01
2
update_all broken in postgres?
Hi
has anyone managed to use update_all with rails on postgres?
In my setup, it does not work:
>> @keyword.update_all(myupdates)
NoMethodError: undefined method `update_all'' for #<Keyword:0xb7ac4670>
from
/home/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1786:in
`method_missing''
from (irb):14
I checked that the base.rb
2006 Jul 06
4
update_all Not Incrementing lock_version
Shouldn''t update_all be updating lock_version? As you can see from my
console session below, it is upating the record (changed running
attribute to true and returned 1 to show 1 recored was updated). But it
did not increment lock_version. And optimistic locking is working
correctly otherwise. As you can see below, lock version = 562 before
and after the update_all call but it is
2008 Feb 12
4
Syntax of session's updated_at field ?
What''s the syntax to acquire the updated_at value of a session stored
in a db?
session.updated_at doesn''t work. can''t find any docs on this.
-- gw
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2007 Oct 12
2
missing attribute: reorder
I am trying to use an integer object as a flag item for displaying a
link on a page called reorder that is a column in my PlanProcedures
table.
I''m getting an error that says
The Header is NoMethodError in Manage_plan_procedures#list
missing attribute: reorder
Here is what my model looks like:
>> PlanProcedure.column_names
=> ["id", "plan_id",
2007 Sep 07
6
ActiveRecord::Base#update_all expected behaviour
Hi
I noticed that if in my code I use the following:
Photo.update_all("title = ''Ruby rocks'' ", "id IN (#{@photo_ids})")
All my objects are properly updated but none of the filters/callbacks
are triggered. Is that what''s expected?
I have a before_update filter set on the Photo class and it gets
totally ignored, I guess the only way to solve this
2009 Jun 07
17
ActiveRecord Classes
I''m having a little trouble with understanding how to work out the
schematic for some of my classes using ActiveRecord when a file is in my
lib directory:
Brief example:
Here''s the outline of the files in use:
....app
........controllers
............application_controller.rb
............rushing_offenses_controller.rb
........models
............rushing_offense.rb
....lib
2011 Aug 14
5
Puzzled with form on multiple table rows
I''ve got a table of events, and each event has a boolean attribute
is_ten_event.
On each row of the table is a chekbox to edit the value of is_ten_event,
so that multiple rows can be edited with one submit.
In order to allow boxes to be un-checked as well, the logic in the
controller works like this
get array of events from checkboxes that are ticked.
make all events.is_ten_event =
2010 Jul 14
1
ActiveRecord::Observer, update_all and has_many
Hi,
I''m using an ActiveRecord::Observer to log users changing data in my
application. However, I''ve noted that adding an item to a has_many
relationship gets logged, but removing the item does not. That is:
@product.users << user
is logged, but:
@product.users.delete(user)
is not.
I''ve dug into ActiveRecord and found that the underlying issue is that
the
2007 Jul 12
0
update_all for an AR instance
Is there anyway to call "update_attributes" where it updates only the
attributes you specify with the update command.
The only thing close to this is update_all where you have to specify the
condition. So essentially you''d be stuck doing "id=#{obj.id}" as the
condition.
Are there any built in AR functions that allow you to update a
particular object using straight
2008 Jan 23
3
Slow header fetching rate over nfs mailspool.
We are setting up a Dovecot over a pair of NFS which mirrored with DRBD
+Heartbeat,
under Debian Etch AMD64 with Kernel 2.6.22-5.
The problem was slow header downloading rate. We had tried to use
postal to inject 500 emails which are under 5KB each,
but when ever we start up Mail.app, Thunderbird or even OE6, the
header download rate is terrible slow.
Its look like a few sec for just 1
2009 Aug 24
5
extract keywords from string
hi -
i have strings that i need to extract keywords from. the string might
have html tags, urls, etc. i need to extract the keywords from the
string. i imagine i''m not the first guy to have to tackle this
problem. is there a gem i can use or anyone have any ideas how to
approach this?
thanks,
dino
2005 Nov 30
0
Passing variables with update_all
I''d like to produce an SQL update along the lines of:
UPDATE companies SET category2={newcategory} WHERE (category2 =
{oldcategory})
At the moment I''ve got:
ctype = params[:ctype]
Company.update_all("category2=ctype", "category2=ctype")
At present this returns a StatementInvalid:
Unknown column ''ctype'' in ''where clause'':
2010 Jul 20
4
MySQL index question
I am trying to speed up some DB operations and perhaps have gone overboard
with indexes. Does MySQL usually use only one index per query and simply
match keys on the results of the indexed first part? For example:
DELETE FROM tokens WHERE 6813946236211560448 <= fnv AND fnv < 6818449835838930944 AND updated_at<''2010-06-20 14:08:55'' AND occurrences=0;
If I understand
2013 Apr 16
1
SSHA512 auth not working
I'm trying to configure SSHA512 passwords and when testing discovered
that they were not working as expected.
At first i was using Centos 6.4 which doesn't have the glibc CRYPT
newest functions ($6$salt$pass) so had to rollback to the Dovecot format
({SSHA512.HEX}saltedpassword+salt ) but I'm unable to let dovecot
authenticate properly.
Some logs and details:
Apr 16 02:55:37
2010 Jan 06
4
serialized attribute converting to string on reload
Hello,
Anybody help me out? I done googled it good and didn''t find anything
(which should mean that I''ve done something wrong).
Not much code to talk about here, quite simply I have an attribute
that is serialzied and when I update it, irb shows the object and my
methods run on it as it were indeed so. Though when I reload it
changes the data to a string. Not yaml, just one
2004 Nov 09
4
[PATCH] [TRY2] Use nfmark as a key in u32 classifier
Hello!
This is the try number two.
What was changed:
- Added selectable choice in Kconfig file (thanks Jamal!)
- Don''t abuse tc_u32_sel to not break backward compatibility (thanks
Patrick!).
Stephen, do you have any comments on iproute2 part? I know it''s not
perfect but this is the best way, I think. "u32 match mark vvvv mmmm" it''s
intuitive but breaks a
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
2006 Jan 23
4
ActionRecord: how to update many records in one statement
Hello,
I am trying to edit and update all records of table ?intersts? (id,
name, description) on one page and has no good idea how to do it right,
when updating one record per page it?s ok The question is: what
statement instead Interest.update_all(params[:interest]) in controller
need to use to successfully update the database table by data passing to
controller in parameter ?interest??
2004 Nov 05
3
[PATCH] Use nfmark as a key for u32 classifier
Hello!
I am glad to announce a patch for u32 to allow matches on nfmark.
The patch is non intrusive (few lines).
Why I did this? Because fw classifier cannot be used together with u32.
For example, now, you cannot match a mark of 0x90 and a destination
port of 80. I know you can do it with iptables to do the marking, but if
you use Jamal actions to apply mark to policed packets, you need
2013 Sep 11
1
when does 'updated_at' column get updated?
Using centos 6 with puppet-2.6.17 with thin_storeconfigs with mysql and
nagios exported resources. Every time an agent connects to the master, the
updated_at column in the hosts table is updated. However, the updated_at
column in the other tables is not updated even when I alter a nagios
resource attribute like retry_check_interval. What are the conditions by
which the updated_at column is