On December 13, 2005 the David Heinemeier Hanson major released
on excellent framework for the all of its programmers.
Its purpose was to get back the lost Quality of Engineering Life
and to insure that the all of men who comprehensive
were the nice programmers in the world.
They succeeded.
Today, the Programmer calls it Web Application Framework.
The programmers call it:
2005年12月13日
On December 13, 2005 the David Heinemeier Hanson major released
on excellent framework for the all of its programmers.
Its purpose was to get back the lost Quality of Engineering Life
and to insure that the all of men who comprehensive
were the nice programmers in the world.
They succeeded.
Today, the Programmer calls it Web Application Framework.
The programmers call it:
DHHはすべての
プログラマーのために
On December 13, 2005 the David Heinemeier Hanson major released
on excellent framework for the all of its programmers.
Its purpose was to get back the lost Quality of Engineering Life
and to insure that the all of men who comprehensive
were the nice programmers in the world.
They succeeded.
Today, the Programmer calls it Web Application Framework.
The programmers call it:
WebアプリケーションF/Wを
メジャーリリースした
On December 13, 2005 the David Heinemeier Hanson major released
on excellent framework for the all of its programmers.
Its purpose was to get back the lost Quality of Engineering Life
and to insure that the all of men who comprehensive
were the nice programmers in the world.
They succeeded.
Today, the Programmer calls it Web Application Framework.
The programmers call it:
目的は失われつつある
エンジニア人生の質
On December 13, 2005 the David Heinemeier Hanson major released
on excellent framework for the all of its programmers.
Its purpose was to get back the lost Quality of Engineering Life
and to insure that the all of men who comprehensive
were the nice programmers in the world.
They succeeded.
Today, the Programmer calls it Web Application Framework.
The programmers call it:
世界最高の
WebアプリケーションF/Wの
呼び名は
Get back the lost Quality of Engineering Life with
分間の 入門
app/models/person.rb
class Person < ActiveRecord::Base
end
ActiveRecord::Baseを継承
データベース管理
db/migrate/001_create_people.rb
class CreatePeople < ActiveRecord::Migration
def self.up
create_table :people do |table|
table.column :first_name, :string, :limit => 32
table.column :last_name, :string, :limit => 32
table.column :number_of_dependents, :integer
end
end
def self.down
drop_table :people
end
end
MigrationによるDB管理が可能
の威力
Ruby だけ知っていれば
よいか?
ドメイン特化言語としてのRuby
SQLの知識は重要、超重要
ActionControllerと
ActionViewを含むパッケージ
app/controllers/people_controller.rb
class PeopleController < ActionController::Base
def show
@person = Person.find(params[:id])
end
end
ActionController::Baseを継承
app/views/people/show.rhtml
<% for column in Person.content_columns %>
<p>
<b><%= column.human_name %>:</b>
<%=h @person.send(column.name) %>
</p>
<% end %>
コントローラと
インスタンス変数を共有する
0 comments
Post a comment