Skip to content

Instantly share code, notes, and snippets.

jQuery ->
$('#password_prompt_form').submit ->
$.post(this.action, { passcode: $('#passcode').val() }) ->
$('#passcode_response').html(data)
return false
$('#password_prompt_form').submit(function() {
$.post(this.action, { passcode: $('#passcode').val() }), function(data){
$('#passcode_response').html(data);
});
return false;
});
$('#password_prompt_form').submit (e) ->
e.preventDefault()
$.post this.action,
passcode: $('#passcode').val()
(data) -> $('#passcode_response').html(data)
require "resque/tasks"
require "resque/failure/multiple_failure"
require "resque/failure_server"
task "resque:setup" => :environment do
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
Resque::Failure.backend = Resque::Failure::MultipleFailure
end
$('#pick_date').datepicker(
alert('test')
onSelect: ( date_text, inst ) ->
alert('test')
alert(date_text)
)
$('#pick_date').datepicker({
onSelect: function(date_text, inst) {
alert('test');
alert(date_text);
}
})
$('#search_text').autocomplete({
source: "/search_options",
minLength: 3,
select: function(event, ui) {
$('#search_id').val(ui.item.id);
$('#search_type').val(ui.item.type);
return $('#search_form').submit();
}
});
jQuery(function() {
return $('#pick_date').datepicker(alert('test'), {
onSelect: function(date_text, inst) {
alert('test');
return alert(date_text);
}
});
});
{
"current_page": 1,
"total_count": 33,
"total_pages": 7,
"_embedded": {
"events": [
{
"vanity_name": "it-needs-an-event",
"name": "it needs an event...",
"description": "dsfsdf",
json.array! @people do |person|
json.name person.name
json.age calculate_age(person.birthday)
end