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
var control = require('control'), | |
script = process.argv[1], | |
perform = control.perform, | |
task = control.task; | |
var ProjectConfig = { | |
rootDir: 'staging', | |
git: 'git://github.com/we4tech/restaurant-review.git', | |
branch: 'master', | |
serverPort: 4000 |
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
var control = require('control'), | |
script = process.argv[1], | |
perform = control.perform, | |
task = control.task; | |
/** | |
* Project related configuration | |
*/ | |
var ProjectConfig = { | |
// Keep it simple word so we could use it for Rails environment too. |
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
-- HAML | |
#new_schedule{title: "Add Schedule"} | |
%form | |
%fieldset.ui-helper-reset | |
%label{for: "tab_title"} Title | |
%input#tab_title.ui-widget-content.ui-corner-all{type: "text", name: "tab_title", value: ""} | |
-- Converted HTML | |
<div id='new_schedule' title='Add Schedule'> | |
<form> |
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 'spec_helper' | |
describe FaqItem do | |
context 'validations' do | |
it 'should validate the presence of question' do | |
should validate_presence_of(:question) | |
end | |
it 'should validate the presence of answer' do |
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 'spec_helper' | |
describe FaqItem do | |
context 'validations' do | |
it 'should validate the presence of question' do | |
should validate_presence_of(:question) | |
end | |
it 'should validate the presence of answer' do |
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
<?php | |
class UsersController { | |
public function show() { | |
$user = UserFinder::find(1); | |
$this->assignVariable('user', $user); | |
} | |
} |
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
<h4>Hi, <?php echo $this->assignedVariables('user')->getName(); ?></h4> |
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
<?php cache_fragment('user_welcoming_message'): ?> | |
<h4>Hi, <?php echo $this->assignedVariables('user')->getName(); ?></h4> | |
<?php end_cache_fragment; ?> | |
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
<?php | |
class UserFinder { | |
public static function find($id) { | |
return new LazyLoadedModel($id, new User()); | |
} | |
} |
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
<?php | |
class LazyLoadedModel { | |
private $instance = null; | |
private $refId = null; | |
private $initiated = false; | |
public function __construct($refId, $user) { | |
$this->refId = $refId; | |
$this->instance = $user; | |
} |
OlderNewer