Code in install.rb

If I add some code that uses ActiveRecord::Base.connection.execute
method to create and remove a table respectively on each install and
uninstall in the install.rb and uninstall.rb of a plugin that I am
writing for myself, then would it work?

there’s a rails db:create that I’ve seen floating around. Not sure if
you can call things similarly in install.rb or not.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs