Where is my message


#1

I am using this model validation:
class Mailadress < ActiveRecord::Base
belongs_to :maillist

validates_size_of :desc, :maximum => 50, :message => ‘Description too
long!’
end

When I try to update with inproper size update fails but where is the
error message.

p flash returns {}

Rails is 2.2.2.

by
TheR


#2

Frederick C. wrote:

On Mar 19, 1:38�pm, Damjan R. removed_email_address@domain.invalid
wrote:

p flash returns {}

Are you putting an error message in the flash ?

Fred

Yes where my program is doing control, but this is ROR’s buildin method.
Where does it put the message?

by
TheR


#3

On Mar 20, 6:46 am, Damjan R. removed_email_address@domain.invalid
wrote:

Yes where my program is doing control, but this is ROR’s buildin method.
Where does it put the message?

Sorry, without seeing some code I’m not at all sure what you’re on
about.

Fred


#4

Frederick C. wrote:

On Mar 20, 6:46 Damjan R. removed_email_address@domain.invalid
wrote:

Yes where my program is doing control, but this is ROR’s buildin method.
Where does it put the message?

Sorry, without seeing some code I’m not at all sure what you’re on
about.

Fred

Nevermind. I found out that it is in AR model errors method.

In my case @mailadress.errors

thanks anyway

by
TheR


#5

On Mar 19, 1:38 pm, Damjan R. removed_email_address@domain.invalid
wrote:

p flash returns {}

Are you putting an error message in the flash ?

Fred