1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PaizaCloudをさわってみた②

Posted at

PaizaCloudをさわってみた②

上記の続き。

Railsで日記アプリを作ってみた。①

PaizaCloudで簡単なアプリを作成してみようと思い、実施。
PaizaCloud上にサーバを作成して、ターミナルを開いてコマンドを打っていく。

  • 新しいアプリの作成
rails new diary_app
cd diary_app
  • modelの作成
    データベースのカラムはシンプルにtitle content dateとします。
rails generate model Diary title:string content:text date:date
rails db:migrate
  • controllerの作成
rails generate controller Diaries index show new create edit update destroy
  • ルーティングの設定(config/routes.rb)
Rails.application.routes.draw do
  root 'diaries#index'
  resources :diaries
end

コントローラーの修正以降は次回にまとめる。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?