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
function entryFunction(){ | |
$("#save_modal_radio_id").click(function(){ | |
saveModal('radio'); | |
}) | |
$("#dynamic_location_field").click(function(){ | |
dynamic_location_field() | |
}); | |
$("#concate_location").click(function(){ | |
concatLocations(); | |
}); |
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
require 'faye/websocket' | |
require 'thread' | |
require 'redis' | |
require 'json' | |
require 'erb' | |
module ChatDemo | |
class ChatBackend | |
KEEPALIVE_TIME = 15 # in seconds | |
CHANNEL = "chat-demo" |
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
class User < ActiveRecord::Base | |
attr_accessible :profile_picture_album_id | |
has_many :albums | |
has_many :photos | |
has_many :profile_pictures, | |
:through => :albums, | |
:source => :profile_picture_album_id | |
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
SampleApp::Application.routes.draw do | |
namespace :api do | |
resources :tokens, :only => [:create, :destroy] | |
end | |
end |
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
<!DOCTYPE html> | |
<head> | |
<script> | |
/* attach a submit handler to the form */ | |
$(document).ready(function () { | |
$("#one").click(function(event) { | |
/* stop form from submitting normally */ | |
event.preventDefault(); |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" /> | |
<style type="text/css"> | |
#nav li{ | |
display: inline; | |
list-style-type: none; | |
} | |
</style> | |
</head> |
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
class Post < ActiveRecord::Base | |
attr_accessor :position, :follower_id | |
has_many :relationships, :dependent => :destroy, | |
:foreign_key => "follower_id" | |
has_many :reverse_relationships, :dependent => :destroy, | |
:foreign_key => "followed_id", | |
:class_name => "Relationship" |
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
<%= gmaps({ | |
"map_options" => { "type" => "ROADMAP", "center_longitude" => 180, "zoom" => 3, "auto_adjust" => true}, | |
"markers" => { | |
"data" => json_array(@posts).to_json | |
} | |
}) %> | |
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
def index | |
@search = params[:search] | |
end |