Posted on 2012-02-18, 17:35:23, by Eric MacAdie, under
CA Notes.
2012-02-07_08.32.40 He went over SQL in Ruby/Rails Team has many players, Player belongs to Team User story: As a user, I want to see a list of products I can buy A product has a name, color, and price. A product belongs to a single brand. Prices are always in exact dollar amounts (no cents). [...]
Posted on 2012-02-12, 22:09:07, by Eric MacAdie, under
CA Notes.
I only seem to have notes for the second day of week 4. 2012-02-02 Notes Scaffolding notes: respond_to partials: Like a server side include Look up respond_to method respond_to do |format| format.html format.json { render json: @runners } end JSON only: respond_to do |format| format.json { render json: @runners } end You [...]
Posted on 2012-02-08, 16:27:26, by Eric MacAdie, under
Code Academy.
I really do not have too much to say right now about week 4. I really want to post something, even if it’s really short, just to stay consistent. We learn about many-to-many associations this week.
Posted on 2012-01-30, 15:41:40, by Eric MacAdie, under
Code Academy.
I am a bit late, but here is my summary of week 3. The lectures were rounding out MVC. We made a model class, a controller class, and some view pages. We then made the necessary methods, views and routes to list all the instances, show one instance, edit an instance, and delete an instance. [...]
Posted on 2012-01-29, 21:17:58, by Eric MacAdie, under
CA Notes.
2012-01-26_08.08.55 notes Web requests: URL, method, format In the routes.rb file, you can have the same URL, but different methods If you are having trouble naming controllers, go into the Rails console, call the “pluarlize” or “singularize” methods. This will give you the Rails conventions. In browsers, when you type something in the address bar [...]
Posted on 2012-01-29, 21:11:16, by Eric MacAdie, under
CA Notes.
2012-01-24_08.10.45 This week: Arrays and blocks MVC Recipe CRUD your data Rails resources Model Associations 2 skills building: RoR coding and how to think about architecture of application Arrays and blocks: Arrays and collections 5.times do |n| puts "The Edens is ridiculous #{n + 1}" end The times method will let you increment a [...]
Posted on 2012-01-29, 19:44:33, by Eric MacAdie, under
CA Notes.
2012-01-19_08.01.49 Methods always return something, even nil Put an at sign in front of variable makes it an instance variable Class names get upper case – but when you enter rails generate command you can make the model name lower case model: class name is singular – this is a particular row in the database [...]
Posted on 2012-01-29, 19:31:40, by Eric MacAdie, under
CA Notes.
Here are my notes for the first day of week 2 at Code Academy. 2012-01-17_08.07.38 Methods: Classes: Fundamental Ruby On Rails: Why use it? Database-Backed Web Applications Convention Over Configuration Agile Development Rails quickstart: rails new myapp cd myapp rails server go to http://localhost:3000 Webbrick is great for development. There is Apache, nginx for [...]
Posted on 2012-01-29, 19:24:59, by Eric MacAdie, under
CA Notes.
Part of Code Academy is an HTML5 class that happens on Monday nights. The first class was on a Wednesday. I went to that one, and I plan on going to more in the future. The lecturer is Shay Howe, a designer at Groupon. 2012-01-18_17.58.26 – HTML5 & CSS class Div and span Divs [...]
Posted on 2012-01-26, 16:06:33, by Eric MacAdie, under
CA Notes.
Here are my notes from Code Academy week 1. 2012-01-12_08.14.41 Almost everything is lower-case Methods: def method_name to name Lists in Ruby Very important to be good with lists. landmarks = [ "Wrigley Field", "Millenium Park", "John Hancock Center" ] This is an array. You do not specify the size. Iterate through array: landmarks.each do [...]