Advanced Rails Self-Assessment
We offer both introductory and advanced courses. The introductory courses assume that you have a programming background, but that you have little or no previous experience with the topic taught in the Studio. We teach the fundamentals to get you started in the introductory courses. The advanced courses assume that you have working experience with the core concepts. We teach advanced techniques, tips, and tricks in the advanced courses.
This is an advanced course. To help you determine if this Studio is a good fit for you, we've included a set of self-assessment questions below and ways to get ready. We're also happy to help you choose a Studio by e-mail or phone (303-523-2757).
Am I Ready?
-
Are you working with Ruby and Rails on a regular basis?
-
Do you have a good working knowledge of the Rails fundamentals?
-
Are you comfortable with the RESTful conventions in Rails?
-
Is the following code familiar to you, and do you understand how it works?
event.rb
class Event < ActiveRecord::Base has_many :registrations has_many :reviews validates_presence_of :name, :starts_at, :location validates_uniqueness_of :name validates_numericality_of :price, :greater_than_or_equal_to => 0 def self.upcoming_events find(:all, :order => "starts_at", :conditions => ['starts_at >= ?', Time.now]) end def spaces_remaining self.capacity - self.registrations.size end endevents_controller.rb
class EventsController < ApplicationController def index @events = Event.upcoming_events respond_to do |format| format.html format.xml { render :xml => @events } end end def new @event = Event.new respond_to do |format| format.html format.xml { render :xml => @event } end end def create @event = Event.new(params[:event]) respond_to do |format| if @event.save flash[:notice] = 'Event was successfully created.' format.html { redirect_to(@event) } format.xml { render :xml => @event, :status => :created, :location => @event } else format.html { render :action => "new" } format.xml { render :xml => @event.errors, :status => :unprocessable_entity } end end end end
How Do I Get Ready?
If you're not comfortable with the code above, we recommend a couple ways to prepare for this Studio. You could either attend the Ruby on Rails Studio before the Advanced Rails Studio or prepare on your own in the following ways:
-
Read the book Agile Web Development with Rails and work through the exercises to gain experience with Rails.
-
Build a Rails application that uses the core features of Rails: models, views, controllers, partials, layouts, and helpers.
-
Watch the Everyday Active Record screencast series to gain a better understanding of models and model relationships.
