I have two Ruby files:
db/migrate/20120920180336_create_admin_pages.rb
db/migrate/20120920150716_devise_create_users.rb
There’s a constant variable in this file: _create_admin_pages.rb
How can I find it in a file and make the following command work right?
gsub_file "db/migrate/*_create_admin_pages.rb", "t.boolean :published", "t.boolean :published, :default => false"
Ruby can run with several options. Here the
-peoption (actually two options) let Ruby execute this loop:-peas code,All using the implicit variable
$_, the last read line.