Tag: Rails/アップグレード
bundle update
bundle exec rails app:update
class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end
class Book < ApplicationRecord end
NoMethodError: assigns has been extracted to a gem. To continue using it, add `gem 'rails-controller-testing'` to your Gemfile.
group :test do gem "rails-controller-testing" end
.DEPRECATION WARNING: Using positional arguments in functional tests has been deprecated, in favor of keyword arguments, and will be removed in Rails 5.1. Deprecated style: get :show, { id: 1 }, nil, { notice: "This is a flash message" } New keyword style: get :show, params: { id: 1 }, flash: { notice: "This is a flash message" }, session: nil # Can safely be omitted.
#pre{{
post :create, params: {book: { author: @book.author, summary: @book.summary, title: @book.title }}
get :show, params: {id: @book}}}