Skip to content

Instantly share code, notes, and snippets.

def find_grade_level_from_params
grade_level = Portal::GradeLevel.find_by_name('9')
if course =@portal_clazz.course
grade_levels = course.grade_levels
grade_level = grade_levels[0] if grade_levels[0]
else teacher =@portal_clazz.teacher
grade_levels = teacher.grade_levels
grade_level = grade_levels[0] if grade_levels[0]
end
grade_level
IA-85: ==> raclette :: Noah Paessel master * raa48ac6 / (.screenrc screen.sh)
[10:04am] CIA-85: Add scrollback buffer to screen windows. - http://bit.ly/bEkhYK
[10:04am] CIA-85: ==> raclette :: Noah Paessel master * rabc2d6f / .gitignore
[10:04am] CIA-85: Ignore rails temp directory. - http://bit.ly/96IomE
Here are tests which charlie worked on:
spec/controllers/admin/projects_controller_spec.rb
describe "GET index for managers" do
describe "GET edit for managers" do
it "doesn't allow anybody who isn't an admin or manager to access to index" do
it "only allows managers to edit the current project and only shows them the information they can change" do
it "assigns the requested project as @admin_project" do
it "uses default content if home_page_content is empty" do
it "uses the value of home_page_content if it is not empty" do
Processing Portal::ClazzesController#new (for 63.138.152.143 at 2010-07-20 10:46:08) [GET]
Parameters: {"action"=>"new", "controller"=>"portal/clazzes"}
Rendering template within layouts/application
Rendering portal/clazzes/new
ActionView::TemplateError (undefined method `titleize' for 6:Fixnum) on line #36 of app/views/portal/clazzes/_form.html.haml:
33: %td
34: = check_box_tag tag_name, "1", !portal_clazz.grades.find_by_name(name).nil?
35: %td{:style => "padding: 0 10px 0 3px;"}
36: = label_tag tag_name, name.titleize
rites-staging > grep -R send_update_events_to ./app/models/embeddable | sort
./app/models/embeddable/biologica/breed_offspring.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/chromosome.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/chromosome_zoom.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/meiosis_view.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/multiple_organism.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/organism.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/pedigree.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/static_organism.rb: send_update_events_to :investigations
./app/models/embeddable/biologica/world.rb: send_update_events_to :investigations
ssh bumblebeeman.concord.org
cd /web/production/rites/current
RAILS_ENV=production ./script/console
danger = Investigation.all.detect { |i| i.name =~ /Phylogenic/ }
>> danger.id
=> 756
>> danger.name
<?xml version='1.0' encoding='utf-8'?>
<otrunk id='c7b8e9cc-b68c-11de-9a07-001ec94098a1'>
<imports>
<import class='org.concord.framework.otrunk.view.OTFrame' />
<import class='org.concord.framework.otrunk.wrapper.OTInt' />
<import class='org.concord.framework.otrunk.wrapper.OTBoolean' />
<import class='org.concord.framework.otrunk.wrapper.OTBlob' />
<import class='org.concord.otrunk.OTSystem' />
<?xml version="1.0" encoding="us-ascii"?>
<world>
<schemaVersion>1</schemaVersion>
<id>7</id>
<deleted>false</deleted>
<lockedState>unlocked</lockedState>
<species>
<schemaVersion>1</schemaVersion>
<id>8</id>
<deleted>false</deleted>
Here is how I usually deploy to appspot:
rake combine:all
rake appspot:sinatra_app
rake appspot:deploy
You will see a bunch of appengine messages, and you will be asked for a google email address and password.
(You can also check the README in the root directory for info about deploying to appspot, and the rake tasks that make it so... )
(in the static otml as delivered)
... (entities &etc.)
<otrunk id='0009494c-c1e7-11de-9d10-001ec94098a1'>
... (imports &etc. )
...