Forum: Ruby on Rails Form validation on non-CRUD activities

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Tom R (Guest)
on 2009-06-01 13:21
(Received via mailing list)
Hi there,

I'm relativity new to Rails (I've been eying it for some time,
though). I'm reasonably familiar with Ruby's syntax.

When I pick up a new language, I like to make a simple blog. I'm
focusing on the authentication at the moment. I am well aware of the
existing plugins out there, but since this application will never see
the light of day and I learning by rolling my own.

Now, let's say I have a login form, how do I validate that? I'm not
saving into  a model, or anything like that. At this stage, I'm just
using a form_tag, and doing simple if params[:username] == '' in the
controller. Very ugly indeed.

What is the best way to validate a form (and get the nice error
messages, like when you are scaffolding) when you are not necessarily
saving data?

Maurício L. (Guest)
on 2009-06-01 15:08
(Received via mailing list)
This topic is locked and can not be replied to.