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
function synchronize() { | |
messages = [] | |
function_counter = 0 | |
$.ajax({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api1_path(), | |
beforeSend: function() { | |
function_counter ++ | |
}, |
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
function getData() { | |
function_counter = 0 | |
$.ajax({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api1_path(), | |
beforeSend: function() { | |
function_counter ++ | |
}, | |
complete: function() { |
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
function getData() { | |
function_counter = 0 | |
$.ajax({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api1_path(), | |
beforeSend: function() { | |
function_counter ++ | |
}, | |
complete: function() { |
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
function getData() { | |
function_counter = 0 | |
$.ajax({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api1_path(), | |
beforeSend: function() { | |
function_counter ++ | |
} | |
}) |
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
function getData() { | |
function_counter = 0 | |
$.ajax({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api1_path() | |
}) | |
} |
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
function getData() { | |
function_counter = 0 | |
} |
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({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api1_path(), | |
success: function() { | |
$.ajax({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api2_path(), | |
success: function() { |
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({ | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.call_to_api1_path(), | |
success: function() { | |
redirect() | |
} | |
}) |
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
$(document).on('submit', '#login-form', function(e) { | |
e.preventDefault() | |
form = $('#login-form').serialize() | |
$.ajax({ | |
data: form, | |
dataType: 'json', | |
type: 'POST', | |
url: Routes.sessions_path(), | |
success: function() { | |
getData() |
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 MyClass | |
def initialize(**args) | |
args.each do |k, v| | |
instance_variable_set("@#{k}", v) | |
define_singleton_method(k) do | |
instance_variable_get(:"@#{k}") | |
end | |
define_singleton_method("#{k}=") do |v| | |
instance_variable_set("@#{k}", v) | |
end |
NewerOlder