manually creating a route to...

It is really worthwhile googling REST and Rails, and reading about the underlying expectations of the Rails framework. If you do things the way it expects, then your job becomes easier. Not trivially easy, but considerably easier.

Are Invoices structurally different than a Page? Do they need separate rules, or different roles to access them for editing, or a means of payment? I would argue that adding an invoice to a pages_controller would probably mean a lot harder work ahead for you than just creating a separate model and controller to handle these.


oh I solved my problem.