Sorry my ignorance Frederick, how can I do that ?

Just for you know, this class is native from Ruby.

Thank you.

On 2 maio, 13:58, Frederick Cheung <[email protected]> wrote:
> On May 2, 5:19 pm, Erico Fusco <[email protected]> wrote:> Hi guys,
>
> > I´m trying to change a SMTP method on my rails application creating a
> > file on initializers folder, but I'm getting this error: uninitialized
> > constant Net (NameError)
>
> > I don't know if I'm doing this right, here it's my .rb file I put on
> > initializers folder.
>
> sounds like net/smtp isn't yet loaded - try requiring it first.
>
> Fred
>
> > initializers/test.rb
> > Net::SMTP.class_eval do
> >         def rcptto(to_addr)
> >                 if $SAFE > 0
> >                         raise SecurityError, 'tainted to_addr' if 
> > to_addr.tainted?
> >                 end
> >                 getok("RCPT TO:<#{to_addr}>")
> >         end
> > end
>
> > Thanks guys...

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to