Creating a new page (within an existing controller) in rails is an easy 3 step process; any way of automating this? Creating a generate script that does the following maybe:
add method to controller:
def newPage end
add route(s)
get 'controller/newPage' match 'url' => 'controller#newPage'
Create newPage.html.erb in the appropriate directory
I'd much rather automate this with a command like:
rails g controller:add newPage
I'm not really sure where to start.
If you use the command
it will create