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?

More than 5 years have passed since last update.

[初学者]rootメソッド

Posted at

目的

学習の備忘録と初学者の参考資料として投稿

ルートの設定

ルートへアクセスした場合に特定のアクションを実行させたい時に設定。

設定方法

config/routes.rb

 root to: コントローラー名アクション名

ブラウザで

 http://localhost:3000/と記入

結果、設定したアクションのviewが表示されます。

まとめ

最初に表示したいトップページがあるならば、ルート設定すればいい。

今後も学習で気づきや参考になるものがあれば、アップしていきます。
もし参考になったらいいね!!よろしくお願いします:bow_tone1:

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?