Is it possible to run generator commands from within a running rails
I’m experimenting with creating an application that can create ‘views’
on the fly.
In my ‘pages_controller.rb’ I have the following code:
# Run Ruby script to create all pages defined in
In my ‘build_pages.rb’ I have the following code:
f = File.open(“website_pages.txt”, “r”)
f.each_line do |page|
ruby script/generate controller page
The ‘ruby script/generate controller page’ command fails. Does anyone
know how this line of code can be changed so that it will work?