On Fri, Mar 18, 2011 at 5:01 PM, Cluter Vipic <[email protected]> wrote:

> Radhames Brito wrote in post #988052:
> >>
> > try this , go to the console and type rails c, then type this
> >
> > r = ActionController::Routing::Routes
> >
> > then
> >
> > r.generate :controller => :invitations, :action => create , :
> >  invitation_token => "123"
> >
> > see if it generates what you want , then use
> >
> > Mailer.invitation(@invitation,url_for (:controller => :invitations,
> > :action
> > => create , : invitation_token => @invitation.token,:method =>
> > :post)).deliver
>
> Hey thank you ... for your answer the environment of rails c is Rails
> 3.0.1 and use your advices I receive only an error message after I
> insert your follow command:
>
> > r.generate :controller => :invitations, :action => create , :
> >  invitation_token => "123"
>
> NameError: undefined local variable or method ´create' for main:Object
> from (irb): 2
>
>
it appears that you are launching irb not rails console, to go to the rails
console you have to type

rails c

at the app directory, then try mixing

r.generate :controller => :invitations, :action => create ,
:invitation_token => "123"

until you get what you want.

-- 
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