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
Thu Dec 29 09:52:15 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations | |
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >' | |
what(): Invalid argument (22) | |
[ pid=6509, timestamp=1325170340 ] Process aborted! signo=SIGABRT(6), reason=SI_TKILL, signal sent by PID 6509 with UID 0, backtrace available. | |
-------------------------------------- | |
[ pid=6509 ] Backtrace with 35 frames: | |
PassengerHelperAgent[0x813c35a] | |
[0x3c4440] | |
[0x3c4402] | |
/lib/libc.so.6(gsignal+0x50)[0x138df0] |
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 district_choices | |
if @state | |
districts = Portal::District.find(:all, :conditions => {:state => @state }) | |
return districts.map { |d| {:id => d.id , :name => d.name }} | |
end | |
default = Portal::District.default | |
return {:id => default.id, :name => default.name } | |
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
Assets loaded with absolute (ish) paths: | |
./sites/all/themes/cc/includes/footer.php: | |
<img src="http://www.concord.org/sites/all/themes/cc/img/loading-white.gif" alt="Loading..."/> | |
./sites/all/themes/cc/subscribe.html: | |
<img src="http://www.concord.org/sites/all/themes/cc/img/loading-white.gif" alt="Loading..."/> | |
./sites/all/themes/cc/page-activities.tpl.php: |
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
xml.OTDataCollector("local_id" => id, "name" => "datacollector", "multipleGraphableEnabled" => multi, | |
"title" => "#{pt.name} Sensor#{if predict_id then ' and Prediction' end} Graph", "autoScaleEnabled" => "true") { | |
if predict_id | |
xml.graphables { | |
xml.OTDataGraphable("connectPoints" => "true", "locked" => "true", | |
"color" => "0xff0000", "drawMarks" => "false", "name" => "Prediction", | |
"xColumn" => "0", "yColumn" => "1") { | |
xml.dataStore { otml_object_reference(xml, "#{predict_id}_datastore") } | |
} | |
} |
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
#flash | |
.padded_contents | |
- flash.each_pair do |key, message| | |
%div{:class=>"flash flash_#{key}"}= message |
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 HelpRequestAddNumStudents < ActiveRecord::Migration | |
def up | |
add_column :help_requests, :num_students, :integer | |
end | |
def down | |
remove_column :help_requests, :num_students | |
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
# there is a 'generator' to run which will create all of our boilerplate | |
# code for the 'help request' | |
./script/generate cc_rspec_haml_scaffold HelpRequest email:string login:string name:string class_name:string activity:string no_students:int computer_type:string os:string browser:string ip_address:string problem_type:string all_computers:bool pre_loaded:bool more_info:text logfile:text referrer:text | |
# clearer to view fields if its broken up: | |
./script/generate cc_rspec_haml_scaffold HelpRequest\ | |
email:string \ | |
login:string \ |
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
EmbeddableKlasses = [ | |
Embeddable::ImageQuestion, | |
Embeddable::SoundGrapher | |
] | |
class Investigation < ActiveRecord::Base | |
EmbeddableKlasses.each do |klass| | |
eval "has_many :#{klass.name[/::(\w+)$/, 1].underscore.pluralize}, :class_name => '#{klass.name}', | |
:finder_sql => 'SELECT #{klass.table_name}.* FROM #{klass.table_name} | |
INNER JOIN page_elements ON #{klass.table_name}.id = page_elements.embeddable_id AND page_elements.embeddable_type = \"#{klass.to_s}\" | |
INNER JOIN pages ON page_elements.page_id = pages.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
#convert .sass files to scss files: | |
bundle exec sass-convert -R --from sass --to scss ./public/stylesheets/sass/ | |
# delete the old sass files: | |
find ./public/stylesheets/sass -name "*.sass" | xargs rm | |
# rename the directory. | |
mv ./public/stylesheets/sass ./public/stylesheets/scss |
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
Bundler.require(:default) | |
JRUBY = defined? RUBY_ENGINE && RUBY_ENGINE == 'jruby' | |
RAILS_ROOT = File.dirname(File.dirname(File.expand_path(__FILE__))) | |
APP_DIR_NAME = File.basename(RAILS_ROOT) | |
$LOAD_PATH.unshift(File.join(RAILS_ROOT,"lib")) |