Just launched! Get 30% off Rails Revisited Have a Look

The First Deployment

Buy or Subscribe

You can access this course in just a minute, and support my efforts to rid the world of crappy online courses!

Buy Standalone  Subscribe

We'll need to add a migration so that Spina has its data, so let's do that quickly:
rails g migration AddSpinaNeedful
In the new migration file, you can add this:
class AddSpinaNeedful < ActiveRecord::Migration[7.1]
  def up
    #We need an account - this will also create a page for us
    Spina::Account.create!(name: "Railzzz", theme: "default")
    Spina::Navigation.create!(
      name: "mains",
      label: "Main menu"
    )
  end
  def down 
    Spina::Account.destroy_all
    Spina::Navigation.destroy_all
    page = Spina::Page.where(name: "homepage").destroy_all
  end
end
When you add an account, Spina will create a homepage for you, which is nice.