HW: https://gist.github.com/bridgpal/3e377a9dea50c1cad82a
http://jsfiddle.net/eTcvF/3/ (better solution)
HW: https://gist.github.com/bridgpal/3e377a9dea50c1cad82a
http://jsfiddle.net/eTcvF/3/ (better solution)
sublime trix: in terminal, instead of typing subl . to open a sublime text folder, type subl . & to force sublime to run in the background, that way your terminal is still active instead of hanging.
Ruby Forms: http://guides.rubyonrails.org/form_helpers.html
Ruby key words: http://ruby.learncodethehardway.org/book/ex37.html
##MOMA App - first rails model app
ARTISTS - name, DoB, nationality, bio
PAINTINGS - style, title, date, artist_id
no id for artists because an artist can have multiple paintints. (ARTISTS has_many PAINTINGS, but PAINTING belongs to an ARTIST). Thus you don't need an id for the artists.
ctrl T in sublime text lets you search for certain or file in your folder directory.
Diff. between a block & a proc: Block is an object and a Proc is not.
Projects-- api Rspec scaled down
##Project Week Cont'ed:
modeling.rb
Direct link
#http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association
class Patient
belongs_to :primary_care_physician, :class_name => "Physician"
end
Always setup your layouts in your rails app/views/layouts/application.html.erb file
when you want to create a seperate layout different from the rest (say, a splash page), create a new layout file and introduce a different yield.
app/views/layouts/spalsh.html.erb.
http://stackoverflow.com/questions/11805214/how-to-switch-out-rails-layouts
| # ,o888888o. 8 8888 88 8 8888 8888888888',8888' | |
| # . 8888 `88. 8 8888 88 8 8888 ,8',8888' | |
| # ,8 8888 `8b 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 `8b 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 88 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 `8. 88 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 `8,8P 8 8888 88 8 8888 ,8',8888' | |
| # `8 8888 ;8P ` 8888 ,8P 8 8888 ,8',8888' | |
| # ` 8888 ,88'8. 8888 ,d8P 8 8888 ,8',8888' |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
##Pothole App
api's: google maps or leaflet
Amazon S3 (or paperclip)- photo storage
Twitter api
O-auth for user signin / Simple O-auth