|
|
|
|
|
|
|
|
respond_to do |format| |
|
|
respond_to do |format| |
|
|
if @group.save |
|
|
if @group.save |
|
|
flash[:notice] = l(:notice_successful_update) |
|
|
flash[:notice] = l(:notice_successful_update) |
|
|
format.html { redirect_to(groups_path) } |
|
|
|
|
|
|
|
|
format.html { redirect_to_referer_or(groups_path) } |
|
|
format.api { render_api_ok } |
|
|
format.api { render_api_ok } |
|
|
else |
|
|
else |
|
|
format.html { render :action => "edit" } |
|
|
format.html { render :action => "edit" } |
|
|
|
|
|
|
|
|
@group.destroy |
|
|
@group.destroy |
|
|
|
|
|
|
|
|
respond_to do |format| |
|
|
respond_to do |format| |
|
|
format.html { redirect_to(groups_path) } |
|
|
|
|
|
|
|
|
format.html { redirect_to_referer_or(groups_path) } |
|
|
format.api { render_api_ok } |
|
|
format.api { render_api_ok } |
|
|
end |
|
|
end |
|
|
end |
|
|
end |