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 ChangeDataTypeForWidgetCount < ActiveRecord::Migration | |
def self.up | |
change_table :widgets do |t| | |
t.change :count, :float | |
end | |
end | |
def self.down | |
change_table :widgets do |t| | |
t.change :count, :integer |
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
rails g devise:install | |
rails g devise User | |
rails g devise:views | |
rake db:migrate |
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
#... other gems up here | |
group :development do | |
gem "mongrel", "1.2.0.pre2" | |
end | |
group :test do | |
gem 'cucumber' | |
gem 'cucumber-rails' | |
gem 'capybara' |
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
Capybara.server_port = 3001 | |
Capybara.app_host = "localhost:3001" | |
Capybara.server do |app, port| | |
require 'rack/handler/mongrel' | |
Rack::Handler::Mongrel.run(app, :Port => port) | |
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
@selenium | |
Scenario: Login with Facebook | |
Given I am on the "facebook" auth page #sends to facebook authorization url | |
And I fill in "email" with "[email protected]" | |
And I fill in "pass" with "mypassword" | |
And I press "Login" |
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
#install from rvm site | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
#add to your bash profile | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile | |
#source your bash profile | |
source .bash_profile | |
#make sure its working - you should see output: rvm is a function |
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
def accept_invitation! | |
if self.invited? && self.valid? | |
self.invitation_token = nil | |
self.invitation_limit = self.class.invitation_limit | |
self.save | |
end | |
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
require('mongoose') | |
var express = require('express') | |
, resource = require('express-resource') | |
, app = express.createServer(); | |
app.listen(3000); | |
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); |
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
exports.index = function(req, res){ | |
res.send('merchant index'); | |
}; | |
exports.new = function(req, res){ | |
res.send('new merchant'); | |
}; | |
exports.create = function(req, res){ | |
res.send('create merchant'); |
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
exports.index = function(req, res){ | |
res.send('product index'); | |
}; | |
exports.new = function(req, res){ | |
res.send('new product'); | |
}; | |
exports.create = function(req, res){ | |
res.send('create product'); |
OlderNewer