similar to: validates_uniqueness_of fails on STI in Rails 2.3.2

Displaying 20 results from an estimated 3000 matches similar to: "validates_uniqueness_of fails on STI in Rails 2.3.2"

2006 Jan 02
19
AR: How to store and restore in YML.
Hello- I have a database with entries that are segmented by customers. I would like to be able to store / delete / restore a particular customer''s information. I will need to rebuild the rows on restore and also rebuild the associations for the different tables. For example, customer { id name } companies { id customer_id (belongs_to) name } contacts { id
2009 Nov 13
3
Encoding::UTF_8 missing?
I''ve just done a fresh reinstall of OS X Snow Leopard on my mac, and I''m having all kinds of problems with Rails, but the latest problem has me stumped. Whenever I run rake db:seed to populate my database I hit the following error: ** Invoke db:seed (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:seed rake aborted! uninitialized constant
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up the thread, so I''m starting over. I''m trying to built a document upload system. The system has a main Document model with different subclasses for different types of documents. With the code below, if I attempt to create a Document, it works fine, but if I attempt to use one of the subclasses, I
2006 Feb 11
2
validates_uniqueness_of - how to use multiple values for scope
Hi I''m trying to create a basic test management tool to organise the manual testing I have to do. I''m working on the results recording module and have a problem. Basically, I want each test result to belong to a test case, a test environment and a build. I want to make sure there''s no duplication of results with these 3 properties. If someone tries to enter a new test
2009 Apr 01
1
Erro de update no rails 2.3.2
Pessoal, estou precisando de ajuda... Estou usando o rails 2.3.2. Quando tento fazer qualquer update (método save em um registro existente), recebo o erro abaixo: ArgumentError in RequisicaosController#enviar_rede wrong number of arguments (3 for 1) c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:2875:in `attributes_with_quotes''
2006 Jun 19
3
can''t dump anonymous class Class
I''m trying to create a document upload system, where most of the code is the super class Document and just the path to file on the system is controlled by the sub classes. When I attempt to use my code, I get the following when I try to save the document. can''t dump anonymous class Class Any ideas? ** Migration ** class CreateDocuments < ActiveRecord::Migration def
2009 Jul 02
0
validates_uniqueness_of and attr_readonly
I notice that I always want to prevent the unique key of a table from being changed. Does that mean I always have to have attr_readonly right after validates_uniqueness_of ? Is there a single function that replaces both of these but has the same affect? Thanks. -------------------------------------------------------------------------------- Developing with Rails 2.3.2; Ruby 1.8.7 (2009-04-08
2010 Feb 05
4
rsync --link-dest, --delete and hard-link count
Hello fellas, Firstly, I would like to apologize for the post being long, but I would appreciate if someone with a good knowledge of the subject gave his opinion. I am working on a backup solution for a series of old and very specialized host computers in aviation industry. I need to do monthly backups of one or two logical volumes (non-OS) on each of the computers and keep the last 12 monthly
2009 Mar 05
7
issue with the object cache
Hi, I am getting a method_missing error when I run my application in the production environment unless I set config.cache_classes = false in config/environments/production.rb. This happens in Rails 2.2.2 but not in Rails 2.1.0. The method that is missing is one I used to have before I edited by hand the migration that creates the table associated with the object (I know you are discouraged to do
2003 Feb 24
1
(fwd from johanhusselman@cks.co.za) Please help with smb printing
----- Forwarded message from Johan Husselmann <johanhusselman@cks.co.za> ----- From: "Johan Husselmann" <johanhusselman@cks.co.za> Subject: Please help with smb printing Date: Sat, 22 Feb 2003 19:17:40 +0200 To: <samba@samba.org> X-Mailer: Microsoft Outlook Express 6.00.2600.0000 Can tou please help me to setup smb printing from red hat 7.3 to a windows2000
2007 Jun 19
4
ActionWebService for many APIs in rails?
Hi, We''ve a pretty large rails application and we are currently deciding moving a part of the application front-end to a desktop GUI. For communication between application and GUI we decided to use an API. So basically what I need is a way to have our models functionality accessible by the GUI. The basic idea: Rails app provides API for models <-> HTTPS Connection <-> GUI
2008 Mar 27
6
Problems pinging PC on tunnel
Hello! I have set up tunnel between a FreeBSD machine and Windows Vista. Tunnel is established, but when I try to ping either end ping fails. I have temporarily switched off firewalls on both machines, no luck. Here is client tinc.conf on Vista: Name = lenovo_client ConnectTo = lenovo_server Interface = tinctap Subnet = 10.20.40.0/24 Sevrer tinc.conf on FreeBSD: Device=/dev/tap0
2006 May 18
1
validates_uniqueness_of
I used validates_uniqueness_of it is case insensitive, it takes only admin not Admin. So please help me out how to put validates_uniqueness_of as case sensitive Thanks in Advance Surekha.Matte -- Posted via http://www.ruby-forum.com/.
2008 Sep 19
0
validates_uniqueness_of: passing a method to :scope
I was wondering if anybody knows an easy way to pass a method name as the scope option to a validates_uniqueness_of validation on a AR model? For example, I have nested models a bit like: class Survey has_many :areas end class Area belongs_to :survey has_many :questions, :order => ''position'' validates_uniqueness_of :position, :scope => : survey_id end class
2006 Apr 27
4
customize validates_uniqueness_of
I need to modify the validates_uniqueness_of function so that it will check that the string is unique but only in its own category. For example right now I have validates_uniqueness_of :title so let''s say I have the :title "Title 1" already in the database with the :category of "1" then if i wanted to enter the :title "Title 1" in the database again BUT
2008 Aug 21
1
validates_uniqueness_of not working - urgent
I''m using restful_authentication to let users register and login. Lately, however, I''m seeing multiple login and emails being created even though I have validates_uniqueness_of as below: user.rb validates_uniqueness_of :login, :email, :case_sensitive => false mysql> select id, login, email, created_at, state from users;
2006 Aug 10
2
validates_uniqueness_of problem
hi Could I check to strings for uniqueness together and not individually? That means for me in an example: name: sex: result: ----- ---- ------- miller m unique miller f unique jackson m unique miller m isn''t unique So I want to check the name and sex be together unique. The name isn''t
2006 Jun 07
3
validates_uniqueness_of two fields
Is it possible to do a validates_uniqueness_of :name, :zip but only in that context? I''d like to be able to have that zip used again, but not in conjunction with a name already with that zip. Does that make sense? -- Posted via http://www.ruby-forum.com/.
2006 May 10
1
Validates_uniqueness_of multiple field combo?
Hello, I am new to Ruby on rails and this is therefore probably trivial. Lets say I have 3 tables - users[id,name, age, ...], interests[id,name,description, ...], and finally a table user_interests[id,user_id,interest_id] to link a user to a set of interests. Now there is no problem to put validates_uniqueness_of :name in the user-model to ensure that I only have one Lenny, but how do I
2008 Apr 04
10
ZFS and multipath with iSCSI
We''re currently designing a ZFS fileserver environment with iSCSI based storage (for failover, cost, ease of expansion, and so on). As part of this we would like to use multipathing for extra reliability, and I am not sure how we want to configure it. Our iSCSI backend only supports multiple sessions per target, not multiple connections per session (and my understanding is that the