forked from bofh/fetsite
AutoCommit Mit Aug 5 09:03:03 CEST 2015
This commit is contained in:
@@ -4,7 +4,7 @@ class Survey::Question < ActiveRecord::Base
|
||||
has_many :choices, dependent: :destroy
|
||||
has_many :answers, through: :choices
|
||||
include IsCommentable
|
||||
|
||||
FLAG_ICONS={"delete" => "fa fa-trash"}
|
||||
scope :templates, ->{ where(flag_template:true)}
|
||||
|
||||
def add_yesno_choices
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<div class="contentbox" id ="<%= divid_for(question) %>" style="">
|
||||
<div >
|
||||
<b><%= question.title%></b> <%=question.text%><%= link_to fa_icon("pencil"), edit_survey_question_path(question) , class: "btn btn-link navbar-btn" , remote: true%>
|
||||
<%= flag_link(question, "delete")%>
|
||||
|
||||
<ul class="choice-list">
|
||||
<% question.choices.each do |c| %>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
member do
|
||||
get :answer
|
||||
put :answer
|
||||
get 'flag'
|
||||
|
||||
end
|
||||
end
|
||||
resources :choices
|
||||
|
||||
Reference in New Issue
Block a user