themen index

This commit is contained in:
Andreas Stephanides
2015-02-24 13:50:09 +01:00
parent 15327c75de
commit 6197f1d15e

View File

@@ -3,7 +3,11 @@ class ThemenController < ApplicationController
# GET /themen # GET /themen
# GET /themen.json # GET /themen.json
load_and_authorize_resource load_and_authorize_resource
def index
@themen = Thema.accessible_by(current_ability,:show)
@themen_drafts = Thema.accessible_by(current_ability,:show).where(:isdraft=>true)
end
def show def show
@thema = Thema.find(params[:id]) @thema = Thema.find(params[:id])
@fragen=@thema.fragen @fragen=@thema.fragen