Created
August 8, 2013 03:17
-
-
Save alaingoldman/6181155 to your computer and use it in GitHub Desktop.
This file contains 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
window.location.href = <%= root_url %> |
This file contains 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: '#{addbank_bankaccts_path}', | |
type: 'POST', | |
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', '#{form_authenticity_token}')}, | |
dataType: "json", | |
data: 'account_uri=' + response.data.uri , | |
success: function(response) { | |
} | |
}); |
This file contains 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
class BankacctsController < ApplicationController | |
def new | |
end | |
def addbank | |
# add bank account logic here | |
# redirect_to root_url | |
# ^ that doesn't work | |
# respond_to do |format| | |
# format.js | |
# end | |
# ^ couldn't get that to work either | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment