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
Started POST "/posts/1/vote?vote=true" for 127.0.0.1 at 2013-05-24 17:12:44 -0400 | |
Connecting to database specified by database.yml | |
AbstractController::ActionNotFound (The action 'vote' could not be found for PostsController): | |
actionpack (3.2.12) lib/abstract_controller/base.rb:116:in `process' | |
actionpack (3.2.12) lib/abstract_controller/rendering.rb:45:in `process' | |
actionpack (3.2.12) lib/action_controller/metal.rb:203:in `dispatch' | |
actionpack (3.2.12) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' | |
actionpack (3.2.12) lib/action_controller/metal.rb:246:in `block in action' | |
actionpack (3.2.12) lib/action_dispatch/routing/route_set.rb:73:in `call' |
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
Garretts-MacBook-Pro:myflix-jun-2013 Garrett$ rails generate migration create_videos | |
Could not find pg-0.14.1 in any of the sources | |
Run `bundle install` to install missing gems. | |
Garretts-MacBook-Pro:myflix-jun-2013 Garrett$ bundle install | |
Fetching gem metadata from https://rubygems.org/......... | |
Fetching gem metadata from https://rubygems.org/.. | |
Using rake (10.0.3) | |
Using i18n (0.6.1) | |
Using multi_json (1.5.0) | |
Using activesupport (3.2.11) |
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
Garretts-MacBook-Pro:myflix-jun-2013 Garrett$ rspec | |
Rack::File headers parameter replaces cache_control after Rack 1.5. | |
F..........................FFFF....... | |
Failures: | |
1) Video | |
Failure/Error: it { should have_many(:reviews).order('created_at DESC')} | |
Expected Video to have a has_many association called reviews (reviews should be ordered by created_at DESC) | |
# ./spec/models/video_spec.rb:7:in `block (2 levels) in <top (required)>' |
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
Garretts-MacBook-Pro:myflix-jun-2013 Garrett$ heroku run rake db:seed | |
Running `rake db:seed` attached to terminal... up, run.4169 | |
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7) | |
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7) | |
Connecting to database specified by DATABASE_URL |
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
2013-07-23T14:46:39.352679+00:00 app[web.1]: [2013-07-23 14:46:39] INFO WEBrick::HTTPServer#start: pid=2 port=26208 | |
2013-07-23T14:46:39.352282+00:00 app[web.1]: [2013-07-23 14:46:39] INFO WEBrick 1.3.1 | |
2013-07-23T14:46:39.352282+00:00 app[web.1]: [2013-07-23 14:46:39] INFO ruby 2.0.0 (2013-06-27) [x86_64-linux] | |
2013-07-23T14:46:39.699842+00:00 heroku[web.1]: State changed from starting to up | |
2013-07-23T14:46:42.265235+00:00 app[web.1]: Started GET "/" for 207.97.155.2 at 2013-07-23 14:46:42 +0000 | |
2013-07-23T14:46:42.377014+00:00 app[web.1]: Rendered shared/_header.html.haml (7.0ms) | |
2013-07-23T14:46:42.387734+00:00 heroku[router]: at=info method=GET path=/ host=garrett-myflix.herokuapp.com fwd="207.97.155.2" dyno=web.1 connect=3ms service=153ms status=200 bytes=1023 | |
2013-07-23T14:46:42.377014+00:00 app[web.1]: Processing by StaticController#front as HTML | |
2013-07-23T14:46:42.377014+00:00 app[web.1]: Rendered static/front.html.haml within layouts/application (3.3ms) | |
2013-07-23T14:46:42.377014+00:00 app[we |
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 lisp_eval(function) | |
if function[0] == "#" | |
return true if function[1] == "t" | |
elsif function[0] == "(" | |
if function.split('')[1..-2].all?{|letter| letter != ")"} | |
operation_eval(function) | |
else | |
operation_eval function.split(")").to_s.delete("\"").split("(").last.delete(']') | |
end | |
elsif function[0].to_i |
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(){ | |
$(document).foundation(); | |
// Hides every element except the first one | |
$("fieldset.person").slice(1).addClass("hidden") | |
// Used the "on click" to handle event bubbling | |
$(".row").on("click", ".add-person", function() { | |
// Finds the last fieldset that is visible and makes the next hidden one visible | |
$("fieldset.person").not(".hidden").last().next("fieldset.person").removeClass("hidden") |
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
#### Model | |
def initials | |
[Person.first_letter(first_name), Person.first_letter(last_name)].compact.join("") | |
end | |
# "try" is a method Ryan showed me. It sends whatever method you specify | |
# and if it doesn't work, it returns nil instead of an error. | |
def self.first_letter(string) | |
string.try(:split, "").try(:first) |
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
var gameOfLife = { | |
width: 12, | |
height: 12, | |
createAndShowBoard: function () { | |
// create <table> element | |
var goltable = document.createElement("tbody"); | |
// build Table HTML | |
var tablehtml = ''; |
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
var gameOfLife = { | |
width: 12, | |
height: 12, | |
stepInterval: 100, | |
playing: false, | |
intervalObject: null, | |
createAndShowBoard: function(state) { | |
// create <table> element | |
var goltable = document.createElement("tbody"); |
OlderNewer