Skip to content

Commit d2127ef

Browse files
committed
reload event before adding new groups
1 parent d17136a commit d2127ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/controllers/admin/groups_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def index
77
@event_groups = @event.event_groups
88
end
99

10-
# An action to regenerate
10+
# An action to regenerate
1111
# -> a controller method
1212
# -> button (to call the action)
1313
# -> a route
@@ -22,6 +22,8 @@ def generate
2222
def regenerate
2323
@event_groups = @event.event_groups
2424
@event_groups.destroy_all
25+
@event.reload
26+
2527
fill_groups
2628
redirect_to admin_event_groups_path(@event), notice: "Groups successfully regenerated"
2729
end

0 commit comments

Comments
 (0)