ask 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/answer.rb +1 -1
- data/app/views/asker/_choices.html.erb +1 -1
- data/lib/ask/version.rb +1 -1
- metadata +1 -1
data/app/models/answer.rb
CHANGED
@@ -10,7 +10,7 @@ class Answer < ActiveRecord::Base
|
|
10
10
|
|
11
11
|
mount_uploader :uploaded_file, UploadedFileUploader
|
12
12
|
|
13
|
-
default_scope joins(:question).order('questions.position')
|
13
|
+
default_scope joins(:question).order('questions.position').readonly(false) # This scope prevents updating answers unless readonly is set to false.
|
14
14
|
scope :for_answerer, lambda{|answerer| where(:answerer_type => answerer.class.to_s, :answerer_id => answerer.id)}
|
15
15
|
scope :for_question, lambda{|question| where(:question_id => question.id)}
|
16
16
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<textarea disabled = "disabled" name = "undefined" type = "text" value = "Their answer" class = "askwidget-disabledpreview"></textarea>
|
7
7
|
</div>
|
8
8
|
|
9
|
-
<div class = "question-type UploadQuestion">
|
9
|
+
<div class = "question-type UploadQuestion start-hidden">
|
10
10
|
<input type = "file" disabled = "disabled" name = "undefined" value = "Their answer" class = "askwidget-disabledpreview"></input>
|
11
11
|
</div>
|
12
12
|
|
data/lib/ask/version.rb
CHANGED