admin = User.create(email: "admin@example.com", password: "123456", password_confirmation: "123456") editor = User.create(email: "editor@example.com", password: "123456", password_confirmation: "123456") User.create(email: "guest@example.com", password: "123456", password_confirmation: "123456") admin_user_role = Role.create(name: "Admin User", reference: "User", access: :createable) admin_post_role = Role.create(name: "Admin Post", reference: "Post", access: :createable) editor_post_role = Role.create(name: "Editor Post", reference: "Post", access: :editable) admin.user_roles.create(role: admin_user_role) admin.user_roles.create(role: admin_post_role) editor.user_roles.create(role: editor_post_role)