0
0

More than 3 years have passed since last update.

railsチュートリアル 第5章

Posted at

テスト駆動開発

エラー

undefined local variable or method `static_pages_contact_url'

`static_pages_contact_url'にアクセスしようとしたけれどアクセスできない

ルーティングを直す。

ActionNotFound: The action 'contact' could not be found for StaticPagesController

StaticPagesControllerの中にcontactアクションがない
controllerを直す。

ActionController::MissingExactTemplate: StaticPagesController#contact is missing a template for request formats

contactアクションまで動いているが、contactのテンプレートを探しているけどない。

Viewを直す。

<Contact | Ruby on Rails Tutorial Sample App> expected but was
<Ruby on Rails Tutorial Sample App>

Sample Appは動けるけど追加タイトルが入っていない。

サイトのタイトルを追加する

URLをきれいにする方法
rootを作るとpathとurlができる
root_pathはドメイン名が入らない。
root_urlはドメイン名が入る。

統合テスト

ルート
<% %>と<%= %>は違う
コードは縦横並べて書く。

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