class ArnoldController < ApplicationController
def terminator
@u = User.find_by_name(’Sarah Conner’)
@u.destroy
end
def total_recall
@quote = 'Get your ass to Mars!'
render :text => @quote
end
def twins
render :partial => ‘de_vito’,
:locals => { :julius => User.find
end
def sixth_day
User.find(:first).clone
end
end
ruby code
public
assets
<% for member in fellowship do %>
<%= member.name %>
<%= member.gift_from_galadrial
<%= member.ringbearer? %>
<% end %>
New member?
<%= form_tag :action => ‘add_dude’, :m
<%= text_field :new_guy, :species %>
<%= text_area :new_guy, :biography %
<%= check_box :new_guy, :pawn_of_sau
<%= end_form_tag %>
views, partials
class JazzMigration < ActiveRecord::Mi
def self.up
create_table :instruments do |t|
t.column :name, :string
t.column :type_id, :integer
t.column :family, :string
t.column :range, :integer, :defa
t.column :position_id, :integer,
end
Instrument.create_default_instrume
JazzPlayers.connect_to_instruments
end
def self.down
JazzPlayers.disconnect_from_instru
drop_table :instruments end
database
migrations