lib/generators/petergate/install_generator.rb in petergate-0.1.11 vs lib/generators/petergate/install_generator.rb in petergate-0.1.12
- old
+ new
@@ -25,9 +25,19 @@
RUBY
end
end
+ # def insert_into_application_controller
+ # inject_into_file "app/controllers/application_controller.rb", after: /^class\sApplicationController\s<\sActionController::Base/ do
+ # <<-'RUBY'
+
+ # access(all: [:index, :show])
+
+ # RUBY
+ # end
+ # end
+
def create_migrations
Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath|
name = File.basename(filepath)
migration_template "migrations/#{name}", "db/migrate/#{name}"
end