-
-
Save tessafallon/8008749 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'mysql2' | |
class Dog | |
@@db = Mysql2::Client.new(:host => "localhost", :username => "root", :database => "dogs") | |
end | |
dog = Dog.find(10) | |
debugger | |
puts 'hi' | |
# color, name, id | |
# db | |
# find_by_att | |
# find | |
# insert | |
# update | |
# delete/destroy | |
# refactorings? | |
# new_from_db? | |
# saved? | |
# save! (a smart method that knows the right thing to do) | |
# unsaved? | |
# mark_saved! | |
# == | |
# inspect | |
# reload | |
# attributes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment