NoMethodError in ConnectionController#index とエラーが出ます。
undefined method `action' for ConnectionController(Table doesn't exist):Class と言わせて、サーバーを立ててlocalhostにアクセスしても赤い画面が出るだけです。
connection_controller.rbの26行目がおかしいと言われたのですが、そもそもconnection_controller.rbには26行も書いていないです。
send(name, *arguments, &block) else super end end
どこを直せば良いのでしょうか?
connection_controller.rbには
class ConnectionController < ActiveRecord::Base def index personal = {'name'=>'Yamada','old'=>28} render :json => personal end end
と書き、
routes.rbには
Rails.application.routes.draw do namespace :connection do get '/',action:'index' end end
schema.rbには
ActiveRecord::Schema.define(version: 20170101073143) do create_table "userdata", force: :cascade do |t| t.datetime "created_at", null: false t.datetime "updated_at", null: false end end
マイグレートファイルの日付なども刻印されたファイルには
class CreateUserdata < ActiveRecord::Migration def change create_table :userdata do |t| t.string :name t.text :image t.timestamps null: false end end end
と書きました。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。