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
Create the Database | |
bundle exec rake db:create | |
Check Database Version | |
bundle exec rake db:version | |
Run the Test Suite | |
bundle exec rake spec | |
Run the Migrations |
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
Pre-release: Set up Database with Old Schema | |
$ bundle install | |
$ bundle exec rake db:create | |
$ bundle exec rake db:migrate | |
bundle exec rake generate:migration NAME=RemoveWeightFromDogs | |
class RemoveWeightFromDogs < ActiveRecord::Migration |
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
$ bundle install | |
$ bundle exec rake db:create | |
$ bundle exec rake db:migrate | |
$ bundle exec rake db:seed |
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
$ bundle install | |
$ bundle exec rake db:create | |
$ bundle exec rake db:migrate | |
$ bundle exec rake db:seed | |
bundle exec rake console | |
Dog.all |
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
Just as it is the responsibility of our plain Ruby classes to instantiate new instances of themselves, | |
Active Record model classes are also responsible for instantiating instances of themselves | |
bundle exec rake console |
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 'prime' | |
def prime_factors(number, output = []) | |
return [number] if number.prime? | |
# write def prime base case checker in method | |
# return output if number.prime? | |
factors = (2...number/2).to_a.select do |potential_factor| | |
number % potential_factor == 0 | |
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
change instance vars of positions to self.position | |
because that's the position for the current player | |
delete player instance variable then just pass players into the starting_position (formerly overwriting with position method) | |
make attr reader for position | |
use insert and to_s to the value | |
have a hash value be knowing the position and player name |
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
need a merge conflict xy_wing array maybe | |
or just assign the variables of the board from within the recursie loop because that's worked before with the lone single |
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
# installing gems | |
gem install bundler | |
# install bundler should already be here on dbc machines | |
bundle install | |
# creating database | |
# makes two dbs - one for model, one test | |
bundle exec rake db:create |
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
console: | |
gem install bundler | |
rbenv local 2.2.2 | |
bundle install | |
$ postgres -D /usr/local/var/postgres | |
FATAL: lock file "postmaster.pid" already exists |
OlderNewer