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.
Be07c8d0d6867fd9a0d525f7d17600e2?d=identicon&s=25 Damjan Rems (ther)
on 2009-03-19 14: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
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-03-19 14:41
(Received via mailing list)
On Mar 19, 1:38 pm, Damjan Rems <rails-mailing-l...@andreas-s.net>
wrote:
>
> p flash returns {}
>
Are you putting an error message in the flash ?

Fred
Be07c8d0d6867fd9a0d525f7d17600e2?d=identicon&s=25 Damjan Rems (ther)
on 2009-03-20 07:46
Frederick Cheung wrote:
> On Mar 19, 1:38�pm, Damjan Rems <rails-mailing-l...@andreas-s.net>
> 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
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-03-20 10:33
(Received via mailing list)
On Mar 20, 6:46 am, Damjan Rems <rails-mailing-l...@andreas-s.net>
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
Be07c8d0d6867fd9a0d525f7d17600e2?d=identicon&s=25 Damjan Rems (ther)
on 2009-03-21 22:54
Frederick Cheung wrote:
> On Mar 20, 6:46 Damjan Rems <rails-mailing-l...@andreas-s.net>
> 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.