Forum: Ruby on Rails RE: Rails Digest, Vol 21, Issue 160

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bharat A. (Guest)
on 2006-06-08 21:38
(Received via mailing list)
> On the account web page, I have a button_to link to an action
> called 'add_invoice'. I added a def for 'add_invoice' in
> account.rb, but I can't figure out what to put inside the
> def. Is another controller needed (invoice.rb)? Can I do it
> from within account.rb?
> I'm trying to wrap my head around this concept - can anyone help?

Imo, the decision is to be made on the requirements. If this is the only
place that you need to add invoices from, then just use this controller
and do a create method on the invoice model.

This topic is locked and can not be replied to.