delete button neuigkeit
This commit is contained in:
@@ -10,6 +10,7 @@ class NeuigkeitenController < ApplicationController
|
|||||||
@neuigkeit = Neuigkeit.find(params[:id])
|
@neuigkeit = Neuigkeit.find(params[:id])
|
||||||
if can? :edit, @neuigkeit
|
if can? :edit, @neuigkeit
|
||||||
@toolbar_elements << {:text=>I18n.t('common.edit'),:path=>edit_neuigkeit_path(@neuigkeit),:icon=>:pencil}
|
@toolbar_elements << {:text=>I18n.t('common.edit'),:path=>edit_neuigkeit_path(@neuigkeit),:icon=>:pencil}
|
||||||
|
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => neuigkeit_path(@neuigkeit), :method=> :delete,:confirm=>"Sure?" }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ class NeuigkeitenController < ApplicationController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
@neuigkeit = Neuigkeit.new(params[:neuigkeit])
|
@neuigkeit = Neuigkeit.new(params[:neuigkeit])
|
||||||
@rubrik = @neuigkeit.rubrik
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @neuigkeit.save
|
if @neuigkeit.save
|
||||||
|
|||||||
Reference in New Issue
Block a user