Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
rails-master-road-1.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
chionyan
February 15, 2019
Programming
0
88
rails-master-road-1.pdf
chionyan
February 15, 2019
Tweet
Share
More Decks by chionyan
See All by chionyan
レンタルカメラ広告提案資料
chionyan
0
730
Other Decks in Programming
See All in Programming
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
160
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
310
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
560
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
180
PHPで TLSのプロトコルを実装してみる
higaki_program
0
510
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
100
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
130
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
160
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.1k
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
170
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
180
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
670
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
230
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
WENDY [Excerpt]
tessaabrams
9
37k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
420
Transcript
Ruby on Rails Master への道 〜導入編〜 @chionyan 公開日時:2019/2/15
Rails でアプリを作るのは超簡単!
超簡単 Rails 下準備をする // プロジェクトを作る $ rails new sample-app //
ライブラリを入れる $ bundle install
超簡単 Rails // User に関する色々を作ってくれる $ rails generate scaffold User
name:string em // DB を作る $ rails db:migrate データを操作する色々を作る
超簡単 Rails $ rails server サーバーを起動する
超簡単 Rails できました!
超簡単 Rails User を作成することもできる!
超簡単 Rails User を作成することもできる!
超簡単 Rails 一覧にも出てくる!
すごーい!!!
Rails チュートリアル Rails チュートリアルでは、 scaffold がよしなにやってくれた内容を、 ・Routing ・Model ・Controller ・View
・バリデーション、関連、セッション... など一つ一つ基礎の部分を写経して、 アプリケーションを作っていく。
でも、、
実際何やってるの??
Ruby を知る ポテンシャルエンジニア研修で も使った名著。 Rails のフレームワークで使われ ている Ruby について丁寧に解 説してある。
まずはこれで Ruby を知ろう。 「プロを目指す人のための Ruby 入門」
Rails を知ろう 「Ruby on Rails ガイド」
Ruby on Rails ガイド ガイド目次です。 さっき4つくらいのコマンドで 終わったことや、モデル、ビュ ー、コントローラーで行われて いることもここで細かく説明さ れています。
多い・・・。
ちょっとだけ見せ
Active Record マイグレーション # 下記のコードが作成される(DB 作る用) class AddLocationToUsers < ActiveRecord::Migration
def change add_column :users, :location, :string end end // users テーブルに location カラムを追加する $ rails g migration AddLocationToUsers locati // DB を更新する $ rails g db:migrate
Active Record マイグレーション class AddLocationToUsers < ActiveRecord::Migration def up add_column
:users, :location, :string end def down remove_column :users, :location, :string end end こう手直しした方が融通が効きやすい!! (可逆性がある)
そういうことがわかります。。
もっと知りたい人は、
こことか、こことか
rails / rails User を作成することもできる!
読めたらいいな。。。
おしまい