AutoCommit Mit Aug 5 11:03:06 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-05 11:03:06 +02:00
parent 3a4888c9a4
commit 7083da8125
4 changed files with 10 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ class Survey::QuestionsController < ApplicationController
# GET /survey/questions
# GET /survey/questions.json
load_and_authorize_resource
acts_as_flagable
def index
@survey_questions = Survey::Question.all
respond_to do |format|

View File

@@ -6,6 +6,7 @@ class Survey::Question < ActiveRecord::Base
include IsCommentable
FLAG_ICONS={"delete" => "fa fa-trash"}
scope :templates, ->{ where(flag_template:true)}
acts_as_flagable
def add_yesno_choices
c=Survey::Choice.new(title: "Ja")

View File

@@ -35,9 +35,9 @@
</p>
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
</div>
<% @neuigkeit.questions.each do |q| %>
<%= render q%>
<% end %>
<% @neuigkeit.questions.each do |q| %>
<%= render q if can? :show, q %>
<% end %>
</div>