LoginSignup
0
0

More than 5 years have passed since last update.

Rails 勉強メモ2

Posted at

redirect_to
アクションから実行

render
アクション先のビューを実行

ExecJS::RuntimeError
CoffeeScriptファイルの記述ミス

ヘルパーメソッドのform_forは対象オブジェクトをpersisted?メソッドで確認している。
データベースに保存されている(真)であればPATCH,保存されていない(偽)であればPOSTになる。

capybara
within('#(HTMLのid属性を指定)')
指定したid内の要素の内側が操作対象になる。

HTML = <div class="links">
capybaraでの指定 = first('div.links')

map(&:name)とmap { |x| x.name }は同じ。

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