similar to: Auto-increment column scoped to another column

Displaying 20 results from an estimated 10000 matches similar to: "Auto-increment column scoped to another column"

2009 Aug 19
10
acts_as_list / acts_as_tree / acts_as_nested_set - which one
I am creating forum application which needs usage of acts_as_list or acts_as_tree or acts_as_nested_set. I am unable to decide among these. please could some one recommend from their experience? -- Posted via http://www.ruby-forum.com/.
2010 Dec 22
8
Shoulda issue: no more "should have_instance_methods" ?
I''m using Shoulda. After copying the code here.... .... http://joshuaclayton.github.com/code/2009/07/14/should-act-as-list.html.... into my test_helper file so I can test acts_as_list, I came across issues. For one I realized I had to get rid of the _ between the "should" and "have" in past cases, but here, I get this error when I run my unit test:
2010 Sep 09
4
acts_as_list query
When moving an item around within the list, shouldn''t EVERY item have its optimisitc locking field updated? Currently, only the item that is moved has its optimisitc locking field updated, but every item has its position field changed so surely they too should have their optimistic locking fields updated? I''ve created a drag and drop interface on a list of items that allows for
2010 Dec 23
6
Difference between rake test:units and individually running ruby -I test test/unit/something_test.rb ?
Here''s my issue: running ruby -I test test/unit/something_test.rb for each of my unit tests works perfectly. However, running rake test:units brings errors in all of them - some object becomes nil for some reason. Why might this be happening? Specifics: the object that is successfully not nil when I run the unit tests one-by-one but becomes nil when I do rake test:units is defined like
2011 Jan 17
6
Can't install mongrel with ruby 1.9.2p136
Hi, I''m getting this error message when I try to install Mongrel with "gem install mongrel" on Windows 7 x64 gem install mongrel Successfully installed mongrel-1.1.5-x86-mingw32 1 gem installed Installing ri documentation for mongrel-1.2.0.pre2-x86-mingw32... Installing EDoc documentation for mongrel-1.2.0.pre2-x86-mingw32... ERROR: While executing gem...
2009 Aug 18
5
Increment counter on download
i am offering my site visitors a download of zip file. when someone downloads it, i want to increment a counter and update db. how do i do that? -- Posted via http://www.ruby-forum.com/.
2006 Feb 13
1
acts_as_taggable scoped in another class/table?
I''m hoping someone more familiar with DHH''s acts_as_taggable plugin can help me out here... Tags being all the rage, and the subject of a good recipe in the forthcoming Pragmatic Rails Recipes book, I decided to give them a try. However, from what I can tell, they''re kind of application-wide by design. I know the social thing is hot, but I need my tags to be
2006 Jun 19
3
Using set_primary_key breaks acts_as_tree with non-integer column
I just switched from using the standard "id" column into using my own primary key and generating my own unique id for each record. But, this breaks acts_as_tree. Because my new primary key is not an integer, it breaks the SQL query as follows: StatementInvalid in PagesController#create --------------------------------------------------------------------------------------
2009 Sep 07
11
autoincrement for non-id column
There is a table: execute (<<-SQL) CREATE TABLE "tasks" ( "id" serial primary key, "number" serial, "version" integer DEFAULT 0 NOT NULL, "latest_version" boolean DEFAULT ''t'' NOT NULL, "hidden" boolean DEFAULT ''f'' NOT NULL, "type" character varying (1) NOT
2006 Sep 14
2
theora on the nintendo wii
As anyone considered contacting nintendo regarding theora and ogg support to the upcoming nintendo wii console? apparently they won't be including dvd support out of the box due to licensing costs so it could be a good move both for theora and ogg to gain more widespread acceptance and nintendo to add media center capabilities to their next gen console
2006 Sep 14
2
theora on the nintendo wii
As anyone considered contacting nintendo regarding theora and ogg support to the upcoming nintendo wii console? apparently they won't be including dvd support out of the box due to licensing costs so it could be a good move both for theora and ogg to gain more widespread acceptance and nintendo to add media center capabilities to their next gen console
2010 Dec 14
4
Change primary_key column name
Hi, after changing a primary key column name, the auto-increment information (MySQL) and sequence (Oracle) are lost. What is the correct way to rename primary keys? Thanks, Gustavo -- 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
2010 May 18
1
acts_as_list manual plugin install
Due to some corporate firewall difficulties I decided to go to my home Mac and install the plugin in a rails project and then just copy the plugin from the vendors/plugin folder to my (inside) corporate project. Is there a special registration that needs to take place somehow for the plugin as rails doesn''t seem to recognize the method yet. How do you run the "test" function
2007 Jul 20
3
binned column in a data.frame
Dear all, I would like to know how can I create a binned column in a data.frame. The output that I would like is something like this: Start Binned_Start 1 0-5 2 0-5 6 5-10 8 5-10 13 10-15 ... Best regards João Fadista Ph.d. student UNIVERSITY OF AARHUS Faculty of Agricultural Sciences Dept. of Genetics and Biotechnology Blichers
2004 Apr 26
4
Yet Another LDAP Question
Hi All, I know this must have been discussed around here a million times, but I really didn't find this info anywhere else and I'm on a deadline here. I already have an FC1 server with a working LDAP directory in production. The same server runs a Samba PDC, but not with LDAP functionality yet. All I need to know right now is if I have to include some standard user and group
2005 Nov 25
2
acts_as_list with 2 fields in the scope
Hi Railers, I''ve got a Categories table. I want it to act as a list within the scope of the parent_id AND the site_id. Categories table : id label site_id parent_id So, in my Category class, I have : acts_as_list :scope => ''site_id = #{site_id} AND parent_id = # {parent_id}'' The problem is that when I try to move_up a Category with a parent_id that is null,
2009 Oct 29
4
Unknown column 'quotes.organisation_id' in 'where clause': SELECT * FROM `quotes` WHERE (`quotes`.organisation_id = 1036)
Hi, I have a small app that needs to keep track of quotes, and organisations. An organisation can either be the unit who finally receives the goods (the end_user) or and intermediary (customer) (and in some cases both) An Organisation will (hopefully :) ) have many quotes; and a quote can belong to an organisation, either as a customer or as an end_user or both. So the quotes table
2010 Feb 04
3
Checking column in table to see if value exists?
Hey all, What if I want to check a column in a table to see if a value exists and if it doesn''t, then update the existing record with the specified value and if it does exist increment by 1 from the previous incrementation of the value. And do it using the model (or controller if it''s unable to be done in the model). Something like this: def test! update_attributes
2007 Sep 17
2
Call Center SoftPhone with Auto Answer
-----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Chris Mason (Lists) Sent: Monday, September 17, 2007 12:45 PM To: joao.pereira at fccn.pt; Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Call Center SoftPhone with Auto Answer Joao Pereira wrote: > But still, the
2006 Mar 23
1
handle multiple lists: move an item from one list to another
How do I manage multiple lists? This is what I need. Sometimes an item needs to be moved from one list to another. class Item < ActiveRecord::Base belongs_to :group acts_as_list :scope => :group end class Group < ActiveRecord::Base has_many :items, :order => "position" end Now, sometimes, I may need to change an item from one group to another. But when I do that,