diff --git a/app/views/rules/confirm.html.erb b/app/views/rules/confirm.html.erb
index 4749dea8..3e937367 100644
--- a/app/views/rules/confirm.html.erb
+++ b/app/views/rules/confirm.html.erb
@@ -2,7 +2,13 @@
Confirm changes
+
+ <% if @rule.name.present? %>
+ Confirm changes to "<%= @rule.name %>"
+ <% else %>
+ Confirm changes
+ <% end %>
+
diff --git a/app/views/rules/edit.html.erb b/app/views/rules/edit.html.erb
index e5693fa2..94c23a14 100644
--- a/app/views/rules/edit.html.erb
+++ b/app/views/rules/edit.html.erb
@@ -1,5 +1,5 @@
<%= link_to "Back to rules", rules_path %>
-<%= modal_form_wrapper title: "Edit #{@rule.resource_type} rule" do %>
+<%= modal_form_wrapper title: @rule.name.present? ? "Edit #{@rule.resource_type} rule \"#{@rule.name}\"" : "Edit #{@rule.resource_type} rule" do %>
<%= render "rules/form", rule: @rule %>
<% end %>
diff --git a/db/migrate/20250429021255_add_name_to_rules.rb b/db/migrate/20250429021255_add_name_to_rules.rb
new file mode 100644
index 00000000..f69e1140
--- /dev/null
+++ b/db/migrate/20250429021255_add_name_to_rules.rb
@@ -0,0 +1,5 @@
+class AddNameToRules < ActiveRecord::Migration[7.2]
+ def change
+ add_column :rules, :name, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index adb03c7d..1e16d0bc 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.2].define(version: 2025_04_16_235758) do
+ActiveRecord::Schema[7.2].define(version: 2025_04_29_021255) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@ -18,6 +18,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_04_16_235758) do
# Custom types defined in this database.
# Note that some types may not work with other database engines. Be careful if changing database.
create_enum "account_status", ["ok", "syncing", "error"]
+ create_enum "user_role", ["admin", "member"]
create_table "accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "subtype"
@@ -502,6 +503,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_04_16_235758) do
t.boolean "active", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.string "name"
t.index ["family_id"], name: "index_rules_on_family_id"
end