Skip to content

Instantly share code, notes, and snippets.

@bradoc
Created June 13, 2012 13:31
Show Gist options
  • Save bradoc/2924053 to your computer and use it in GitHub Desktop.
Save bradoc/2924053 to your computer and use it in GitHub Desktop.
Rails Console Output
irb(main):001:0> User.create email: "[email protected]", password: "abc", password_confirmation: "abc"
=> #<User id: 20, email: "[email protected]", username: "", password_digest: "$2a$10$5vEBcylkL8Cnx9R3e8VLNuVo6d0S81cLuJNewrwyBVxg...", created_at: "2012-06-13 13:28:07", updated_at: "2012-06-13 13:28:07", activation_token: "qosEs4ZTUkcvo39CZB7Yhg", activation_token_expiry: "2012-06-14 13:28:07", activated: false>
irb(main):002:0> User.find_by_activation_token! "qosEs4ZTUkcvo39CZB7Yhg"
ActiveRecord::RecordNotFound: ActiveRecord::RecordNotFound
from /Users/brad/Ruby/reallyawesomeapp/app/models/user.rb:54:in `find_by_activation_token!'
from (irb):2
from /Users/brad/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start'
from /Users/brad/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in `start'
from /Users/brad/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment