similar to: Adding "update all" functionality

Displaying 20 results from an estimated 40000 matches similar to: "Adding "update all" functionality"

2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all I have a Model like this: class Member < ActiveRecord::Base attr_accessible :username, :email, :first_name, :last_name end I have created a scaffold using script/generate scaffold member members Using the URL localhost:3000/members/edit/1 I can edit all attributes, including created_at, lock_version etc.! But it should only show the attributes I listed in attr_accessible! What
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
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) *
2006 May 09
7
When to use optimistic locking?
Hi All, I''m having some trouble deciding when and how to implement optimistic locking. Let''s say I have a multiuser Rails app, and let''s say it stores, among other things "vital" customer information. The standard methods created by the Rails generate scaffold script look like this: def edit @customer = Customer.find(params[:id]) end
2006 May 02
3
Ajax scaffolding respones are received, but not rendered in browser
Hi i installed the latest ajaxscaffolding gem and generated a scaffold. List works fine. Delete deletes, but the update doesn''t show and the busy icon spins indefinitely. Pressing new or edit also causes the busy icon to spin, but again the ui doesn''t update. my development.log indicates the request was handled and (using firebug) I''m seeing this response: new
2007 Jul 31
0
Force an object to previous state, when using lock_version
If I have an exception while trying to save an object, how can I tell Rails that it''s not saved yet? The object has a lock_version (used for optimistic locking). This is what I do: ins = MyClass.new( arguments ) begin transaction do ins.save! bunch_of_other_stuff() end rescue ins.save! # problem here! end The object''s save() sets the internal object state in a saved
2012 Nov 12
3
Updating objects in arrays
Perhaps this is a Rails issue. However, I need to first determine whether I simply am missing something about updating members of an array. I have an array of 10 ActiveRecord objects. I wish to iterate over the array and update an attribute. When I do this the underlying table row changes but the object in the array frequently does not. For example: count = 0 current_entries.each do
2009 Aug 10
0
[PATCH server] Fixed db-omatic so it doesn't die due to unhandled exceptions related to saving db objects in update_host_state and update_domain_state.
The underlying issue has to do with optimistic locking for active record, and contention between db-omatic and task-omatic. That still needs to be fixed, especially since contention issues might get worse when the two daemons are made multithreaded. --- src/db-omatic/db_omatic.rb | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git
2008 Oct 21
1
How to force a lock_version increment
Hi everyone, I have a order with order_lines use case. On changing the lines, I want to be sure no one else changed the order. So I use lock_version on the order. This works fine if something is changed on the order record. But now i have the situation that I delete, alter and add order lines without changing the order record itself. I have to check and increment the order#lock_version however
2006 May 17
0
acts_as_versioned with lock_version bug?
Hello. The acts_as_versioned plugin works fine ... till the adjunction of optimistic locking via the lock_version table column. Here is the problem description: Without optimistic locking things are fine: # ++++ The table creation migration ++++ % cat db/migrate/001_create_tables.rb class CreateTables < ActiveRecord::Migration def self.up create_table :softwares,
2010 Sep 22
0
ActiveRecord#touch behaviour in Rails 3
In Rails 2.x, calling touch on an ActiveRecord model would update the ''lock_version'' on the model, if it were present. It would produce something like this in SQL: UPDATE `foo` SET `updated_at` = ''2010-07-23 10:44:19'', `lock_version'' = 2 WHERE ''lock_version'' = 1 This would ensure that your optimistic locking policy will be followed
2016 Mar 23
0
r-base installation fails on Ubuntu 14.04
On 23 March 2016 at 09:35, Barnet Wagman wrote: | I am unable to install R on an up to date (i.e. apt upgraded) Ubuntu | 14.04 system. According to | https://cran.r-project.org/bin/linux/ubuntu/README (and many other sources), | R is available for this version of Ubuntu (which is a stable version). | | I currently have | | deb https://cran.cnr.berkeley.edu/bin/linux/ubuntu trusty/ | | in
2016 Mar 23
0
r-base installation fails on Ubuntu 14.04
Synaptic can show the origin of packages. The only thing I see from a backport is libcmanager0 I don't think this is relevant to R. Or is it. The only thing I've got installed from a ppa is mate (a desktop). I don't see anything related to mate that is related to R. FYI the ubunu I'm using came preinstalled from Dell (on a notebook; usually I install linux myself). On
2016 Mar 23
0
r-base installation fails on Ubuntu 14.04
It's a Dell XPS 13. Obviously I don't understand what's in libcmanager0. I wonder if I can safely replace it. I'm a bit uneasy about replacing things Dell installed. I gather there are some specialized drivers for the monitor on this system. On 03/23/2016 11:34 AM, Alex M wrote: > That could do it > http://packages.ubuntu.com/trusty-backports/libcgmanager0 > >
2013 Jul 28
1
Problem with ldpaths in Ubuntu 13.04
Hello! I'm trying to install R-3.0.1 on an Ubuntu machine (64 bit, version 13.04). I have uninstalled and installed several times, but to no avail. I keep getting errors about missing ldpaths, and installing packages does not work at all. Here is the information: erin@erin-Lenovo-IdeaPad-Y480:~$ sudo apt-get install r-base Reading package lists... Done Building dependency tree Reading
2019 Dec 20
0
Upgrading from Debian Stretch to Buster, Van Belle package
Hello Louis, ----------------------------------- # apt-get remove libldb1 ldb-tools Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: ? libtalloc2 libtdb1 libtevent0 Use 'apt autoremove' to remove them. The following packages will be REMOVED: ? ldb-tools libldb1 0
2012 Jun 15
1
Bug#677614: xcp-xapi: someone should create /etc/default/xen
Package: xcp-xapi Version: 1.3.2-6 Severity: important Looks like on Wheezy, /etc/default/xen is not created by xen-utils-common. Since xcp-xapi depends on its existence and further declaration of the toolstack in it, it should take extra care to ensure that it is present. root at debian:~# aptitude install xcp-xapi The following NEW packages will be installed: blktap-dkms{a} blktap-utils{a}
2016 Mar 23
3
r-base installation fails on Ubuntu 14.04
That could do it http://packages.ubuntu.com/trusty-backports/libcgmanager0 Seems to be libc related, which is a pretty core library to much of the whole system. Hmm, which model Dell? We just got a Dell 5000 series with Ubuntu, I have not checked with my boss if there was R installation issues. Thanks, Alex On 03/23/2016 11:22 AM, Barnet Wagman wrote: > Synaptic can show the origin of
2016 Mar 23
2
r-base installation fails on Ubuntu 14.04
Possibly off the wall and a long shot, but is pre-installed Linux perhaps 32 bit, while the R attempt is 64? JN On 16-03-23 02:22 PM, Barnet Wagman wrote: > Synaptic can show the origin of packages. > > The only thing I see from a backport is > > libcmanager0 > > I don't think this is relevant to R. Or is it. > > The only thing I've got installed from
2016 Mar 23
5
r-base installation fails on Ubuntu 14.04
I can make a few suggestions to help you hunt for the issue. This kind of error is often caused by conflicting packages from proposed, backports, ppas, or other 3rd party repos. If for some reason you have a dependency installed from one of those sources that is newer than what R on cran was built against (stock ubuntu 14.04) then you will hit a conflict. Simply removing backports from your repos