LoginSignup
0

posted at

開発勉強(controller)

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

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

⭐️ 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

  これで作成ができました

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
What you can do with signing up
0