rubyonrailsin

A Ruby and Rails talk

Thursday, April 1, 2010


[Rails] Two controllers with create using the same model

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Hello,
I got two controllers, both should create new subscriptions (the name
of the model). Now the thing is how to create in case of the
controller not named subscriptions_controller.rb.
To avoid flooding the list I put both controllers and the view in the
other controller (the one that fails) and the model itself to Pastie:
http://pastie.org/899454
Long story short: why do I get „NoMethodError in
StudentsController#create", why does one controller tries to use the
method from the other controller, and not his own?
Thanks a lot for the reply.
Peter

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

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive