Displaying 6 results from an estimated 6 matches for "add_on_empti".
Did you mean:
add_on_empty
2006 Feb 21
8
Validations continued
I simply can''t figure this out. I have been reading and re-reading Agile
book and wiki.rubyonrails.org - all sorts of validation methods and
still, it doesn''t work.
Controller code
def create
@client = Client.new(params[:client])
if @client.save!
flash[:notice] = ''Client was successfully created.''
redirect_to :action =>
2006 Aug 10
4
I need "validates_presence_of" help
Hi - I have 3 fileds a user can fill out. They can fill out 2 of them or
just one of them, for example.
fill out these 2 fields:
Field1 and Field2
Or fill out this field:
Field3
In my model how do I use validates_presence_of for Field1 and Field2 or
just Field3.
I want to do something like this:
validates_presence_of Field1, Field2
OR
validates_presence_of Field3
So the user can fill out
2005 Feb 19
0
[Error] Using validates_presence_of for datetime field causes parse error?
Hi Everyone -
I''ve got an odd sort of error when I try to use validates_presence_of
for a MySQL ''datetime'' field. Here''s the relevant portion of the table
definition:
mysql> describe student_surveys;
+---------------------+---------------------+------+-----
+---------------------+----------------+
| Field | Type | Null |
2005 Feb 28
5
Using session data in model
Hi,
I want to use my some session data when I validate som data in the
model. The specific problem I have is that I present different forms
data based on gender, and then dependent of the gender, there''s
different fields that needs validation. I''m wondering what''s the
preffered way of doing this. The session data is not present in the
model, i.e:
class Myclass
2006 May 04
2
validates :on 2
Hello, I need to have this for :create and :login how do I do so
validates_presence_of :login, :password, :password_confirmation,
:user_name, :email, :on => :create
I do need it to be off in a number of places though
--
Posted via http://www.ruby-forum.com/.
2006 May 23
11
putting the schema in the model files
THE SCHEMA IN THE MODEL
a small write up on ''putting the schema in the model''
This is a write up on an issue best covered in a mailing list thread
of Januari 2006 (see the links in the text), I repost it because I
think it deserves a place on the agenda.
== Why? ==
I was switching back and forward between the model files and the
schema.rb -- off course I have