ask 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,8 +64,7 @@ jQuery ->
64
64
  Toggle between 'edit' question and 'preview' question
65
65
  ###
66
66
  createQuestionPreview = (question) ->
67
- if question.children('preview-question-fields').length == 0 # if we don't have a question preview yet
68
- asker = question.serialize().match(/^\w+/)[0] # get asker name
67
+ if question.children('.preview-question-fields').length == 0 # if we don't have a question preview yet
69
68
  question_type = question.find('.select-question-type select').val() # get question type
70
69
  question_details = question.serializeObject(/^.*?\[\d+\]/) # get question details and choices
71
70
 
@@ -129,7 +128,7 @@ jQuery ->
129
128
 
130
129
 
131
130
  jQuery.fn.serializeObject = (ignore_regex = null) ->
132
- arrayData = @serializeArray()
131
+ arrayData = @.find("*").serializeArray()
133
132
  objectData = {}
134
133
 
135
134
  pushData = (node, hash_tail, value) ->
@@ -1,3 +1,3 @@
1
1
  module Ask
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-04 00:00:00.000000000 Z
12
+ date: 2012-12-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails