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
it "should have acts_as_list functionality" do | |
@sec1 = sections(:teaching) | |
@sec2 = sections(:scholarship) | |
@sec1.should be_in_list | |
@sec2.should be_in_list | |
(@sec1.position < @sec2.position).should be_true | |
@sec2.move_higher | |
(@sec1.position > @sec2.position).should be_true | |
end |
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
<% form_for @survey do |f| %> | |
<%= observe_form "edit_survey_#{@survey.id}", | |
:url => survey_path(@survey), | |
:method => :put, | |
:frequency => 5, | |
:update => 'savedat_time' | |
%> | |
<%#= the form... %> |
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
<script type="text/javascript"> | |
//<![CDATA[ | |
//haHA This works! It could probably use some refactoring. | |
$(document).ready(function(){ | |
$(".help_icon").click(function(){ | |
help_icon = $(this); | |
help_container = help_icon.parent(); | |
help = help_icon.siblings('.help_dialog'); | |
help.css('display','block') | |
help.dialog({ |
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
OPTION 1 : Dell Server (slightly more expensive, more warranty support) | |
PowerEdge SC1435 | |
Dual Core AMD Opteron® 2212; 2.0GHz,2X1MB Cache,1Ghz HyperTransport x2 (dual dual core) | |
2GB, 667MHz, 4x512MB Single Ranked DIMMs (FREE UPGRADE!) | |
No Operating System | |
2-Post Rails for Non Dell Rack | |
Onboard SATA, 2 Drives connected to Onboard SATA Controller - NO RAID | |
250GB 7.2K RPM Serial ATA 3Gbps 3.5-in Cabled Hard Drive | |
250GB 7.2K RPM Serial ATA 3Gbps 3.5-in Cabled Hard Drive (Discounted upgrade!) |
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
namespace :passenger do | |
desc "Restart Application" | |
task :restart do | |
run "touch #{current_path}/tmp/restart.txt" | |
end | |
desc "Create Symlink For App" | |
task :add_symlink do | |
run "ln -nfs /home/publicrecon/rails/#{application}/current /home/publicrecon/rails/app" | |
end |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Results of Survey</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
</head> | |
<body> | |
<h1 align="center">Results of Survey</h1> |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<title>Untitled Document</title> | |
</head> | |
<body> | |
<?php | |
# Connect to the db | |
$connection = mysql_connect("localhost","root",""); |
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
# makes sure that all of the monsters and characters have participants | |
def update_participants | |
epm = {} | |
# make sure each character is accounted for, each one is only in there once. | |
self.participants.each do |p| | |
unless p.is_monster? || self.characters.include?(p.character) | |
self.add_participants([p], :type => :character) | |
elsif p.is_monster? | |
epm[p.monster_id] = epm[p.monster_id] ? 0 : epm[p.monster_id] + 1 # build a monster count hash | |
end |
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
# makes sure that all of the monsters and characters have participants | |
def update_participants | |
epm = {} | |
# make sure each character is accounted for, each one is only in there once. | |
self.participants.each do |p| | |
unless p.is_monster? || self.characters.include?(p.character) | |
self.add_participants([p], :type => :character) | |
elsif p.is_monster? | |
epm[p.monster_id] = epm[p.monster_id] ? 0 : epm[p.monster_id] + 1 # build a monster count hash | |
end |
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
## Data returned when you go to http://localhost:8080/Class/Class ## | |
({"id":"Class", | |
"data":{"$ref":""}, | |
"description":"Classes in the system, every class has a table of the instances of the class", | |
"properties":{ | |
}, | |
"prototype":{"$ref":"../s$0"} | |
}) | |
## ActiveResource Model ## |
OlderNewer