similar to: validate uniqueness of two fields

Displaying 20 results from an estimated 4000 matches similar to: "validate uniqueness of two fields"

2005 Oct 21
4
Validate uniqueness on two columns
I would like to validate the uniqueness of two columns together. I have last and first names as separate columns. What is the Rails Way to do this? Thanks, Jared Nuzzolillo _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2005 Nov 22
11
Building a conditions clause (for find) of multiple optional params?
I want to be able to find items according to various params - category_id, member_id, type_id, rating, etc. What I have now is something like: if(@params[''category_id'']) @items=Item.find(:all, :conditions=>["category_id=?", @params[''category_id'']) elsif(@params[''category_id''] and @params[''member_id''])
2006 Feb 17
27
deployment server
Hi all, On theserverside.com there is an article describing an interview with Bruce Tate, where he calls Java dead like Cobol. See: http://www.theserverside.com/news/thread.tss?thread_id=39066 However in the comments, some guy comes up with a good point: He states the following: <quote> I couldn''t come up with a viable enterprise quality/grade deployment platform for RoR. Even
2006 Jun 15
2
AJAX form inside table - error
Hello, I need to put an AJAX, form such that it is inside a table, and spans across few rows. But, what I am noticing is that, while submitting the form, the data in the fields is not submitted. If I move the form outside the table or inside a cell, things work OK, but not when the form is inside the table and spans few rows. This problem is only with AJAX forms, regular forms work perfect. I
2006 Mar 01
9
ajax doesn''t show at the right place
Hi, I use link_to_remote to create a link to trigger an ajax, things work fine, a new rhtml is created, however, the newly created rhtml doesn''t replace my old zone, it shows instead on top of my old zone...Does someone know why??? my code is like <table> <tr><td colspan="2"><a href="#" onclick="new Ajax.Updater(''zone1'',
2007 Sep 02
2
problem validating uniqueness
I have validates_uniqueness_of :name in my model which works fine when creating a record but doesn''t work when I edit the record. In other words it won''t let me create a record with the same name but I can go in after and update the field without a problem. Why would this happen? -Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 Jan 29
9
Specify options with habtm
Hi all I have the following models: class member has_and_belongs_to_many :disc_jockeys end class disc_jockey has_and_belongs_to_many :members end The relation table is called disc_jockeys_members and has the following fields: disc_jockeys_members(disc_jockey_id, member_id, status) So far, the field status can have values like valid, invalid, locked etc., but it is not regarded yet by
2006 Aug 09
1
help:sql search for NULL
Hi, I have two tables with identical fields(assignments, and matches). However, only one of them accept NULL values for its fields. I want to be able to find out all the matches for any assignment. The search should retrun the match if the corresponding filed is NULL as well. I wrote down the following code but it doesn''t return anything. I wonder what I am doing wrong. Any help is
2006 Feb 07
3
ActiveRecord for kirbybase?
I''ve found vague mentions of various attempts at creating an ActiveRecord adapter for the KirbyBase pure Ruby DBMS, but nothing which looks like it''s actually working. Anyone know of such an adapter that is functional and available? b
2006 Jan 30
5
url for image in css
Hi, I''d like to call a background image for every item in a list. Something like div#nav li.submenu {background: url(dropmenu.gif) 95% 50% no-repeat;} the image is in public/images/dropmenu.gif Thanks, Peter
2012 Oct 24
1
Uniqueness and sql serialize
Hi fellow programmers, I was looking for how to keep integrity in some financial transactions and I saw this "This could even happen if you use transactions with the ‘serializable’ isolation level." in the uniqueness page http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_uniqueness_of. How this is possible with the serializablo
2009 Sep 25
12
uniqueness validation perplexity
I want to write a validate routine to check to enforce that a position must be unique in a category. (In another category, it doesn''t have to and shouldn''t need to be unique.) I write this code which works happily for new items: def position_in_category_not_unique @items = Item.find( :all, :conditions => [ "category_id = ? AND position = ?", category_id,
2006 Jun 03
2
looking for radrails devs
I just got an email update on a radrails bug that I submitted a while back... Unfortunately, it''s just stupid spammers. So, I tried to go to the radrails trac to delete the spam or at least report it, and their trac is puking python errors (including environment information) all over the page! I can''t seem to get to any pages with any contact info, so I''m trying
2006 Jan 31
5
Rails auth systems using LDAP?
Hi everyone, Are there any Rails systems that are either: * Easily extensible to use a different auth store? * Use LDAP out of the box? Thanks, Sean
2006 Jan 09
6
has_and_belongs_to_many :self
Hi all I got the following class: class Member < ActiveRecord::Base has_and_belongs_to_many :buddies, :class_name => ''Member'', :join_table => ''members_have_buddies'', :foreign_key => ''member_id'', :association_foreign_key =>
2006 Apr 14
8
Error with Web Service tests after upgrading to Rails 1.1.2
Hello. I hope this is the right place to describe my problem ? After upgrading to Rails version 1.1.2 from rails version 1.0.0, Web Service functional tests seem broken. I upgraded rails (as the root user / administrator) with: # gem update rails --include-dependencies then I upgraded my application (as myself) with: ? rake rails:update % rake rails:update:configs After these steps,
2006 Feb 12
9
CSS in Views
How can I link to a CSS file in one of my view files? -- Posted via http://www.ruby-forum.com/.
2006 Jan 24
14
engines
This page: http://www.rails-engines.org/download makes it sound like SVN is optional for using engines, but when I try to run the second command ("ruby script/plugin install engines"), I get the NoMethodError on nil as described in the second issue reported here: http://www.rails-engines.org/wiki/pages/Engines+plugin%3A+Known+Issues So, which is it? Do I have to have SVN installed
2006 Feb 03
6
Rails from the command line
I have controller that processes data in one table and puts results in another. Now that its'' working, I would like to be able to run it from the command line ( read: windows batch file). How can this be done? It will be installed on a Windows box with InstantRails1.0, (if that matters). I will be doing more processes like this, so this is a good opportunity to get it right. -- Best
2006 May 11
7
Rails in Dr. Dobbs Journal ?
Hi, I''ve read that Dr. Dobbs Journal''s last issue has a cover article about Rails titled "Ruby On Rails - Java''s Successor?". Can''t find anything about it in http://www.ddj.com Does someone have the paper edition and can confirm that, and tell how the article looks like, and so on. Thanks, -- Jean-Fran?ois. -- ? la renverse.