LoginSignup
0
0

More than 1 year has passed since last update.

開発勉強(controller)

Posted at

今回も頑張っていきましょう。

今日は、前回なんとかサーバーの立ち上げまでできたので、実際に開発に向けて勉強していきます。

⭐️ MVC
  ・Railsは「MVC」というアーキテクチャーを使ったフレームワーク
  ・MVCというのは、「Model」「View」「Controller」の略
  ・この3つの中で最も重要なのは「Controller」
  
⭐️ コントローラーを作成する
  ターミナル上で前回作成したRailsAppへ移動し、以下コマンドを実行する

qiita.rb
rails g controller 名前

  ※名前は半角英字とすること

qiita.rb
      create  app/controllers/hello_controller.rb
      invoke  erb
      create    app/views/hello
      invoke  test_unit
      create    test/controllers/hello_controller_test.rb
      invoke  helper
      create    app/helpers/hello_helper.rb
      invoke    test_unit

  これで作成ができました

0
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
0
0