Forum: Ruby on Rails Where is my message

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Damjan R. (Guest)
on 2009-03-19 15:38
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
Frederick C. (Guest)
on 2009-03-19 15:41
(Received via mailing list)
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
Damjan R. (Guest)
on 2009-03-20 08:46
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
Frederick C. (Guest)
on 2009-03-20 11:33
(Received via mailing list)
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
Damjan R. (Guest)
on 2009-03-21 23:54
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
This topic is locked and can not be replied to.