form validation on rails

3 views
Skip to first unread message

joshc...@gmail.com

unread,
Dec 6, 2007, 1:28:23 AM12/6/07
to Phoenix Ruby Users Group
I'm just trying to build a contact page. Its already working; have a
couple different ways of doing it. What they are both missing is
validation.

Sure, I could write some javascript; and it wouldn't take much to
manually validate in the controller action... but I'm looking for the
rails way of doing it. I'm thinking of a contact class (aka model),
with validation attributes. AR lets you do that, right? no database
though. I've been looking at this post:

http://activeform.rubyforge.org/rails-contact-form.html

but i can't seem to get it to work right. can someone recommend a blog
post or article with a good example?

thanks

Chad Woolley

unread,
Dec 6, 2007, 11:46:07 AM12/6/07
to phoeni...@googlegroups.com
On Dec 5, 2007 11:28 PM, joshc...@gmail.com <joshc...@gmail.com> wrote:

> but i can't seem to get it to work right. can someone recommend a blog
> post or article with a good example?

Do you have the pragmatic programmers rails book yet? It covers all
the basics such as these quite well.

joshc...@gmail.com

unread,
Dec 6, 2007, 12:47:02 PM12/6/07
to Phoenix Ruby Users Group


On Dec 6, 9:46 am, "Chad Woolley" <thewoolley...@gmail.com> wrote:
>
> Do you have the pragmatic programmers rails book yet? It covers all
> the basics such as these quite well.

no, i was thinking of getting an agile rails book that i've heard good
things about.

Marc Chung

unread,
Dec 6, 2007, 1:09:35 PM12/6/07
to phoeni...@googlegroups.com
Those are both actually the same book.

If you're new to Ruby too, check out the Programming Ruby book; also
by the Pragmatic Programmer.

-Marc

Chad Woolley

unread,
Dec 6, 2007, 2:32:36 PM12/6/07
to phoeni...@googlegroups.com
Yes, definitely get the "pickaxe" and "agile rails", and keep the PDFs
on your desktop while you are learning.
Reply all
Reply to author
Forward
0 new messages