[Rails] validating model without saving

Rodrigo Alvarez Fernández papipo at gmail.com
Tue Jan 3 08:41:46 GMT 2006


On 1/3/06, Harm de Laat <harmdelaat at gmail.com> wrote:
>
> Hi all,
>
> I would like to validate my model without actually saving it to the
> database.
>
> Actualy I need it as follows:
>
> User enters user details in a post form.
> When the user submits the form I would like the form to be validated.
> However, when validation passes, I don't want to save the model yet, but I
> would like to store it in Session context.
>
> Is this possible at all? And if so, how can I achieve my goal?


I guess that you can do it with model.valid?

Regards,
>
> Harm de Laat
>
>
>
>
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060103/816f7781/attachment.html


More information about the Rails mailing list