Rails

Exploring Ruby

  • irb
  • Ruby documentation
  • a few core classes
  • reflection
  • encapsulation
  • inheritance
  • unit testing

Collections, Strings, and a Little Metaprogramming

  • iteration
  • blocks
  • open classes
  • method_missing
  • define_method
  • regular expressions
  • string and array methods

Processing Data in Ruby

  • *args
  • gets
  • chomp
  • strings and symbols
  • to_s and to_sym
  • libraries
  • date

Ruby Idioms

  • lots of literals
  • modules
  • reflection revisited
  • closures, procs, and blocks
  • ranges
  • case equality
  • exception handling

Intro to Rails

  • what is Rails?
  • MVC
  • creating an application
  • directory structure
  • support scripts
  • log files
  • validation

Migrations

  • migrating tables
  • migrating columns
  • migrating indexes
  • SQL migrations
  • Rails 2.0 sexy migrations
  • managing the schema version

ActiveRecord

  • gems
  • getting connected
  • CRUD
  • validations
  • lifecycle methods
  • transactions
  • magic columns

Testing Models

  • types of tests
  • unit testing
  • assertions
  • testing exceptions
  • testing validations
  • using fixtures
  • refactoring tests

ActiveRecord Relationships

  • has_one, belongs_to, has_many, habtm
  • generated methods
  • relationship options
  • :through and polymorphic relationships
  • acts_as_list, acts_as_tree
  • when instances get saved

Rake

  • Domain-Specific Languages (DSLs)
  • rake, ant, and make
  • rake command line options
  • common tasks
  • writing your own tasks
  • namespaces
  • adding tasks to a Rails application

ActionController

  • actions
  • params, session, and flash
  • render or redirect?
  • filters and verify
  • routing
  • named routes

Testing Controllers

  • functional and integration testing
  • request methods
  • assert_response and assert_redirect
  • asserting assigns
  • the mighty assert_select
  • decoupling tests from model layer

ActionView

  • render options
  • ERB
  • Builder
  • layouts
  • partials
  • Rails helpers
  • writing your own helpers

Ajax on Rails

  • prototype
  • ajax helpers
  • observing forms and fields
  • scriptaculous
  • autocomplete
  • drag and drop
  • RJS

Caching

  • page caching
  • action caching
  • fragment caching
  • query caching
  • profiling
  • benchmarking
  • log analysis

About the Course Author

Stuart Halloway is the CEO of Relevance, Inc. Relevance provides consuting, training, and development services for Ruby, Rails, Ajax, and Agile Java. Stuart is the author of Component Development for the Java Platform. Stuart regularly speaks at industry events including the Rails Edge, Pragmatic Studio, No Fluff, Just Stuff Java Symposiums, JavaOne, The Rich Web Experience, and SD West.