Fix invites form path (#5861)

rebase/4.0.0rc2
Yamagishi Kazutoshi 2017-12-01 20:26:57 +09:00 committed by Eugen Rochko
parent df03042a6e
commit eee3b32b77
2 changed files with 7 additions and 1 deletions

View File

@ -29,5 +29,11 @@ module Admin
@invite.expire!
redirect_to admin_invites_path
end
private
def resource_params
params.require(:invite).permit(:max_uses, :expires_in)
end
end
end

View File

@ -1,4 +1,4 @@
= simple_form_for(@invite) do |f|
= simple_form_for(@invite, url: controller.is_a?(Admin::InvitesController) ? admin_invites_path : invites_path) do |f|
= render 'shared/error_messages', object: @invite
.fields-group