Displaying 20 results from an estimated 1000 matches similar to: "Validating format"
2006 Aug 17
2
Knowing the partial iteration number
Hi,
How can I know the iteration number of a *render (:partial)* iterating
through a collection?
Example:
I got a collection containing 3 elements:
*John
*Pierre
*Chris
John would respond to 1, Pierre to 2 and Chris to 3 and so on...
Kind of like the *cycle* method acts but to know the iteration number.
Guillaume Carbonneau
-------------- next part --------------
An HTML attachment was
2006 Mar 08
3
ActiveRecord and Images
Not really a Rails question, but a "best practices" one.
If I want to associate an image to every account in my application,
is it better to insert the image file directly inside the db or to
upload the image in public/images/ ?
Also, if I want to associate a cover to a movie, what''s the best
approach ?
TIA,
ngw
--
Nicholas Wieland
nicholas_wieland@yahoo.it
2006 May 16
4
dealing with media file formats and RMagick.
Hello,
I basically have the following problem - I have a site that will allow
people to upload videos. The video may be in any format - .mov, .avi, .wmv
etc.. I can either use embedded Windows Media Player, or embedded Quicktime
to play the files but the problem is, how do I create stills from the movies
to display them as .jpg''s on my site so when somebody clicks on them, the
video
2006 Jun 14
5
Rails SOAP tutorial
Hi all..
I new in Ruby/Rails.. Where could i get some good tutorial about SOAP
using Rails?
I''ve been googling yet still did''nt find good tutorial.
Thank you in advance.. :)
--
Regards,
Ananda Putra
2008 Jun 15
11
Ouch! Can't figure out this file upload issue...
Okay, so this is driving me crazy. I''m trying to do a file upload
using code from a book.
What happens:
I get wrong number of arguments (1 for 0) in the upload controller
save action. No idea why.
Schema:
The schema for the picture model object is just a textfield named
comments and a binary field called data.
Upload controller:
def get
@picture =Picture.new
end
def save
2006 Mar 13
4
Problem realted to upload..
I want to upload a file.
And what I am confused about is...should I upload it using a separate
table or just as another file in the form.
If as a separate table then I am not able to save it on the system/
Or/ If not that, then how can i check for the extensions?
Do reply.
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 May 25
4
How to add a migration with a plugin?
I''m working on a plugin that requires some database support to do its
job (adding a model or two). I''d like the plugin to automatically add a
migration once it is installed. Is there already a mechanism for this?
If so, how do you do it?
--
*Berin Loritsch*
Owner
*Work:* 571-215-7708
*Email:* bloritsch@d-haven.com <mailto:bloritsch@d-haven.com>
*IM:*
2006 Jul 27
7
cannot get past "Booting WEBrick"
Hi Everyone,
I am following the ''Agile Web Dev. with Rails'' book, and I used instant
rails to do the install on a Windows machine. Everything seemed to work
fine until I got to:
Booting WEBrick...
After that, nothing happens. I tried creating a new rails application, but
I get the same
problem. I also tried reinstalling to no avail.
Any ideas?
Thanks for the help.
2006 Jul 27
2
ActiveRecord retrieval style? Lazy initialtization?
I''m using ActiveRecord for an Extract and Transform operation, so it is
outside of its native environment of Rails. I am running into a problem
with memory consumption when I retrieve large amounts of data. By large
amounts I am talking about roughly 12,700 records that each have a one
to many relationship with about 15 additional types of information. One
of those types happens
2006 Aug 14
3
validating required fields during an update?
I have a User model with an email attribute. I''m using the following
validations:
validates_confirmation_of :email
validates_format_of :email,
:with => RFC822::EmailAddress,
:message => "must be a valid address in the form user@domain.com"
validates_uniqueness_of :email, :message => "address has already
been taken. If you''ve forgotten your
2006 Feb 03
9
validating phone numbers
Anyone got a good validation for validating a phone number? I just
want to make sure that whatever the user enters is somewhat sensical,
and i''d like to be fairly liberal about what kind of a format it''s in.
Joe
2008 Jun 07
3
DRY validates_format_of?
In a model I have following validates_format_of. Is there an easy way to
DRY this up? It seems to be rather repetitive.
validates_format_of :expiration_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :activation_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :some_other_date, :with =>
2006 Apr 18
10
Validates_ip_of
Hello all
After being told of a funky date validator I will ask again for another
validator :) Does anyone know of a plugin that validates that a field is
the correct syntax for an IP Address?
Thanks
Jeff
--
Posted via http://www.ruby-forum.com/.
2005 Nov 28
4
validates_format_of nil
I''ve noticed that validates_format_of will return invalid if the field
is nil.
Question 1) How should we declare a validation that will validate it
with a regex if it is set, but, if the field is not set, just move on
Question 2) Why is it done this way? The other validators are only
invoked if the field is set . If you want to declare the field
mandatory, you add a
2006 Apr 05
4
validates_format_of ?
Hi all,
I''ve got a form which accepts a "price" field and I''m attempting to
validate it and allow some flexibility in the way the user enters it.
It''s a numeric field but I want the user to be able to enter dollar
signs and commas naturally in the data entry.
I''m trying to understand how to use validates_format_of, and I''m not
sure what
2012 Aug 14
3
validates_format_of :message not working, validates_length_of :message is working
I''m using validates_format_of and the validation I want to do works, but I
can''t get an error message to be displayed if the data is invalid:
validates_format_of :mobile, :with => /\A[\+0-9]+\Z/, :message => " - Wrong"
I have another validation some where else that does display the error
message: " - Name is too long"
validates_length_of :name,
2008 Feb 24
1
validates_format_of no dots allowed
I need a validates_format_of that disallow dots.
In the api there is nothing to find about how validates_format_of exatly
works.
Is there a better documentation or is there something that can tell me
howto disallow dots.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2009 Apr 15
2
does xapian have these disadvantages?
hi! alls
i have read an article about comments on Lucene.
http://www.jroller.com/melix/entry/why_lucene_isn_t_that
i have more understanding about Lucene through this article,especially its disadvantage or limitation.
then i would like to question that are there similar disadvantages to xapian?
any advice would be appreciated.
baijl
2009 Apr 15
2
does xapian have these disadvantages?
hi! alls
i have read an article about comments on Lucene.
http://www.jroller.com/melix/entry/why_lucene_isn_t_that
i have more understanding about Lucene through this article,especially its disadvantage or limitation.
then i would like to question that are there similar disadvantages to xapian?
any advice would be appreciated.
baijl
2006 May 10
8
E-mail validtor??
Does anyone have a good working e-mail validator? or even some regexp to
make the validates_format_of work right... that would be awesome. Also,
maybe an online tutorial for regexp. i''ve always been afraid of it but i
think it''s time to face the fears.
thanks!
--
Posted via http://www.ruby-forum.com/.