Project estimate: 2 developers * 12 months = 24 man-months != 4 devlopers * 6 months
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
rails new flickr | |
rails server | |
rails generate scaffold Photo name:string | |
rake db:migrate | |
rails generate controller welcome index |
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
Feature: Admin can hide events | |
In order to get bad stuff off the site without deleting it from the database | |
As a admin | |
I want to hide events | |
Scenario: normal | |
Given a user "[email protected]" exists | |
Given he has an event named "Monster Truck Rally" | |
When I go to the events page |
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 find_shoes(temp, precipitation) | |
shoe_combos = [ | |
{:temp => 90, :precipitation => false, :shoes => 'Sandals'}, | |
{:temp => 90, :precipitation => true, :shoes => 'Flip-Flops'} | |
] | |
right_answers = shoe_combos.select do |combo| | |
combo[:temp] == temp && combo[:precipitation] = precipitation) | |
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
shoe_combos = [ | |
{:temp => 90, :precipitation => false, :shoes => 'Sandals'}, | |
{:temp => 90, :precipitation => true, :shoes => 'Flip-Flops'} | |
] | |
def find_shoes(temp, precipation) | |
shoe_combos.each do |combo| | |
if (combo[:temp] == temp && combo[:precipitation] = precipitation) | |
return combo[:shoes] |
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 CanonicalHost | |
def initialize(app, host=nil, &block) | |
@app = app | |
@host = (block_given? && block.call) || host | |
end | |
def call(env) | |
if url = url(env) | |
[301, { 'Location' => url }, ['Redirecting...']] | |
else |
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
<% content_for :javascripts do %> | |
<%= javascript_include_tag "/javascripts/ckeditor/ckeditor.js" %> | |
<%= stylesheet_link_tag "/javascripts/ckeditor/contents.css" %> | |
<% end %> | |
<li id="<%= attribute_id %>"> | |
<%= form.label attribute, label_text %> | |
<%= form.cktext_area attribute, :toolbar => 'Easy', :width => 800, :height => 400 %> | |
</li> |
NewerOlder