spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb in volt-0.8.27.beta7 vs spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb in volt-0.8.27.beta8
- old
+ new
@@ -1,22 +1,24 @@
-class UploadController < Volt::ModelController
- model :page
+module Main
+ class UploadController < Volt::ModelController
+ model :page
- def index
- # Nothing to setup here
- end
+ def index
+ # Nothing to setup here
+ end
- def upload
- `form_data = new FormData();
- form_data.append("file", $('#file')[0].files[0]);
- $.ajax({
- url: '/simple_http/upload',
- data: form_data,
- processData: false,
- contentType: false,
- type: 'POST',
- success: function(data){
- $('#status').html("successfully uploaded");
- }
- });`
+ def upload
+ `form_data = new FormData();
+ form_data.append("file", $('#file')[0].files[0]);
+ $.ajax({
+ url: '/simple_http/upload',
+ data: form_data,
+ processData: false,
+ contentType: false,
+ type: 'POST',
+ success: function(data){
+ $('#status').html("successfully uploaded");
+ }
+ });`
+ end
end
-end
+end
\ No newline at end of file