forked from bofh/fetsite
Merge branch 'master' of https://github.com/fetsite/fetsite
This commit is contained in:
@@ -19,7 +19,7 @@ class MembershipsController < ApplicationController
|
||||
# POST /memberships.json
|
||||
def create
|
||||
@membership = Membership.new(params[:membership])
|
||||
|
||||
@membership.fetprofile= Fetprofle.find(params[:fetprofile_id])
|
||||
respond_to do |format|
|
||||
if @membership.save
|
||||
format.html { redirect_to @membership.fetprofile, notice: 'Membership was successfully created.' }
|
||||
|
||||
@@ -10,6 +10,9 @@ class NeuigkeitenController < ApplicationController
|
||||
@neuigkeit = Neuigkeit.find(params[:id])
|
||||
if can? :edit, @neuigkeit
|
||||
@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?" }
|
||||
@toolbar_elements << {:hicon=>'icon-plus', :text=> "publish",:path => neuigkeit_publish_path(@neuigkeit),:confirm=>"Sure?" }
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,14 +22,19 @@ class NeuigkeitenController < ApplicationController
|
||||
@neuigkeit.rubrik=@rubrik unless @rubrik.nil?
|
||||
end
|
||||
|
||||
|
||||
def publish
|
||||
@neuigkeit = Neuigkeit.find(params[:id])
|
||||
@neuigkeit.publish
|
||||
@neuigkeit.save
|
||||
redirect_to @neuigkeit
|
||||
end
|
||||
def edit
|
||||
@neuigkeit = Neuigkeit.find(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
@neuigkeit = Neuigkeit.new(params[:neuigkeit])
|
||||
@rubrik = @neuigkeit.rubrik
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
if @neuigkeit.save
|
||||
|
||||
@@ -3,7 +3,7 @@ class RubrikenController < ApplicationController
|
||||
load_and_authorize_resource
|
||||
def index
|
||||
@rubriken = Rubrik.all
|
||||
|
||||
@neuigkeiten = Neuigkeit.recent
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user