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
## Customize database setup | |
database: | |
override: | |
- echo "no database setup" |
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
en: | |
errors: | |
format: "%{message}" | |
messages: | |
blank: "%{attribute} can't be blank" | |
activerecord: | |
errors: | |
models: | |
user: | |
attributes: |
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
function gitmerged() { | |
git checkout master; git pull; git fetch -p; git branch -D $1 | |
} |
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
/Users/username/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'forward' (>= 0) among 120 total gem(s) (Gem::LoadError) | |
from /Users/username/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec' | |
from /Users/username/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem' | |
from /Users/username/.rvm/gems/ruby-2.0.0-p0@global/bin/forward:22:in `<main>' | |
from /Users/username/.rvm/gems/ruby-2.0.0-p0@global/bin/ruby_noexec_wrapper:14:in `eval' | |
from /Users/username/.rvm/gems/ruby-2.0.0-p0@global/bin/ruby_noexec_wrapper:14:in `<main>' |
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
# determine if a number is prime | |
# not divisible by a natural number greater than 1, and less than itself | |
def is_prime?(n) | |
return false if n == 1 | |
# start the range greater than 1 | |
# do not include the number itself | |
range = (2..(n-1)).to_a | |
detection = range.detect do |n2| |
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
selections = [] | |
1000.times { selections << ["manage", "settings"].sample } | |
selections.select { |s| s == "manage" }.size > selections.select { |s| s == "settings" }.size |
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 'test_helper' | |
class LikeTest < ActiveSupport::TestCase | |
should belong_to(:viewable) | |
should belong_to(:user) | |
context "validations" do | |
subject { Like.create(user_id: 1, viewable_id: 2, liked: false) } | |
should validate_uniqueness_of(:user_id).scoped_to(:viewable_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
resources :courses, only: [:show] do | |
resources :assessments, controller: :assessment_results, only: [:create, :edit, :show], path_names: { edit: 'start' } | |
member do | |
get ':lesson_id', to: 'lessons#show', as: 'lesson' | |
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
:tddium: | |
:submodules: true |
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
2012-02-17T16:25:05+00:00 app[web.1]: ActiveRecord::StatementInvalid (PGError: SSL error: decryption failed or bad record mac | |
2012-02-17T16:25:05+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull | |
2012-02-17T16:25:05+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d | |
2012-02-17T16:25:05+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum | |
2012-02-17T16:25:05+00:00 app[web.1]: WHERE a.attrelid = '"delayed_jobs"'::regclass | |
2012-02-17T16:25:05+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped | |
2012-02-17T16:25:05+00:00 app[web.1]: ORDER BY a.attnum | |
2012-02-17T16:25:05+00:00 app[web.1]: ): |
NewerOlder