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
before(:all) do | |
module CanCan; end | |
end | |
# ... test as if CanCan exists | |
after(:all) do | |
Object.send(:remove_const, :CanCan) | |
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
u = User.find(4) | |
=> #<User id: 4, .... > | |
u.save! | |
ActiveRecord::RecordInvalid: Validation failed: Path has already been taken | |
from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/associations.rb:109:in `create_record' | |
from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/associations.rb:94:in `create!' | |
from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.3/lib/active_record/associations/builder/singular_association.rb:27:in `create_namespace!' | |
from /home/git/gitlab/app/observers/user_observer.rb:14:in `after_save' | |
from /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:352:in `update' |
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
//MAKE SURE YOU RENAME THE FILE TO application.css.scss (adding .scss) | |
/* | |
* This is a manifest file that'll be compiled into application.css, which will include all the files | |
* listed below. | |
* | |
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. | |
* | |
* You're free to add application-wide styles to this file and they'll appear at the bottom of the |
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
ab -k -c 10 -n 100 http://localhost:1337/ | |
This is ApacheBench, Version 2.3 <$Revision: 1604373 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient).....done | |
Server Software: | |
Server Hostname: localhost |
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
Processing SessionController#new (for 127.0.0.1 at 2010-03-10 19:39:54) [GET] | |
Account Load (0.3ms) SELECT * FROM `accounts` WHERE (`accounts`.`subdomain` = 'example') LIMIT 1 | |
Redirected to http://www.org/signin | |
Filter chain halted as [:fetch_account] rendered_or_redirected. | |
Completed in 13ms (DB: 13) | 302 Found [http://example.org/signin] | |
Processing SessionController#new (for 127.0.0.1 at 2010-03-10 19:39:54) [GET] | |
Rendering template within layouts/session | |
Rendering session/new |
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
Scenario: Admin should be able to login to any account | |
Given I login as "admin@example.com" with password "1234" to subdomain "microsoft" | |
Then I should see "Signed in successfully" | |
And the subdomain should be "microsoft" |
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
alias reload='. ~/.bashrc' | |
alias ea="$EDITOR ~/bin/dotfiles/bash/aliases && reload" | |
alias ee="$EDITOR ~/bin/dotfiles/bash/env && reload" | |
alias eh="$EDITOR ~/bin/dotfiles/bash/heroku && reload" | |
# Processes | |
alias tu='top -o cpu' | |
alias tm='top -o vsize' | |
# Projects |
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
THIS DOCUMENT MOVED TO http://chneukirchen.github.com/rps/ | |
AND http://github.com/chneukirchen/rps | |
= Ruby Packaging Standard | |
The aim of this document is two-fold. First, to specify a common | |
structure of how a Ruby package distributed as source (that is, but | |
not limited to, development directories, version-controlled | |
repositories, .tar.gz, Gems, ...) should conform to. |
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
NoMethodError in Chapter_requests#show | |
Showing app/views/chapter_requests/show.html.haml where line #3 raised: | |
You have a nil object when you didn't expect it! | |
You might have expected an instance of Array. | |
The error occurred while evaluating nil.include? | |
Extracted source (around line #3): |
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 UsersController < ApplicationController | |
#only showing new, but you'll most likely have index, show, edit, destroy and all those | |
def new | |
@user = current_group.users.new | |
end | |
def create | |
@user = current_group.users.new(params[:user]) |
OlderNewer