Я получил ошибку при попытке обновить через форму.Он говорит:
неопределенный метод `allow 'для« обновления »: String
def update
if @action.update(action_params)
redirect_to action_path(@action)
else
flash[:errors] = @action.errors.full_messages
flash[:data] = action_params
redirect_to edit_action_path
end
end
def set_action
@action = Action.find(params[:id])
end
def action_params
params.require(:action).permit(:name, :goal_id, :completed, :date)
end