Я пытаюсь сделать пользовательские формы редактирования для пользователя завещать, но когда я отправить форму оболочки бросить мне эту ошибку:Нет маршрута матчей [POST] «/ профиль/12/редактировать»
No route matches [POST] "/profile/12/edit"
Вот моя форма:
= simple_form_for(:user), html: { method: :put }) do |f|
= f.input :email
= f.input :username
= f.input :phone
= f.input :password, autocomplete: "off", required: false
= f.input :password_confirmation, required: false
= f.input :current_password, required: true
= f.button :submit, 'Update'
Вот мой profile_controller
class ProfileController < ApplicationController
def show
@client = Client.find(params[:id])
end
def edit
@user = User.find(params[:id])
end
def update
@user = User.find(params[:id])
if @user.update_attributes(params[:user])
redirect_to root_path
end
end
end
И мой routes.rb:
Rails.application.routes.draw do
root 'home#index'
devise_for :users
resources :profile
end
Что я делаю неправильно?
показать ваш routes.rb –
обновление вопрос – wweare
Пытались ли вы '' 'грабли routes''' видеть Вас доступные маршруты? – Renews