similar to: 2 sets of validations for one table possible?

Displaying 20 results from an estimated 100000 matches similar to: "2 sets of validations for one table possible?"

2006 Jan 15
6
PROPOSAL: Validations as Mixin
It seems to me that Validations are quite useful for many objects, even ones having nothing to do with ActiveRecord. Common examples are Contact Us forms, multi-step forms, web service paramater validations, etc. I took a look at the source for Validations, and it seems that it is very independent from ActiveRecord. I caught only three depenedencies: 1. validates_numericy --> depends on
2010 May 21
0
Multiple Models one form and validations ... no transactions(mongo)
I am trying to setup a sigup form thats pretty much just like the basecamp form. https://signup.37signals.com/basecamp/Plus/signup/new I want to create a User a Studio and a Subscription(chargify) a Subscription belongs to a Studio and not to a User. User gets tagged onto a Studio via an admin array. Is there any way to do this all in one form and still get back validation errors etc without
2009 Apr 20
0
User defined model and validations?
I am trying to wrap my head around an idea and would appreciate any input from rails geniuses out there I would like to allow an admin user to define data that should be in a template, and then allow regular users to create instances of this template and have it validated. ie: - Template would have name, files and then x many fields of say "Text max length 20 chars", "Image size
2006 Apr 08
1
text_field behaviour with validations
Hi, The text_field method sets the class of the field to "invalid" when the object you specified is invalid (when using validations). This is to facilitate working with validations. Is there anything else it does? In a certain non-standard situation I''m forced to use text_field_tag, instead of text_field. This means I have to take care of the validations myself as well.
2007 Jul 18
3
how to combine presence only data sets to one presence/absence table
Problem: I have a Set of samples each with a list of observed species (presence only). Data is stored in a excel spreadsheet and the columns (spl) have different numbers of observations (spcs). Now I want to organize the data in a species by sample matrix with presence/absence style in R. data style (in excel): spl_A spl_B spl_C spcs1 spcs1 spcs2 spcs2 spcs3 spcs3 spcs4 spcs5 spcs5 desired
2006 Jul 29
0
validations not run till after action in controller is called
Hi there I am uploading data and images in a form and I am trying to validate the url of the img before it is uploaded and the record is saved... the controller works fine when the url is valid but while trying to test invalid url''s I found that the validations are not run until the end of the action is there a way to run validations on a post before the action is called? cheers
2006 Jul 13
5
Relationships: one model referencing same table for different data sets?
Hi, After I''ve saved, I want to display the Description from the Codes table that corresponds with the ID in the Cause table. Rails doesn''t seem to like that, because on my form, I have two sets of data in combo boxes that come from the Codes table. So, in the show template, I can''t do this: Cause of Death: <%= @cause.code.description %> Any ideas? The
2012 May 31
1
maptools: using to sets of information (within two shape files) for one plot
Dear all, I am using a shape file containing the information regarding the borders of the PARISHES of Austria. I created a plot with different colours for different percentages of child care institutions. Now I would like to add the information of the COUNTY boundaries to this plot which I have got in another shape file. I would like these boundaries to be shown with bold lines so that they can
2006 Feb 21
2
Single table inheritance problem
Hi! Is there anywhere on the net a sample of some basic app (with actions like create, edit etc.) that uses single table inheritance? I''m trying to create (my first) app with 2 different types of users and while it basically works, my code is quite messy. I.e. i''ve got 2 forms, each for different type of user. To use the same rhtml files for creating and editing the user, i
2009 Jul 17
2
Count data categories from table
Hi there, I have a relatively simple question, though, I couldn't find a solution for it so far. I have a table with 1000 entries and columns containing information about different parameters for each entry. What I want to do is group all parameters from one of the columns [e.g. if all 1000 entries are grouped in 30 different categories (described as character strings) in a second column] and
2005 Dec 19
1
OpenSSH traffic accounting ...
Since i/we didn't receive any answer on secureshell at securityfocus.com I like to ask this question to you. What's your opinion on this topic? Thanks! Miro +-------------------------------+ +-------------------------------+ | Miro Dietiker | | MD Systems Miro Dietiker | +-------------------------------+ +-------------------------------+ -----Urspr?ngliche
2011 Apr 07
0
accepts_nested_attributes_for, validations, :inverse_of option on associations, and IdentityMap
This feels more like a question to ask the core list, forgive me if I trespass. I''ve been trying to help one of my cow orkers get through a sticky problem. He''s got a fairly complex nested form to update a model and its children. He''s started adding some validations, and we''ve encountered a number of issues: First he had a validation on one of the child
2006 Apr 10
3
Problems with multiple ActiveRecords and Validations
Hi all, I am a RoR newbie and have the following scenario set up: There are 2 ActiveRecords involved, the first one being "User", the second one being "Visibility". The corresponding users table holds address informations regarding a User. The visibilities table holds visibility settings for the individual columns of the users table (i.e. firstname, lastname, country
2010 Apr 14
1
Rails validations app specific problems
Hi all, I have a unique workflow where it''s making the use of validations difficult. My app is for internal use in my company and I have a funky implementation (inspired by the e-commerce Railscasts episodes) of a cart. I have products which when I "add to cart" creates an order with a state of "incomplete". The product is a line item of my order. Hope that makes
2004 Jul 13
0
One way audio when the BT-100 is behind Firewall
Hi, When we use BudgeTone-100 in our Intranet together with our Asterisk IP PBX everything is working OK. When we try to use the phone behind the Firewall we can't do the connection. When I try to use STUN Server: 128.107.250.38 there is no result. The only way in which I have audio from the one direction (BT-100 to Asterisk) is when I leave blank STUN Server and specify the IP Address in
2004 Jul 22
0
Connecting more Asterisk Servers in Cluster to works as one IP PBX
Hi, Is it possible to connect more than one Asterisk in cluster to works as one Asterisk IP PBX? I need of this for cases where I need of more FXO/FXS ports which can't be placed in one machine (server) and in the same time all Asterisk have to works as one with one dial plan and etc. -- Best Regards, Miroslav Nachev COSMOS Software Enterprises, Ltd. Tel: (+359-2) 983-32-62 Mobile:
2006 May 17
8
Html Email Problem
Dear Rubyians, I am facing problems to send Html Email scnce one month. I changed the content type is text/html and charecter set "utf-8" I worte the html code in the confirm.heml in the action mailer folder. but mail is going with html code Exapmle: <html border="2"> <tr><td></td></tr></html> code in the confirm .html In the
2010 Aug 26
2
miro from rpmforge appears to have dep solving issues
Hi folks, Anyone know the whereabouts of libgtkembedmoz.so()(64bit) as it is needed by miro-1.0-1.el5.rf.x86_64 (rpmforge) I tried a whatprovides and have looked at epel as well as rpmforge - no luck. While I'm asking, I'm looking for an internet HD TV viewer - miro looked interesting - any other products you know of? TIA Rob -------------- next part -------------- A non-text attachment
2011 Jan 08
4
Help How to create DSL for conditional validations
Hi All, I am new to Ruby and ROR I were trying to create small DSL for conditional validations valid_with_cond :bypass_validation do if self.addresses > 3 errors[:base] << "Can not have more than 3 addresses". end end By this I wanted to create array of method and call them all in custom validation method. this above code I wanted to do attr_accessor
2009 Mar 02
0
Implementing conditional read-only attributes of ActiveRecord objects
Hello, my goal is to implement the option of specifying a condition in attr_protected, attr_readonly and possibly other attribute methods in ActiveRecord objects. Rationale (example): class User < AR:Base # User should not be able to modify fields any more once they have been verified attr_readonly :firstname, :lastname, :gender_id, :birthdate, :if => :passport_verified? # ... end