29. 謎のエラーを吐く
Capybara::Poltergeist::JavascriptError:
One or more errors were raised in the Javascript code on the page. If
you don't care about these errors, you can ignore them by setting js_errors:
false in your Poltergeist configuration (see documentation for details).
TypeError: 'undefined' is not a function (
evaluating 'ReactElementValidator.createElement.bind(
null,
type
)')
TypeError: 'undefined' is not a function (
evaluating 'ReactElementValidator.createElement.bind(
null,
type
)')
36. 痛恨のコピペミス…
# 当初 rails-api を使っていなかったが導入してみた。
# API 用の親クラスを作成しようとした
class ApiController < ActionController::API
# コピペをミスってActionController::APIに…
include ActionController::Serialization
end
37. 痛恨のコピペミス…
class BoardsController < ApiController
# client 側の js からの request があったので
# 子クラスで render json を呼び出す
def index
render json: @current_user.boards
end
end