I don't believe the issue is using the '::' vs. '.' notation. Although it
is more idiomatic in Ruby to call methods using the '.' style, '::' is
perfectly acceptable as well.

Object.new.object_id
Object::new::object_id

A few things I'm noticing:

* Based on the NameError you are receiving, I'm curious how you are
accessing the console? Just using IRB will not work without manually
calling 'require' or 'load' on your application's ruby file. Have you
written a custom console rake task or something along those lines? Are you
using the `bundle console` CLI (http://bundler.io/v1.3/bundle_console.html)?

* Depending on the version of 'actionmailer' you are using, the
'deliver_test_email' method name may be incorrect. Recent versions of
'actionmailer' would need to be called using 'TestMailer.test_email.deliver'

* Lastly, the method in your example code is called 'welcome_email' while
the code you provided that would send the email is referencing 'test_email'

Good luck!



On Sun, Aug 25, 2013 at 7:57 AM, Mikel Lindsaar <raasdnil / gmail.com> wrote:

> > What I would like to do is run
> >
> > TestMailer::deliver_test_email in the console and get the details or run
>
> This should be:
>
>    TestMailer.deliver_test_email
>
> The deliver_test_email method is a class method, so you call it by passing
> the 'deliver_test_email' method call to 'TestMailer' class by using a
> period '.' in between.
>
> You are using :: which is telling Ruby to look up the constant
> "deliver_test_email" within the module TestMailer which is why it is
> throwing an error, as there is no module called TestMailer, only a class
> called TestMailer.
>
> Mikel Lindsaar
>
>
>


-- 
Ryan Cook
720.319.7660