From 6197f1d15e1ac96d7f8f22a120f6e37c079759fd Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 24 Feb 2015 13:50:09 +0100 Subject: [PATCH] themen index --- app/controllers/themen_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/themen_controller.rb b/app/controllers/themen_controller.rb index 18b9dfb..15a03ec 100644 --- a/app/controllers/themen_controller.rb +++ b/app/controllers/themen_controller.rb @@ -3,7 +3,11 @@ class ThemenController < ApplicationController # GET /themen # GET /themen.json 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 @thema = Thema.find(params[:id]) @fragen=@thema.fragen