similar to: update_attribute, update_column and update_columns should update readonly attributes

Displaying 20 results from an estimated 8000 matches similar to: "update_attribute, update_column and update_columns should update readonly attributes"

2008 Apr 28
1
update_attribute overwrites existing attributes with NULL.
Hmm. When using update_attribute from within a worker method, it seems that Backgroundrb inserts null values into all attributes that are not explicitly set. Is this possible/true?
2011 Oct 12
2
update_attribute - effecting multiple attributes
Anybody know why this: User.find(current_user).update_attribute(:last_subject, params[:subject_id]) results in this: AREL (0.6ms) UPDATE "users" SET "last_subject" = 4, "encrypted_password" = ''f470e6e76203973146c3b07e8b31c976b19cb23a9bf37485ad1911687cdc7a29'', "updated_at" = ''2011-10-12 13:43:21.727558'' WHERE
2006 Jan 04
0
update_attribute works, update_attributes doesn''t, why?
Hello again... so I narrowed my problem down. For some reason, while using login_generator, any User object I pull from the DB can be updated one attribute at a time using update_attribute, but when I try and do update_attributes it fails every time. Is this a limitation with login_generator that I don''t know about, or is there a way around this? I also tried the .update method and
2008 Feb 10
4
method from string?
I am sure this is doable but I can''t find a specific example and my brain is frazzled. Basically, I am doing a whole load of in-place editing and need methods to support the updates. Here is what I am doing now: def set_blog_website faq = Faq.find(params[:id]) faq.blog_website = params[:value] faq.save! @faq = faq do_ret end Surely there is a generic way I can
2006 Jan 17
2
update_attribute and validations
Just in case it saves someone else the several hours of insanity I just went through, update_attributes will not save unless the model validations are satisfied, but update_attribute (the singular form) will save the attribute to the database even if the model validations would fail! This appears to be a feature, not a bug (http://api.rubyonrails.com/classes/ActiveRecord/Base.html) although
2006 Feb 27
4
update_attribute with Validation?
Does anyone know of a way to update individual attributes with validation? update_attribute disables the validation checks in the record model, so I''m wondering if there''s a workaround for this. In my application, I want to allow the user to update some or all the attributes without having to enter :password and :password_confirmation, both of which are subject to
2011 May 21
1
Consequences of overriding update_attribute to force validation?
I know the debate of whether this should validate has been rehashed many times. My question is, what are the consequences of overriding this method to force validation? Will this break fundamental things? Will it break plugins? Is there a reason not to have a strict validation option? In my code I will never use this as I consider it a terribly broken method, but some gems use it and in one case
2006 Apr 21
2
update_attribute... only ONE
Hi, I was reading the messages at <http://wrath.rubyonrails.org/pipermail/rails/2005-December/006969.html> http://wrath.rubyonrails.org/pipermail/rails/2005-December/006969.html, Subject: [Rails] update_attribute send updates every field, why? Well, I am having the same problem, and I do have a binary column where I am storing files. Also, I am calling a web service so I can send the
2008 Apr 19
1
update and update_attribute woes
i can not get update to work via controller/server. it works via console ??? this is what i get when i run it Club Load (0.005893) SELECT * FROM clubs WHERE (clubs."id" = 3) SQL (0.000570) BEGIN SQL (0.000454) COMMIT club.update_attributes(:state => "CA") or Club.update(3, :state => "CA") what am i overlooking?
2008 Aug 25
2
to catch exception from update_attribute
Hi begin ActiveRecord::Base.transaction do pb_status_history = ProblemStatusHistory.new pb_status_history.problem_id = @problem.id pb_status_history.problem_status_id = @problem.problem_status_id pb_status_history.save! ret_val=@problem.update_attribute("problem_status_id",''ab'') if ret_val==false
2007 Nov 21
3
update_attribute weirdness in edge
If I am changing a boolean value, no matter what approach I take, I get the same results: lets say table "users" has an "enabled" field that is boolean: user = User.find(1) user.enabled.toggle NoMethodError: undefined method `toggle'' for false:FalseClass user = User.find(1) toggle(user.enabled) NoMethodError: undefined method `toggle'' for
2009 Nov 27
2
update_attribute does not update
My server is running Rails 2.3.4...am I not doing this correctly or is something borked? >> c=Contact.last => #<Contact id: 24, name: "Larry", email: "larry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org", phone: 2147483647, account_id: 8, created_at: "2009-11-27 18:16:25", updated_at: "2009-11-27 18:40:08", hide_name: false, hide_phone: false,
2014 Sep 26
3
[LLVMdev] [lldb-dev] RFC: LLVM should require a working C++11 <thread>, <mutex>, and <atomic>
When LLVM's configure finds a usable <pthread.h>, it prefers to use that rather than the home-grown stuff. However if LLVM is configured with --disable-pthreads, both mingw flavors produce the same results. BTW, I've tried to quantify the slowdown: a quick test indicates that LLVM build that uses pthreads is about 10% slower than the one which doesn't. This is less that I
2014 Sep 26
2
[LLVMdev] [lldb-dev] RFC: LLVM should require a working C++11 <thread>, <mutex>, and <atomic>
Hi Yaron, Not sure I understand your question. Wasn't <mutex> one of the more important C++11 features that LLVM would like to use? On Thu, Sep 25, 2014 at 1:24 AM, Yaron Keren <yaron.keren at gmail.com> wrote: > Vadim, > > Thanks for the feedback on the -win32. A dependency on a small DLL with > BSD license does not sound too bad, but performance regression is
2004 May 11
2
recover should send messages to stderr, not stdout
Hi, recover() sends all its messages, which I consider to be error messages, to stdout. I think they more properly belong to stderr. This is an important difference for those of us who use R in batch mode to generate ASCII files. Thanks, Vadim [[alternative HTML version deleted]]
2004 Sep 24
1
algorithm reference for sample() - Knuth
Thank you for the reference to Knuth. Indeed in vol. 2 he has a > -----Original Message----- > From: Tony Plate [mailto:tplate@blackmesacapital.com] > Sent: Friday, September 24, 2004 8:05 AM > To: Vadim Ogranovich > Subject: Re: [Rd] algorithm reference for sample() > > Have you tried looking in Knuth's books on computer > algorithms? (They are classics for good
2005 Mar 22
1
documentation on seek *does not* need update
Well, "integer" is also a storage.mode in R. It is not immediately clear which meaning the help page uses. I guess some extra elaboration would be helpful. Anyway, thank you for the clarification, Vadim > -----Original Message----- > From: Prof Brian Ripley [mailto:ripley@stats.ox.ac.uk] > Sent: Tuesday, March 22, 2005 9:54 AM > To: Vadim Ogranovich > Cc:
2013 Feb 07
1
[Qemu-devel] Headsup: windows virtio networking does not work on current git
On Thu, Feb 07, 2013 at 09:53:39PM +1100, Vadim Rozenfeld wrote: > On Thu, 2013-02-07 at 12:18 +0200, Michael S. Tsirkin wrote: > > On Thu, Feb 07, 2013 at 08:24:10PM +1100, Vadim Rozenfeld wrote: > > > On Thu, 2013-02-07 at 11:33 +1030, Rusty Russell wrote: > > > > Vadim Rozenfeld <vrozenfe at redhat.com> writes: > > > > > On Tue, 2013-02-05 at
2013 Feb 07
1
[Qemu-devel] Headsup: windows virtio networking does not work on current git
On Thu, Feb 07, 2013 at 09:53:39PM +1100, Vadim Rozenfeld wrote: > On Thu, 2013-02-07 at 12:18 +0200, Michael S. Tsirkin wrote: > > On Thu, Feb 07, 2013 at 08:24:10PM +1100, Vadim Rozenfeld wrote: > > > On Thu, 2013-02-07 at 11:33 +1030, Rusty Russell wrote: > > > > Vadim Rozenfeld <vrozenfe at redhat.com> writes: > > > > > On Tue, 2013-02-05 at
2012 Jun 21
1
[LLVMdev] Readnone/Readonly Function Attributes and Optimization
On 6/21/12 2:23 AM, Duncan Sands wrote: > Hi John, > >> Are functions marked as readnone or readonly in the LLVM IR allowed to >> generate output or to exhibit exceptional behavior (e.g., calling >> abort(), generating an MMU fault, etc.)? > they are allowed to unwind exceptions for example, since in theory this > can occur without scrunching externally visible memory