similar to: save after delete returns true but actually fails

Displaying 20 results from an estimated 7000 matches similar to: "save after delete returns true but actually fails"

2013 Apr 02
3
[LLVMdev] LNT ClamAV - Sorting output
Hi Torok, I've used a hard-coded list on the input parameter and still got some output (slightly) scrambled between two different bots... INPUT = $(PROJ_SRC_DIR)/inputs/clam.cab \ $(PROJ_SRC_DIR)/inputs/clamdoc.tar.gz \ $(PROJ_SRC_DIR)/inputs/clam.exe \ $(PROJ_SRC_DIR)/inputs/clam.exe.bz2 \ $(PROJ_SRC_DIR)/inputs/clam-v2.rar \
2010 Nov 10
3
create a pairwise coocurrence matrix
Hi all, I am trying to construct a pairwise coocurrence matrix for certain terms appearing in a number of documents. For example I have the following table with binary values showing the presence or absence of a certain term in a document: term1 term2 term3 term4 term5 doc1 1 1 0 0 1 doc2 1 1 0 1 1 doc3 1 0 0 0 1 And I want to have a matrix with the number of the pairwise coocurrencies. So,
2017 Jun 08
2
Logging the click data
> In case I wasn't clear: I don't think you have to modify the command > at all. Just create a template that uses the command as it currently > works. I thought we needed a new template only for the second log file? To generate the first log file using the existing $log command, I have introduced another $log command in query template that looks like:
2009 Aug 10
1
[PATCH server] Fixed db-omatic so it doesn't die due to an unhandled ActiveRecord::StaleObjectError exception.
The error is caused by the save! method updating an object that another thread (most likely in taskomatic) already updated. In the case of this race condition, we retry saving. However, a proper fix would involve fixing the locking. --- src/db-omatic/db_omatic.rb | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/db-omatic/db_omatic.rb
2005 Dec 28
1
making has_and_belongs_to_many save more elegant
When a user creates a post I also want to save all the tags associated with it. I do that in the post_controller like this presently: def save @post = Post.new(@params[:post]) @tags = Tag.new(@params[:tags]) @post.user_id = session[:id] if @post.save @tags.title.split('','').each do |tag| present_tag = Tag.find_by_title(tag.strip) present_tag =
2009 Dec 07
1
Cucumber and general Ruby question
Hello, I have this cucumber step definition: Given /^the site has pages "(.+)" and "(.+)"$/ do | page_1, page_2 | Page.create :title => page_1 if Page.find_by_title(page_1).nil? Page.create :title => page_2 if Page.find_by_title(page_2).nil? end This works, but obviously I would like to DRY it up. I was thinking along the lines. Given /^the site has pages
2011 Mar 30
1
Package XML: Parse Garmin *.tcx file problems
I'm struggling with package XML to parse a Garmin file (named *.tcx). I wonder if it's form is incomplete, but appreciably reluctant to paste even a shortened version. The output below shows I can get nodes, but an attempt at value of a single node comes up empty (even though there is data there. One question: Has anybody succeeded parsing Garmin .tcx (xml) files? Thanks! Michael
2006 May 11
0
creating variables on the fly with a loop
I''m trying to clean up some of my sloppy code, and one of the things I''m working on is trying to make this huge group of variables a bit more elegant. My variables look like this: @business_core_courses = Category.find_by_title(''business_core_courses'').courses @written_communication = Category.find_by_title(''written_communication'').courses
2008 Feb 08
2
update_Attributes stale Object error
Hi, IN one of my unit tests I get an ActiveRecord::StaleObjectError: Attempted to update a stale object object.save! in object I have apart from other stuff an after_save method, which calls object.assosication.update_attributes(...) If I remove that line from my code my tests succeeds. Unfortunetly, I do not understand why an update_attributes call can generate an StaleObjectError. Maybe
2006 Jul 02
2
:include breaks has_many :order
It would appear that using :include on a model that has_many with an :order on another model makes it so that the order is ignored. Is this supposed to happen? Strikes me as odd behavior. For example class Farmer < ActiveRecord::Base has_many :cows, :order => ''position'' end class Cow < ActiveRecord::Base acts_as_list :scope => :farmer end If I do
2007 Mar 25
1
Optimistic locking and update_attributes: not working?
Hi all, I''ve searched the forumns, but I can''t seem to find an answer to this one. I''m having trouble getting optimistic locking (OL) to work in my app, even though all of the pieces are there: * table has lock_version column, with default of 0 (zero) * lock_version column is being incremented by the first update (but the second doesn''t catch it) *
2011 Jan 16
4
persistence by reachability
Hello guys, I have these models class Farmer < ActiveRecord::Base has_many :cows end class Cow < ActiveRecord::Base set_table_name :cows belongs_to :farmer end ... graph = Farmer.find(x) # Retrieves four cows of x graph.cows[1].name = "Trottolina" graph.save while adding a new cow to collection works perfectly fine, ActiveRecord doesn''t
2013 Apr 02
0
[LLVMdev] LNT ClamAV - Sorting output
On 2 April 2013 21:20, Török Edwin <edwin+ml-debian at etorok.net> wrote: > You can pass all the filenames from the inputs/ directory directly on the > command-line, instead of specifying -r inputs/. > That way the order of scanning will be exactly the one specified on the > command-line. > Hum, I think I can fix that with Make... --renato -------------- next part
2010 Mar 05
2
Windows 7 + Samba 3.4.5 locking problem
Hello, after having no problem with four Windows 2000 workstations and one Samba 2.something server for several years in a medical practice the practice software (DocComfort) dropped support for Windows 2000 beginning of this year. So I bought new hardware for the workstations and servers and installed from scratch. Now there are four Windows 7 Professional 32bit Workstations (with UAC disabled)
2007 Oct 05
7
Easy AR association stubbing
I''ve added a method to the mock class that makes it pretty easy to stub associations in rails. I''ve been using it for awhile and it seems to cut down on a lot of setup code for the controller and model specs that use associations. #before @person = mock_model(Person) posts = mock(''post_proxy'') posts.stub!(:build).and_return(mock_model(Post, :save => true))
2006 Aug 16
1
Stale object errors
I''m running into a couple of stale object problems with methods that at first glance appear fairly atomic - eg Message.update(params[:id], {:body => params[:value]}) Of course, Rails has to instantiate the object & validate it before it updates the database, so it''s not actually atomic, hence the occasional staleobject error. So I''ve been wondering about
2006 Jul 10
11
Category Number Results returned
I am looking to have a number of categories populated from my results of a search. For example, searching on "sport" would display all results for sport. I want to also have a number of categories to refine the documents down. So by clicking on the "Fishing" category or the "Shooting" category, I would only see the results on sport around that category. Now for
2004 Jun 24
0
Ptruvfcc H_y_d_r_0_c_0_d_0_n_e, pain medicati0n available
dettimre copem fntpak Enjoy deep discount meds here. Vi-co-din - 0rder Meds From Home Now Go to our site for more information, so we can help you with all your prescription needs. S M http://t.info.shopblack.com/abc/big/ If you would like to discontinue receiving messages of this type, please use this: http://vu.info.shopblack.com/abc/big/rf.html A man was travelling abroad in a
2013 Apr 02
2
[LLVMdev] LNT ClamAV - Sorting output
On 04/02/2013 11:06 PM, Daniel Dunbar wrote: > On Tue, Apr 2, 2013 at 11:46 AM, Renato Golin <renato.golin at linaro.org <mailto:renato.golin at linaro.org>> wrote: > > On 2 April 2013 19:20, Daniel Dunbar <daniel at zuster.org <mailto:daniel at zuster.org>> wrote: > > What is it that makes the output of the program asynchronous? The output is
2019 Apr 04
2
PJSIP Delay in Dialing
Thanks Joshua. Hopefully I'll be able to retry tomorrow. On Thu, 4 Apr 2019 at 15:30, Joshua C. Colp <jcolp at digium.com> wrote: > On Thu, Apr 4, 2019, at 11:27 AM, Mark Farmer wrote: > > Thanks, I did enable debugging but didn't see any attempts to resolve > > hostnames. I will give it another look. > > > > I did have an empty resolver_unbound.conf