Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'spork'
#uncomment the following line to use spork with the debugger
#require 'spork/ext/ruby-debug'
ENV["RAILS_ENV"] ||= 'test'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
$("#add_friend").on('ajax:success', function(data, status, xhr){
console.log(this);
console.log($(this));
$(this).after('<p>Friend request successfully sent! And now you wait</p>').fadeIn('slow');
$(this).remove().fadeOut('slow');
});
= link_to "Someone Friend this Fucker", friendships_path(:user_id => current_user.id, :friend_id => @user.id), :remote => true, :method => :post, :id => 'add_friend'
# application.js
//= require jquery
//= require jquery_ujs
//= require jquery.cookie
//= require ember
//= require jquery.tokeninput
//= require bootstrap-modal
//= require dashboard/index
{
messages: [
{
id: 4,
text: "Felix still stucks",
created_at: "2012-08-24T00:17:29Z",
owner: {
id: 1,
first_name: "test",
last_name: "testerson",
App.Message = Ember.Object.extend({
id: null,
text: null,
created_at: null,
persisted: false,
place: null,
user: null,
comments: []
});