devape_survey 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,7 @@ class DevapeSurveyGenerator < Rails::Generators::Base
|
|
8
8
|
copy_file "create_answers.rb", "db/migrate/0000000111_create_answers.rb"
|
9
9
|
copy_file "create_questions.rb", "db/migrate/0000000112_create_questions.rb"
|
10
10
|
copy_file "create_surveys.rb", "db/migrate/0000000113_create_surveys.rb"
|
11
|
+
copy_file "devape_survey.js", "app/assets/javascripts/devape_survey.js"
|
11
12
|
end
|
12
13
|
|
13
14
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
//ove_fields(){
|
2
|
+
//}
|
3
|
+
function add_fields(link, association, content){
|
4
|
+
var new_id = new Date().getTime();
|
5
|
+
var regexp = new RegExp("new_" + association, "g")
|
6
|
+
$(link).parent().before(content.replace(regexp, new_id));
|
7
|
+
}
|
8
|
+
$(function() {
|
9
|
+
$('.fields .remove').click(function() {
|
10
|
+
$(this).parents("p:first").remove();
|
11
|
+
return false;
|
12
|
+
});
|
13
|
+
$('.fields .add-answer').click(function() {
|
14
|
+
alert('hello');
|
15
|
+
});
|
16
|
+
});
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: devape_survey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- John Kealy
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- lib/rails/generators/devape_survey/templates/create_answers.rb
|
28
28
|
- lib/rails/generators/devape_survey/templates/create_questions.rb
|
29
29
|
- lib/rails/generators/devape_survey/templates/create_surveys.rb
|
30
|
+
- lib/rails/generators/devape_survey/templates/survey.js
|
30
31
|
- lib/rails/generators/devape_survey/devape_survey_generator.rb
|
31
32
|
- lib/devape_survey/engine.rb
|
32
33
|
- MIT-LICENSE
|