forked from bofh/fetsite
AutoCommit Mit Aug 5 11:03:06 CEST 2015
This commit is contained in:
@@ -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|
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user