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
class ApplicationController < ActionController::Metal | |
include ActionController::Helpers | |
include ActionController::Redirecting | |
# Rendering MUST be before Renderers::All | |
include AbstractController::Rendering | |
include ActionController::Renderers::All | |
# this is now in ActionView::Layouts: | |
# include AbstractController::Layouts | |
include ActionView::Layouts |
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
kd = Word.find(1) | |
kd.translated_words.each do |tw| | |
puts tw.text | |
puts tw.language | |
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
$found = false; | |
$sessionID = uniqid(); | |
$i = 0; | |
$MAX_ITERATIONS = 500; | |
while ($found && $i < $MAX_ITERATIONS) { | |
// do some stuff | |
} |
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
# in this version of FizzBuzz the words have to be separated by a comma | |
def fizzbuzz(number) | |
output = nil | |
if number % 3 == 0 | |
output = "Fizz" | |
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
<?php | |
namespace app\tests\mocks\models; | |
use lithium\data\entity\Document; | |
use lithium\data\collection\DocumentSet; | |
class MockTests extends \app\models\Tests { | |
public static function &connection() { |
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
<?php | |
static::applyFilter('save', function($self, $params, $chain) { | |
// TODO if they are applying for concession, write this to the mysql_ | |
// "registrations" table | |
$data = $params['entity']->data(); | |
if ($data['registration_fee_type'] == 'concession') { | |
$registration = Registrations::first(array('conditions' => array('id' => $data['registration_id']))); | |
$registration->concession_applied_for = 1; | |
$registration->save(null, array('validate' => false)); | |
} |
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
<?php | |
// registrations model, foreign key is session_id and *not* venue_session_id: | |
class Registrations extends \lithium\data\Model { | |
public $belongsTo = array( | |
'VenueSessions' => array('key' => array('session_id' => 'id')), | |
// also tried this, which doesn't work: | |
// 'VenueSessions' => array('class' => 'VenueSessions', 'key' => 'session_id'), | |
); | |
... |
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
[root@localhost] local/www/oars # git merge x-correct-http-methods2 2011-08-18 23:20:26 root pts/4 | |
Auto-merging tests/capybara/step_definitions/capybara_steps.rb | |
Merge made by recursive. | |
controllers/ConnectionController.php | 7 ++- | |
controllers/ItemsController.php | 1 + | |
.../client_admin/candidate_retrieve.feature | 2 +- | |
tests/capybara/step_definitions/capybara_steps.rb | 41 +++++++++++++-- | |
.../step_definitions/client_admin_steps.rb | 54 +++++++++++-------- | |
tests/capybara/support/env.rb | 9 ++- | |
views/candidates/index.html.php | 2 +- |
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
Client-admin: | |
Failing Scenarios: | |
cucumber -p client-admin-all client_admin/candidate_create.feature:84 # Scenario: Add a new candidate using an existing candidate username | |
cucumber -p client-admin-all client_admin/client_create.feature:34 # Scenario: Add a new client and be directed to the login page | |
172 scenarios (2 failed, 170 passed) | |
2221 steps (2 failed, 4 skipped, 2215 passed) | |
Delivery: |
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
cucumber -p client-admin-all client_admin/ | |
Failing Scenarios: | |
cucumber -p client-admin-all client_admin/candidate_create.feature:23 # Scenario: Navigating to create candidates page for a client that doesn't exist | |
cucumber -p client-admin-all client_admin/candidate_create.feature:84 # Scenario: Add a new candidate using an existing candidate username | |
cucumber -p client-admin-all client_admin/client_create.feature:34 # Scenario: Add a new client and be directed to the login page | |
172 scenarios (3 failed, 169 passed) | |
2221 steps (3 failed, 8 skipped, 2210 passed) |
NewerOlder