similar to: update_attribute overwrites existing attributes with NULL.

Displaying 20 results from an estimated 10000 matches similar to: "update_attribute overwrites existing attributes with NULL."

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 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
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
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 Dec 08
9
How to update partial attributes of a object from a form?
I have a user table, and it has forty columns, including name, gender, address, email, phone... So my @user object will have forty attributes. I divide these attributes into 4 groups... namely ''general info'', ''personal info'', ''contact info''... and I make separate forms to edit these 4 different group attributes. The problem is when I update
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,
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
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
2007 Jan 27
1
Memory leaks in backgroundrb
While debugging stale backgroundrb it became apparent that there''re memory leaks in it. Here''s top object counts dump: 36715 String 6211 Array 5598 Proc 3150 Hash 1478 DRb::DRbObject 1313 Regexp 1272 Class 750 Thread 741 Socket 739 Slave 739 Slave::LifeLine 737 Process::Status 691 DrillReminderWorker 391 Module 160 Range 75 Gem::Version
2006 Jun 21
5
model with not te be updated attributes ?
Hi List, I have a table that contains several fields that must be initialized when first created, but may not be altered afterwards (when updating the other fields) because they can be changed by external processes. I noticed that the ActiveRecord update commands (even update_attribute) only seem to work by loading the complete record, changing fields that need to be changed and doing a full
2008 Jan 09
6
[PATCH] x 2 - Fix for "null pointer exception" when ask_status is called before worker is run, and docfixes
Sorry for attaching patches in emails to the mailing list, but I''m still unable to login to Devjavu for Backgroundrb (I''m able to login just fine for Merb''s Devjavu and submitted a ticket successfully). Anyway, I encountered a bug when trying to #ask_status of a worker before it''s run (or rather, before its result_hash has been set to something). Not sure why
2007 Jan 10
6
Updating an attribute in db
Hello I am a Ruby newbie, thus a rather simple question. My list view shows table records and enables user to click a button in order to change value of one attribute in given record. I use this code to invoke a method from controller: <%= button_to "Change", { :action => "edit", :id => prog.id_prog } %> My method looks like this (just a simple one - to set the
2006 Jun 14
3
Attributes for a model which are excluded from DB?
If I want to do this but not save to the database, how can I go about it? things.each do |thing| changed = someotherqueryresult thing.update_attribute :testattrib, changed end Essentially I want to create a collection called things with some extra attributes that are not saved into the database, as they are just used for sorting in a view and should not be saved (in fact saving them wastes
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
2012 Sep 25
0
update_attribute, update_column and update_columns should update readonly attributes
Hi. I created a pull request some time ago and didn''t get any reaction yet. https://github.com/rails/rails/pull/7688 Should I do something special or just have a patient and wait? I''m ready to answer any questions about my commit. Thanks in advance. Best regards, Vadim Pushtaev -- You received this message because you are subscribed to the Google Groups "Ruby on
2007 Feb 07
1
Repeatedly dying with "failed to find slave socket"
I''m struggling to keep backgroundrb v2 running for more than 24 hours. It appears to be running fine for a while, then tries to fire off a worker (exactly the same worker it''s been running for the past few hours), and it suddenly dies. I haven''t found any pattern for the cause of this. In backgroundrb_server.log, the final entry is this : 20070206-10:41:45
2008 Jun 09
2
cruisecontrol integration
Hi everyone. Backgroundrb is doing some really sweet stuff for my project. Thanks! I am trying to integrate backgroundrb with cruisecontrol.rb. I started off by creating a simple Rakefile::::: desc ''task for starting up backgroundrb'' task :cruise do template = <<-EOF :backgroundrb: :ip: 0.0.0.0 :port: 11006 :development: :backgroundrb: :log: foreground
2008 Jan 29
4
Setting up release-1.0.1
Hello, I am unable to get the backgroundrb server to run. Initially I got: /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:263:in `load_missing_constant'': uninitialized constant BackgrounDRb::MasterProxy (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:453:in
2007 Mar 13
3
Scheduled worker dies after about 30-45 runs
I have a scheduled worker that runs every minute, checking for new eBay auctions to post. If it finds an auction, then it posts it. If there are no auctions in the database that are queued up, it simply does nothing. I got the worker to finally run as a scheduled worker, every minute. However, after about 30-45 scheduled runs, it simply stops running. My backgroundrb_schedules.yml file: ------