Created
January 6, 2015 19:09
-
-
Save coffeejay/08b1a1ec0bce690bcb61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.ajax({ | |
| url: "<%= portfolios_calculate_path %>", // Route to the Script Controller method | |
| type: "GET", | |
| dataType: "json", | |
| data: portfolio_data, // This goes to Controller in params hash, i.e. params[:file_name] | |
| complete: function() {}, | |
| success: function(data, textStatus, xhr) { | |
| // Do something with the response here | |
| alert("it worked!"); // Show the file contents in our editor. | |
| }, | |
| error: function(error) { | |
| alert("Ajax error!" + error) | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment