Re: Re: Why is Rails eager loading most of my database?

Frederick Cheung
2011-03-25T21:45:32Z

On 25 Mar 2011, at 20:51, Taylor Strait
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:

> Hi Fred, thanks for the reply. Does rails execute validations when
> simply showing the object? My assumption is that validations were only
> called before_create.
>
The validations aren''t run, but when you do

validates_inclusion_of :foo, :in => bar

then ruby does have to evaluate all those arguments in order to call
validates_inclusion_of an setup the validation

Fred

> Taylor
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>