Commit 633314b6 authored by Nick Thomas's avatar Nick Thomas

Fix viewing default push rules on a Geo secondary

parent be8905b8
---
title: Fix viewing default push rules on a Geo secondary
merge_request: 3559
author:
type: fixed
...@@ -40,6 +40,6 @@ class Admin::PushRulesController < Admin::ApplicationController ...@@ -40,6 +40,6 @@ class Admin::PushRulesController < Admin::ApplicationController
end end
def push_rule def push_rule
@push_rule ||= PushRule.find_or_create_by(is_sample: true) @push_rule ||= PushRule.find_or_initialize_by(is_sample: true)
end end
end end
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%hr.clearfix %hr.clearfix
= form_for [:admin, @push_rule] do |f| = form_for @push_rule, url: admin_push_rule_path, method: :put do |f|
- if @push_rule.errors.any? - if @push_rule.errors.any?
.alert.alert-danger .alert.alert-danger
- @push_rule.errors.full_messages.each do |msg| - @push_rule.errors.full_messages.each do |msg|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment